Skip to content

RF Compression & Decompression Guide

Harry Munday edited this page Oct 9, 2026 · 25 revisions

FLAC Compression & De-Compression Guide

Previous Page RF Capture Guide

Sub-Page Speed & Decoding Testing

Next Page RF Decoding Guide

What is RF Compression & Down-Sampling?

RF captures of tape formats are normally oversampled, meaning in the case of formats like VHS the total actual signal range tops out at 8mhz or 16msps so when using RF capture hardware at rates of 28-40msps we are technically oversampling, but this is not a bad thing due to filtering and aliasing of side bands on initial sampling.

Capturing more then the minimum allows for some redundancy from minor drops during capture to bit-flips in active storage devices but for archives going to solid mediums like optical discs, ware currently space is at a premium, down sampling allows users to cut RF captures down on a per format basis to the minimum needed for that signal.

The benefits of this also include, better SNR as there is less noise outside of the signal range, faster decoding times and smaller final files as there is less data to look though.

You can read the study here in the technical breakdowns doc.

Caution

16msps does work on PAL samples but can have issues with some cases, i.e damaged tapes or dropped sample captures, 18msps is considered the bare minimum, and 20msps is considered the hard safe minimum for all VHS flavours, and at least a minimum of 24msps for SVHS and Video8 initial sampling.

Basics of RF and RF Compression

FM RF captures commonly called samples or sampled data, is just like standard common PCM audio data just electrical signal values digitised into binary bits of information, but this is brightness and colour information in a different waveform pattern than normal sound waves, but due to being the same data format as PCM audio, we can use lossless audio codecs such as FLAC to compress captured FM RF data down A LOT or lossy ones to just break the files in fun ways too!

In terms of software support 8-bit and 16-bit singed/unsigned are what's common and universally used by most tools, including the decode suit, these data files are equivocal to audio files but with MHz of information instead of KHz.

But lets say our ADC captures 10-bit / 14-bit etc then normally you get scaled 16-bit data, then you have the MISRC which uses the 12-bit format.

FLAC compression essentially drops those extra 4 values to 0 in the case of 16-bit files alongside its standard compression methods.

Now in the real world 8-bit is more then enough for tape formats initial sampling, it's the MSPS or a million samples per second rate that actually matters and as low as 6-bit is enough to store VHS and Video8 at 20MSPS.

How does it work?

RF Data at 40msps in RAW or Bit-Packed --> FLAC-Chop (unpacks, cuts, down-samples & bit-crushes) --> 16msps 8-bit FLAC output

Down-Sampling is a method of cutting file size down with controlled loss of data more accurately removing background noise or dead space for example a 10~16bit ADC only has 10~16-bits of information but can only be saved in a 16-bit format FLAC will remove those 6 extra bits of essentially 0 value information or lower it to 8-bits or crush it to 6-bits, alongside filtering cut off removing anything else recorded outside the real-world usable signal range for said particular audio or video format, simmer to how a XLR microphone will have a cut-off for 75hz to remove buzzing sounds from lights or power transformers.

This process can be done for low bandwidth formats like HiFi FM signals with little worry but with video formats its more a stricter practice and the bandwidth also changes between PAL/NTSC and tape formats.

Note

We use SoX and dedicated builds of FLAC, not the FFmpeg FLAC for compressing RF data.

Compression Rate Tables

A modern full 20msps 8-bit Video / 5-10msps HiFi - VHS RF + Audio set will be today under 40-50GB/h pre-compressed with Level 8 FLAC.

40msps 10-bit Packed (DdD) (16-bit) (2.81GB/min) **VHS PAL SP**
Runtime File Size Storage Medium Note
45min 126.45GB 128GB Sony Quad Layer BDXL Max
60min 168.6GB
75min 210.75GB
90min 252.9GB
120min 337.2GB
150min 421.5GB
3-hour 505.8GB
240min 674.4GB
5-hour 843GB
6-hour 1011.6GB
40msps 10-bit FLAC compressed (DdD) (16-bit) (1.48GB/min) **VHS PAL SP**
Runtime File Size Storage Medium Note
45min 66.6GB
60min 88.8GB
75min 111GB 128GB Sony Quad Layer BDXL Max
90min 133.2GB
120min 177.60GB
150min 222GB
3-hour 266.4GB
240min 355.2GB
5-hour 444GB
6-hour 532.8GB

