Skip to content

RF Capture Guide

Harry Munday edited this page Sep 14, 2023 · 24 revisions

RF Capture Guide

This guide go's over what options you have for FM RF (Frequency Modulated Radio Frequency) capture and best practices.

RF Capture in practice is very simple.

This guide assumes 2 things

You know what USB 3.0 is and or can twist a screwdriver and install an basic PCIe Card inside a standard desktop or server chassis.

Cleaning

Its a complex concept involving (C6H1O5)n & C3H8O

That's a joke, its paper and rubbing alcohol. (99.9% IPA not 70%*)

Simply cut a paper strip printer paper works fine, fold once, wet with alcohol, press on the drum lightly and hand rotate slowly don't go up and down and always gently pull away from drum once you have rotated for 10 seconds repeat until clean.

Its recommended to first clean around the drum the whole cylinder, including its track then tape guides or rollers you can use swabs, don't ever use a cotton swab or Q-Tip on the video heads the fibres will tare them off they are fine however for linear audio heads, that's it really clean heads and lubricated mechanical tracks is all a happy VCR needs to ensure the best results, but be sure to clean before and after use to remove any contaminant.

Capture Device Support

Media RF Type DdD Support CX Card Support RTLSDR Support
Video FM RF Yes Yes No
HiFi FM RF Yes Yes Yes
CVBS RF No Yes* No

*CX Cards support CVBS capture with sixdb off and level set to 0.

The RTLSDR does not have enough bandwidth for FM video.

The DomesDayDuplicator Rev 3, does not have the correct filtering for CVBS.

Hardware

DomesDayDuplicator (DdD) USB 3.0 Card

CX Card White PCIe 1x Card

Analogue Devices AD8367 RMS Amplifier with SMA Connectors.

RTLSDR is an affordable SDR radio that can capture HiFi signals for realtime decoding and saving to file.

Example Setup & Workflow

Cabling

If possible direct coupling is the best method with the DdD, but 1m of 50Ohm cable is normally fine but less cable = more signal.

If amplifiers are employed internally/externally directly after or before the RF Tap then 2-3m cabling can be used without issues.

NOTE: RFI or Radio Interference is a real world thing, keep AC power cables away from RF gear, cables etc, keep phones and radio based equipment out of direct line of sight to equipment at all times this is common sense that most people don't think about in the digital era less of an issue with full metal chassis decks however.

File Handling & Indexing

Name your captures properly, ignore this at your own peril as managing any media collection is a nightmare if you don't do it right from the start.

Checksums

Many people don't know or care about checksums but they are used every signal day in every signal device you own, checksums are what allow us to sanity check if data is damaged in handling, or has started to data rot while being stored.

Rapid CRC (Windows) & Tera Copy (Windows & MacOS)

GTK Hash (Linux / Universal)

Sampling Rates to use

Type PAL/NTSC Minimum ADC Required
VHS 18msps / 20msps Safe
SVHS 24msps / 28msps Safe
Video 8 16msps / 24msps Safe
Hi8 20msps / 28msps Safe
UMatic 24msps / 28msps Safe
UMatic SP 28msps Safe
EIAJ 16msps / 20msps Safe
Philips VCR 18msps / 20msps Safe
Philips V2000 18msps / 20msps Safe
1’’ Type C 28msps / 40msps Safe
Beta 1 18msps / 20msps Safe
Beta 2/3 18msps / 20msps Safe
Super Beta 24msps / 40msps Safe
BetaCam 28msps / 40msps Safe
BetaCam SP 28msps / 40msps Safe
ED Beta 28msps / 40msps Safe
DigiBeta SX SDI - Does not apply
D1 SDI - Does not apply
D2 SDI - Does not apply
D3 SDI - Does not apply

CX Cards & CXADC

Copy Paste install setup

Currently there are no modified Windows drivers so this is limited to a Linux live install on a USB drive or a full install on a local drive in your system If you want to stick to windows and WSL2 for most stuff then the live USB option is your best bet with a internal drive formatted in exFat for captures allowing you to hop back and forth between systems without issues,

