-
Notifications
You must be signed in to change notification settings - Fork 46
CVBS Composite Decode
This spin-off project uses RAW CVBS captures and uses the signal processing and time base correction code, from vhs-decode & ld-decode there is no de-modulation stage unlike FM based media.
Full 4fsc CVBS PAL frame with SMPTE color bars. - 3D Transform Decoder.
CVBS an abbreviation,
Composite Video Baseband Signal. (also lesser used: colour, video, blanking, and sync)
Baseband a non-modulated live signal directly off a camera or media generation device, for tape formats this means a de-modulated & processed signal off a recorded medium.
Baseband signals are ready for direct use for audio this means a speaker and for video used to be an analogue CRT TV set now it's all on analogue to digital converter ICs.
Composite analogue video signals have been used from the pre-digital era to early digital equipment, developed in the 1950s and in full use from the 1960s to even today analogue systems using the ''Yellow RCA jack'' on consumer equipment and a BNC jack on prosumer/broadcast equipment.
S-Video is just composite Luminance with the Chromance modulated this minimises colour interference during transport, thus is due to signals being inside a cable with a pair of 2 shield cables shielded S-Video cable or 2 separate BNC cables and then the chroma is demodulated at the input device level, there are 3 versions of this standard.
Signal Format | Resolution | Field System | TV System | Aspect Ratio | RF Capture Support | Video Decoding Support |
---|---|---|---|---|---|---|
CVBS | 525 Lines | Interlaced | 525 NTSC | 4:3 / 16:9 | Yes* | Yes* |
CVBS | 625 Lines | Interlaced | 625 PAL | 4:3 / 16:9 | Yes* | Yes* |
CVBS | 655 Lines | Interlaced | PAL | 4:3 | Yes* | Not Tested/Implemented |
CVBS | 405 Lines | Interlaced | PAL | 4:3 | Yes* | Not Tested/Implemented |
CVBS | 819 Lines | Interlaced | PAL | 4:3 | Yes* | Not Tested/Implemented |
CVBS 240p | 240 Lines | Progressive | NTSC | 4:3 / 16:9 | Yes* | Work in Progress |
CVBS 288p | 288 Lines | Progressive | PAL | 4:3 / 16:9 | Yes* | Work in Progress |
960h CCTV | 960 x 576 | Interlaced | N/A | 16:9 Only | Yes* | Not Tested |
Important
28msps+ is recommended for sampling CVBS signals directly.
MISRC Has support for native RAW Composite/CVBS and S-Video capture in 12-bit (16-bit 40msps singed or unsigned samples).
CX Cards can try to switch back into standard mode causing wavy, jiggling, and loss of vertical sync frames, however if the card is in a fixed low gain state (level 0 / sixdb off) it is possible to get clean stable captures.
There is also using a T adaptor to feed a secondary signal via waveform generator to keep CX Cards in raw output mode, then in post to low pass filter it and then decode it.
The DomesDay Duplicator (DdD) input filtering is not suited for said signal range, the input filtering stage needs to be modified currently, this does not work well as it captures the signal improperly.
There is many more options possible thanks to Hasdoa workflow enabling a wide range of new ADC platforms to be built such as the MISRC.
cvbs-decode
is included inside the vhs-decode install, and is ready to go on self-contained builds.
However for Linux you might need to do:
python3 setup.py build_ext --inplace
That's it you are ready to use CVBS-Decode!
Currently, this decoder will work just fine with stable signals and live media.
Warning
Sample/frequency rate of input File & TV System is required for the decoder to work.
Note
-A
is mandatory for CVBS-Decode to work currently.
Example Usage Command:
cvbs-decode --frequency 28 --pal -A composite-test_28msps_8-bit.u8 composite-test
To stop the decode press Ctrl+C
Command List
Click the here for the full list for all decoders, the below are just usage commands only for CVBS-Decode.
Just like vhs-decode & ld-decode the default is 40msps 8-bit/10-bit/16-bit input.
Captures can be FLAC compressed (.cvbs) or Uncompressed .u8/u16 etc
-f
Frequency Adjust in integers of hz, mhz, ghz or 4fsc/5fsc/8fsc/10fsc
--cxadc
28.6 MHz/8-bit (8fsc) Stock Crystal Native 8xFsc 8bit Unsigned Sampling Mode
--cxadc3
35.8 MHz/8-bit (10fsc) Stock Crystal Native 4xFsc 16bit Filtered Vertical Blanking Interval Data (Not Recommended for capture due to up-sampling)
--10cxadc
14.3 MHz/16-bit (4fsc) Stock Crystal 1.25x 8xFsc 8bit Unsigned Sampling Mode
--10cxadc3
17.9 MHz/16-bit (5fsc) Stock Crystal 1.25x 4xFsc 16bit Filtered Vertical Blanking Interval Data
-n
NTSC
--NTSCJ
NTSC-J
-p
PAL
--pm
PAL-M
--debug
Enables debug detailed logging output.
-A
Automatic Sync Detection (Currently Mandatory For CVBS-Decode to work)
-C
Clamp signal (black level) and enable automatic gain control.
-S
Seek Frame of Capture
--right_hand_hsync
Use right-hand horizontal sync detection.
--ct
Chroma Trap, cleans up chroma interference on the luma channel.
--sl
Defines sharpness by default this is set to 0. (0-100 Range)
--notch
Define the centre frequency for the optional built-in notch "bandpass" filter.
--notch_q
defines the Q factor Intended primarily for reducing noise from interference however, the decoder logic already compensates based on tape type and TV System values.
cvbs-decode only outputs 3 files
filename.tbc
- 4fsc Luminance & Chrominance Image Data
filename.tbc.json
- Frame Descriptor Table (Resolution/Dropouts/SNR/Frames/VBI Data)
filename.log
- Timecode Indexed Action/Output Log
ld-analyse composite.tbc
The TBC-Video-Export tool will automatically detect NTSC/PAL input, it can also run ld-dropout correct
& ld-process-vbi
and will embed the updated .json file inside the mkv, and export a FFV1 10-bit 4:2:2 interlaced file, read the wiki doc for detailed use of its profiles.
Linux, MacOS & Windows:
tbc-video-export composite-test.tbc
Note
You can also manually export via the chroma-decoder directly for any single composite type .tbc media type such as LD/CVBS/SMPTE-C.
The Composite signal is stored in a single .tbc
This is a lossless digital file of the entire baseband composite signal like a D2/D3 digital tape.
Full 4fsc 1135x625 PAL (17727262 hz) (25i) (4.2GB/min) (560mbps)
Full 4fsc 910x525 NTSC (14318181 hz) (29.97i) (3.4GB/min) (453mbps)
-
Chroma issues with NTSC VHS use
ntsc-phase-comp
with chroma-decoder. -
CVBS-Decode is not like ld-decode or vhs-decode so highly unstable sources will most likely require tinkering.
- FAQ - Frequently Asked Questions
- Diagram Breakdowns
- Visual-Comparisons
- VCR Reports / RF Tap Examples
- Download & Contribute Data
- Speed Testing
- Visual VBI Data Guide
- Closed Captioning
- Teletext
- WSS Wide - Screen Signalling
- VITC Timecode
- VITS Signals
- XDS Data (PBS)
- Video ID IEC 61880
- Vapoursynth TBC Median Stacking Guide
- Ruxpin-Decode & TV Teddy Tapes
- Tony's GNU Radio For Dummies Guide
- Tony's GNU Radio Scripts
- DomesDay Duplicator Utilities
- ld-decode Utilities