[!NOTE]

  • Rates based off 60sec live capture.
  • Rates are relative not absolute
16msps 8-bit with FLAC compression for **VHS NTSC**

Imgsli Slider Comparison 54msps vs 16msps

Runtime File Size Storage Medium Note
45min 15 GB
60min 19.44GB
75min 24.30GB 25GB M-Disk/GlassMasterDisc
90min 29.16GB S-VHS/VHS-C tape max
120min 38.88GB
150min 48.6GB 50GB M-Disk / 50GB GlassMasterDisc Max
3-hour 58.32GB VHS SP Max
240min 77.76GB
5-hour 97.2GB 100GB M-Disk Max
6-hour 116.64GB 128GB Sony Quad Layer BDXL Max / VHS LP Max

Note

Compression rates are amplitude relative not absolute.

Note

Video8/Hi8 is a single modulated signal, video & hifi are just on different carriers so you use 1 file for both video/hifi decoding like LaserDiscs, down sampling is not recommended for the formats at this time.

FLAC-Chop

The Qt6 GUI (Windows / macOS / Linux) runs the exact same probe -> cut pipeline with simple tabs:

  1. Chop tab — Browse or drag-and-drop a capture, the probe runs in the background and shows the real HH:MM:SS duration (never the 1000x-wrong header value), set the IN (green) / OUT (red) markers with the time box + Set IN / Set OUT buttons or the dual-handle slider, then Process writes <input>-cut.flac sample-exact next to the source.

  2. Batch Task tab — add many files (or drop them anywhere on the window) to re-compress / down-sample them whole-file with the same output settings, in parallel (one worker per CPU thread) into an optional output folder, with per-file status, Stop and skip-existing / overwrite control, a file that fails individually (rate below the selected output mode for example) is reported and the rest of the batch continues.

  3. Sync Edit - Allows for chopping of full-set captures such as those made via MISRC GUI from Clockgen and or MISRC hardware workflows.

  4. Metadata Editor tab — view & edit the Vorbis tags on FLAC files (Ogg .ldf inputs are read-only here, cut outputs are native FLAC and fully editable).

Note

Every output gets its RF Vorbis tags (RF_SAMPLE_RATE, RF_TOTAL_SAMPLES) rewritten in place to the new rate/length, so down-sampled files stay readable by the decode tools & MISRC-GUI with no extra steps.

Note

There is also full CLI support for automation and cross tool interaction.

s16 16-bit Signed to FLAC

Since this is uncompressed data it is easy to handle, the captures save to .raw but should be renamed to .s16.

ffmpeg INPUT.s16 -i -f s16le -ar 40k -ac 1 -acodec flac -compression_level 11 -f ogg OUTPUT.flac

Drag and Drop Script 16-bit-singed-to-flac.bat

@echo off
title Compressing : %~n1
ffmpeg -i "%~1" -f s16le -ar 40k -ac 1 -acodec flac -compression_level 11 -f ogg "%~dp1%~n1.ldf"

Note

FLAC-Chop reads these raw .s16 files directly too (keep the rate in the file name, i.e capture_16-bit_40msps.s16) and compresses them whole-file via the FLAC-Chop Batch Task tab or CLI, no FFmpeg needed.

Down-Sampling With FLAC-Chop (Linux / Windows / macOS)

Note

  • FM signals can be down sampled to save some space though this could potentially be risky if not enough headroom is left over.
  • Only stable media that is within spec of the format is recommended to ever be down sampled.

FLAC-Chop replaces the old ld-lds-converter | SoX pipe scripts, one command unpacks the 10-bit .lds, applies the wiki-aligned sinc -n 2500 0-<cutoff> low-pass profile for the target rate and writes the FLAC, with no intermediate raw files.