Note you will want to disconnect your windows boot drive either way you go to avoid issues.

These cards have a digital gain control of 0-31 range with a 6db "digital boost" option you want your digitally controlled gain around level 0-10 and 6dB set to off almost always to have a clean as possible capture as higher gain introduces internal noise from the CX Chips, though this varies based off signal strenth of what your capturing.

NOTE if gain is set above level 0 & sixdb is used you cant capture raw composite or CVBS on the cards though on modulated signals from VHS/BetaMax etc this does not matter as much.

Ideally you use an external amplifier and or upgrade the crystal to get better performance on these CX Cards if you want the absolute best out of them its worth the small investment.

Using CX Cards with the CXADC Driver

Ubuntu is standard but Mint Cinnamon is more user friendly these days capture can be done inside any location system wide that you open a terminal in.

Command Line Capture (CLI)

timeout 10s cat /dev/cxadc0 |pv > CX_Card_28msps_8-bit.u8

Press Ctrl+C to copy then Ctrl+P to past the command use <+> to move edit position on the command line to edit the name or command and Enter to run the command.

timeout 10s defines the capture duration of 10 seconds, this can be defined in hours minutes or seconds if a timeout duration is not defined it will capture until storage space runs out.

Ctrl+C Will kill the current process, use this to stop the capture manually.

CXADC-CLI

Driver Config

List current configuration setting

Short Command

cxvalues

Direct Command

ls /dev |grep cxadc |sed -e's/dev//g'|xargs -I % bash -c 'find /sys/class/cxadc/%/device/parameters|grep -v parameters$'|xargs -I % bash -c 'echo -n "% "  && cat %'

This will look like

/sys/class/cxadc/cxadc0/device/parameters/audsel -1
/sys/class/cxadc/cxadc0/device/parameters/center_offset 8
/sys/class/cxadc/cxadc0/device/parameters/crystal 28636363
/sys/class/cxadc/cxadc0/device/parameters/latency -1
/sys/class/cxadc/cxadc0/device/parameters/level 16
/sys/class/cxadc/cxadc0/device/parameters/sixdb 1
/sys/class/cxadc/cxadc0/device/parameters/tenbit 0
/sys/class/cxadc/cxadc0/device/parameters/tenxfsc 0
/sys/class/cxadc/cxadc0/device/parameters/vmux 1

/sys/class/cxadc/cxadc0/ will change to /sys/class/cxadc/cxadc1/ and so on for multible installed cards.

Config

sudo echo x - Is the part you edit.

sudo echo 1 >/sys/class/cxadc/cxadc0/device/parameters/vmux - Physical Input (0-2)

sudo echo 0 >/sys/class/cxadc/cxadc0/device/parameters/level - Internal Gain (0-31)

sudo echo 0 >/sys/class/cxadc/cxadc0/device/parameters/sixdb - Digital Gain Boost (1 On / 0 Off)

Adjust level for capture, start playback of media, then run this command

./leveladj

To use this on different cards

./leveladj -d 1 (1 means for device 2/3/4 and so on device 0 is assumed when -d is not used)

Decode the first 10 sec to see if all is working correctly, re-wind and start full capture.

If an RMS amplifier is employed set your gain level manually between 0~10 for best results and sixdb off.

GUI Capture (Alpha)

Tony's CX Capture GUI

Harry's Docs Fork

FLAC Compress Capture

See the CXADC FLAC Compression Doc here

Windows scripts for CXADC Captures can be found here

CX Card - Duel Capture

As CX Card drivers can be loaded on a per card basis you can capture off 2-16 cards at the same time in one system (driver supports upto 256 cards)

Preview The Live Signal

sudo ffplay -hide_banner -async 1 -f rawvideo -pixel_format gray8 -video_size 1832x625 -i /dev/cxadc0 -vf scale=1135x625,eq=gamma=0.5:contrast=1.5

No Signal

CXADC-No-Signal

CVBS Signal (Note you need to set level to 0 and sixdb to 0 to capture for CVBS-Decode)