# 40msps .lds -> 24msps 8-bit FLAC - NTSC/PAL (SVHS/Video8 class)
flac-chop DdD-capture.lds . 0 999999 --rate 24000 --bits 8

# 40msps .lds -> 20msps 8-bit FLAC - VHS (PAL/NTSC safe minimum)
flac-chop DdD-capture.lds . 0 999999 --rate 20000 --bits 8

# 40msps .lds -> 10msps 8-bit FLAC - VHS & SVHS HiFi FM
flac-chop DdD-capture.lds . 0 999999 --rate 10000 --bits 8

Raw 8-bit .u8 captures down-sample the same way, the file name must carry the rate (i.e capture_8-bit_40msps.u8) as headerless raw has no header to read it from.

The built-in rate presets & their sinc profiles:

Output Rate Sinc Cutoff Use Case
5 msps 0-3050 HiFi FM audio
10 msps 0-3050 HiFi FM audio
16 msps 0-7650 VHS NTSC (experimental)
20 msps 0-9650 VHS (PAL/NTSC safe minimum)
24 msps 0-9400 SVHS/Video8 class
28.6 msps 0-9400 8fsc fallback profile

Omitting --rate keeps the source rate, --no-filter skips the sinc profile, --bits 12 writes true 12-bit FLAC (for 12-bit MISRC captures) and --bits 6 writes the 6-bit crush in an 8-bit container.

The Batch Task tab does all of this whole-file through the GUI, pick the output mode / bit-depth / sinc filter, add the files, go.

Manual SoX Commands

Initial application call command

Linux: sox

Windows "C:\Program Files (x86)\sox-14-4-2\sox.exe"

Export Spectrogram

sox Input.flac -n spectrogram

SoX can export a handy spectrogram chart of RF & Audio waveform data.

28msps 8-bit to 18msps 8-bit FLAC

sox -r 28636 -b 8 -c 1 -e unsigned -t raw infile.u8 -b 8 -r 18000 -c 1 -t flac outfile_18msps_8-bit.flac sinc -n 2500 0-8670

40msps 8-bit to 18msps 8-bit FLAC

sox -r 40000 -b 8 -c 1 -e unsigned -t raw infile.u8 -b 8 -r 18000 -c 1 -t flac outfile_18msps_8-bit.flac sinc -n 2500 0-8670

40msps 16bit to 10msps 8-bit FLAC

sox -r 40000 -b 16 -c 1 -e signed -t raw infile.s16 -b 8 -r 10000 -c 1 -t flac outfile_10msps_8-bit.flac sinc -n 2500 0-8670

Bit Crushing (Manual)

The minimum you can down sample data to is 7-6 bit before visual degradation in a video signal this is a extreme compression method

Applies to VHS/Beta/Video8/EIAJ level formats and has not been tested on Hi8/SVHS etc.

  1. Run ffmpeg -i input.flac -af astats -f null - and take note of RMS level dB

  2. if you're using a CX card and the number is less than -9.12, or you're using a DdD and the number is less than -21.2 then stop, you have less data than this'd keep, so it would only increase size.

  3. Run ffmpeg -i input.flac -af "volume=precision=fixed:volume=<your level without the minus here>dB*0.7071*0.5,aformat=sample_fmts=u8" -compression_level 12 small.flac (you can skip -compression_level 12 for much faster compression and very slightly bigger filesize)

Tip

FLAC-Chop has the crush built in, --bits 6 writes 6-bit crushed output (pure requantization, no dither, stored in an 8-bit FLAC container) and --bits 12 writes true 12-bit FLAC for 12-bit MISRC captures.

Naming & Formatting Your Files

Ensure the following is stated

  • Sample Rate
  • Bit Depth
  • Media Format

Optionally but very useful

  • Time & Date
  • Capture Device Used
  • Gain Setting Used
  • Playback Hardware Used

You can also rename the .flac to your media format name using standard designators & standard naming guide that can be very useful for mass .xxx extension lookup for archives, if you want to keep things simple ignore this and ensure format is in file name.

Page End

Sub-Page Speed & Decoding Testing

Previous Page RF Capture Guide

Next Page RF Decoding Guide

Clone this wiki locally