CVBS-Signal

Modulated Video Signal

Video-FM-Signal

Modulated HiFi Signal

HiFi-FM-Signal

Fix Ownership

Use chmod command on your installation directory's and or the driver files under dev/cxadc if permissions are broken and you need to sudo su to enter root to even oprate it. (CTRL + D)

sudo chmod -R 777 home/vhs-decode

sudo chmod -R 777 home/cxadc

DomesDayDuplicator

The domes day duplicator or DdD is limited to just 1 RF device per system but is entirely USB 3.0 based allowing for universal support with modern systems of all formats and sizes.

Today the GUI application has 1024 sample amplitude readout this tells you if an input signal is too strong or too weak.

This is a 47 Second Rolling RMS Readout (During Capture Only)

DdD-GUI-Amplitude-Readout

DdD Gain DIP 2

0 - Nothing (No movement)

0.1 - Something

0.3~0.8 Good Signal

Physical Gain Controls

The duplicator has one point of physical control this is a 4 DIP switch that controls the gain level of the amplifier.

0000 is 1-2-3-4 dips, In orientation to bottom numbers up is 1 and down is 0

DdD Gain DIP 1

All selected in this up position is 1111 or 2.02 Minimum Gain When dip’s 2-3-4 are down it's 1000 this is the maximum gain of 8.5, the table below shows all possible positions.

Configuration Switch Position Gain
15 1111 2.02
7 0111 2.17
11 1011 2.27
13 1101 2.45
3 0011 2.54
14 1110 2.59
5 0101 2.79
6 0110 3.02
9 1001 3.04
10 1010 3.34
1 0001 3.8
12 1100 4
2 0010 4.4
4 0100 6
8 1000 8.5

RF Capture Mode: 10-bit packed

We use 10-bit packed as its the most space effective before FLAC compression, decoding can be done with 10-bit packed or FLAC compressed data as its basically the same as a ZIP file, on NVME SSDs this is a 5~10% decoding speed difference for a 40-60% space saving

Straight Forward GUI capture

FLAC Compression of RF Captures - DomesDayDuplicator

To compress your 10-bit packed captures on Linux use this command

ld-compress input.lds

There is two ld-compress scripts ld-compress.bat & ld-compress-nvidia-gpu with the ld-tools windows suite.

Windows 7~11 Usage - DomesDayDuplicator

Download ld-tools Suite For Windows

Rename the extracted folder ld-tools-suite-windows and place it inside your C drives main directory, inside then pin ld-analyse to your task bar as its the only GUI app currently.

DdD Capture App For Windows

Put the ld-tools for windows build files into your capture directory, and open as CMD terminal

If this is a secondary drive it will be cd /d J:\vhs-decode for example.

System Wide Tools In Windows

If you ran though the WSL2 setup guide you already should have this installed

Open PowerShell as an administrator.

Install Choco Via (chocolatey package manager)

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))

Then you can install these system wide without any hassle.

Install FFmpeg

choco install ffmpeg

Install FLAC

choco install flac

Install SoX

choco install sox.portable

MacOS Usage?

Currently DdD is the only directly usable device on MacOS systems unless you have a desktop based mac with duel boot with Linux or thunderbolt 3/4 to PCIe Docks for laptops and AIO desktop units running Linux natively.

Some people have already built the decoders and tools on MacOS X86/M1 and we have done tests inside Ubuntu Virtual Machines its negligible in terms of performance slowdown with current speed optimised commands this can be as fast as 10fps+.

There has yet to be full docs for Intel & Apple Silicone hardware.

Unless someone wants to donate a few units to the dev/hardware team :)

Issues

The CX Cards can drop samples if they over heat, with active fans and or heatsinks this is a easy physical fix.

The DomesDayDuplicator can have issues with ground loops if put ontop of metal VCR lids directly best to insulate them,

EMI interferance from microwaves and raidos can affect any RF capture same for noise on the power line interfering with hardware normally.

Page End

Next Page RF Compression & Decompression Guide

Previous Page Hardware Installation Guide

Clone this wiki locally