-
Notifications
You must be signed in to change notification settings - Fork 54
TBC to Video Export Guide
Back Page RF Capture Decoding Guide
Forward Page Post-Processing Guide
This is the part ware you take your luma & chroma data to the ld-chroma-decoder
which combines it and then decodes it to a RGB or YUV stream with FFmpeg
using the merge planes function resulting in a final colour video stream that is encoded to FFV1 or to any other FFmpeg supported output you wish to use from the pre-made profiles.
You can add your own encoding profiles in the tbc-video-export.json
file.
Key Secondary Guide Read Pre-Export LD-Analyse Guide Here
Colour-Under formats VHS, BetaMax, Video8, Hi8
etc are 2 .tbc files a Y/C set.
CVBS formats LaserDisc, SMPTE 1" Type C
are 1 single .tbc file.
Always backup & keep your .log
& .json
files even if you delete your TBC files after you are happy with your export these still contain key metadata.
Linux & MacOS
python3 tbc-video-export.py Input-Media.tbc
Windows
tbc-video-export.exe Input-Media.tbc
The default export will make a Interlaced Top Field First, FFV1 10-bit 4:2:2 video file with FLAC audio.
(roughly 70-100 Mb/s), this also applies if you bind drag and drop your file on the windows exe version, ideal for footage without VBI data, but will require de-interlacing for online use.
- .tbc and extensionless file input
- Automatic Timecode from VITC
- Audio Language & Track Name setting Support
- PCM Audio profiles for editing support
- Lossless compressed FFV1 Profiles
- ProRes HQ & 4444XQ Profiles
- V210 & V410 Uncompressed Profiles
- AVC/H.264 & HEVC/H.265 De-interlaced Web Profiles
The python script will take your filename.tbc
& filename_chroma.tbc
and any metadata from the .json
and create video files for the PAL or NTSC system automatically, and will set timecode based off VITC data if present.
FFmpeg profile based de-interlacing can be done with bwdif
& w3dif
(see .json formatting for how to apply it to new profiles) for 50p/59.94p progressive files although QTGMC is recommended for the best results today.
NOTE progressive will be 2x the size of interlaced files.
Define your profile with for example: --ffmpeg-profile ffv1_8bit_pcm
Profile Name | Codec | Compression Type | Bit-Depth | Chroma Sub-Sampling | Audio Format | Container | File Extension | Bitrate |
---|---|---|---|---|---|---|---|---|
ffv1 | FFV1 | Lossless Compressed | 10-bit | 4:2:2 | FLAC Audio | Matroska | .mkv | 70-100mbps |
ffv1_8bit | FFV1 | Lossless Compressed | 8-bit | 4:2:2 | FLAC Audio | Matroska | .mkv | 40-60mbps |
ffv1_pcm | FFV1 | Lossless Compressed | 10-bit | 4:2:2 | PCM Audio | Matroska | .mkv | 70-100mbps |
ffv1_8bit_pcm | FFV1 | Lossless Compressed | 8-bit | 4:2:2 | PCM Audio | Matroska | .mkv | 40-60mbps |
prores_hq_422 | ProRes HQ | Compressed | 10-bit | 4:2:2 | PCM Audio | QuickTime | .mov | 55-70mbps |
prores_4444xq | ProRes 4444XQ | Compressed | 10-bit | 4:4:4 | PCM Audio | QuickTime | .mov | 80-110mbps |
v210 | V210 | Uncompressed | 10-bit | 4:2:2 | PCM Audio | QuickTime | .mov | 200mbps |
v410 | V410 | Uncompressed | 10-bit | 4:4:4 | PCM Audio | QuickTime | .mov | 400mbps |
x264_web | AVC/H.264 | Lossy | 8-bit | 4:2:0 | AAC Audio | QuickTime | .mov | 8mbps |
x265_web | HEVC/H.265 | Lossy | 8-bit | 4:2:0 | AAC Audio | QuickTime | .mov | 8mbps |
We have implemented ProRes & PCM audio modes for better support in NLEs such as Davinchi Resolve.
NOTE You can make/share you own FFmpeg profiles by editing the tbc-video-export.json
as needed.
Change python3 tbc-video-export.py
to tbc-video-export.exe
if you have issues with python locally on windows, but both should work if python3 is installed.
For video editing ProRes 4444XQ is a near lossless editing codec.
python3 tbc-video-export.py --ffmpeg-profile prores_4444xq example_decoded_media
For use on Odysee
You can pick either x264_web
or x265_web
depending on how much system/client support of streaming you want.
python3 tbc-video-export.py --ffmpeg-profile x264_web example_decoded_media
For use on Vimeo for example you can use FFV1 de-interlaced fpr YouTube, this also requires upscaling to there 2160p bracket to prevent low quality encoding as there SD modes are useless.
python3 tbc-video-export.py --ffmpeg-profile prores_hq example_decoded_media
Notes
YouTube re-encodes with black bias macro-blocking encoding on SD to 1080p, upscaling to 2160p encode bracket is required for clear resolving of analogue noise.
Odysee uses direct streaming, no transcode/re-encoding so care has to be taken with client side playback issues, i.g non phone users.
This is done via the ld-chroma-decoder
& then piped to FFmpeg
directly which can be done in one command.
Replace INPUT.tbc
& OUTPUT.mkv
with your respective input file and desired output file name.
Basic FFV1 10-bit 4:2:2 Export:
NTSC:
ld-chroma-decoder --decoder ntsc3d -p y4m -q INPUT.tbc| ffmpeg -i - -c:v ffv1 -level 3 -coder 1 -context 1 -g 1 -slicecrc 1 -vf setfield=tff -flags +ilme+ildct -color_primaries smpte170m -color_trc bt709 -colorspace smpte170m -color_range tv -pix_fmt yuv422p10le -vf setdar=4/3,setfield=tff OUTPUT.mkv
PAL:
ld-chroma-decoder --decoder transform3d -p y4m -q INPUT.tbc| ffmpeg -i - -c:v ffv1 -level 3 -coder 1 -context 1 -g 1 -slicecrc 1 -vf setfield=tff -flags +ilme+ildct -color_primaries bt470bg -color_trc bt709 -colorspace bt470bg -color_range tv -pix_fmt yuv422p10le -vf setdar=4/3,setfield=tff OUTPUT.mkv
Converting your Y/C (S-Video) TBC files media.tbc
& media_chroma.tbc
to usable colour video files is done via script.
Basic Use:
python3 tbc-video-export.py INPUT (.tbc file name without .tbc)
Command Examples:
python3 tbc-video-export.py -v -s <skip number of frames> -l <number of frames long> -i <.tbc filename without .tbc extension>
The -a
option can embed an audio file, such as audio decoded via HiFi Decode
python3 tbc-video-export.py -v -s <skip n frames> -l <n frames long> -a <capture>.flac -i <.tbc filename without .tbc extension>
So for example open terminal in the directory of target TBC/Metadata files and run
python3 tbc-video-export.py -v -s <skip n frames> -l <number of frames long> -a <capture>.flac -i <.tbc filename without .tbc extension>
python3 tbc-video-export.py input-tbc-name
--letterbox
Can be used or you can use the manual commands below
PAL:
python3 tbc-video-export.py --ffll 2 --lfll 308 --ffrl 118 --lfrl 548 <tbc-name>
NTSC:
python3 tbc-video-export.py --ffll 2 --lfll 308 --ffrl 118 --lfrl 453 <tbc-name>
These commands work well for 16:9 widescreen letterbox crop tapes rendering only the centre making a 928x432 PAL
& 760x432 NTSC
Image ideal for scaling/de-interlacing to 720p 50/59.94p for Blu-Ray mastering.
Active + VBI Area Export
This is not perfect currently due to the lack of horizontal adjustment, this produces an full-vertical image frame allowing you to visually see VBI data, however, if your image is not centred properly this may crop the data.
--vbi
Can be used or you can use the manual commands below
PAL:
python3 tbc-video-export.py --ffll 2 --lfll 308 --ffrl 2 --lfrl 620
NTSC:
python3 tbc-video-export.py --ffll 1 --lfll 259 --ffrl 2 --lfrl 525
These set your output to give you a full vertical image with the VBI area 928x624 PAL
/ 760x528 NTSC
You can also crop to IMX height 928x608 PAL
/ 760x512 NTSC
We recommend Media Player Classic & VLC
Due to video displays on TVs and PC monitors using different levels, you need to convert 16-235
to 0-255
this can be done via a simple shader filter in MPC for example.
With 0-255
PC Levels
With 16-235
TV Levels
DaVinchi Resolve (Curve Adjustment)
(NOTE BetaMax media releases will have ColourBars at the start for reference use with a vectorscope)
Depending on the colour accuracy of your display these images can look bright white in the yellows this is called white level clipping
you need to adjust your display.
The example here is 2 sRGB photos taken of 2 displays
Today de-interlacing is not a daunting task hard or complex just requires correct handling.
Interlaced video is 2 fields of information that are timed together to make a solid picture to the human eye, ware as progressive video is a solid single frame followed by the next, every single frame is its own picture.
Instead of wasting time like most YouTube videos will do, 90% of the time today you will use QTGMC, most people used to use dedicated scripts, but today script loading software like StaxRip combine multiple tools and have a very simple and easy to edit workflow alongside telling you what's broken when mistakes are made.
Analogue is always top field first or TFF, ware as digital tapes are almost always bottom field first or BFF.
Tapes are 25i PAL / 29.97i NTSC ---> Deinterlacing --> 50p PAL / 59.94p NTSC
(60i or 30i etc does not exist for analogue formats, it's always 25i PAL 29.97i NTSC)
Movies, Anime etc are 12p and 24p content and can use the IVTC/Anime IVTC filters.
StaxRip - Your new best media friend
Pre-Made StaxRip Bundle V0.3 - Windows
(Linux & Wine setup guide coming soon.... here is everything you need up-front one simple windows package with a set of basic templates and a handy list of encoding profiles)
StaxRip has FFmpeg, Avisynth+, Vapoursynth and over 40 tools for muxing, subtitling, and audio timing but one thing it has always provided is a decent visual cropping tool and simple start/end cut mode for the most basic of editing.
It's not a 1-click encoder it's a 5 click and your done encoder.
There are templates for drag and drop de-interlacing & upscaling.
Profiles for NTSC & PAL with FFV1/ProRes/V210/V410 progressive & interlaced export are available.
PAL:
NTSC FFV1 to ProRes HQ Progressive:
Top Left - Input file & info about file
Top Right - Output file & info about file (Turns red on render finish)
Bottom Left - Your filters (manipulators for video)
Centre - Resolution & Aspect ratio control
Bottom - First 2 Audio tracks (4 Channels in 2 stereo tracks is all analogue has anyways)
Crop - This lets you crop using a mouse wheel or dragging margin (to the pixel level of control)
Cut - Preview --> Set your playing position --> HOME for the start point and END for stop point.
If you set multiple cut points it will chop the video up into one cut with those scenes.
If using profiles you only need to flag the aspect ratio correctly before export as this can change sometimes.
For 4:3 this will in most cases be DAR: 1.363636
/ SAR: 1.25
/ PAR: 12:11
inside StaxRip.
In FFmpeg directly this is -aspect 1.333333
for 4:3 for example
Breakdown:
1.333333
= 4:3 (Full-Frame with 4:3 as well)
1.777777
= 16:9 (Letterbox Crop or Anamorphic)
1.255555
= 5:4
1.555555
= 3:2 (Full Frame with 16:9 Media)
For direct Blu-Ray & DVD mastering ProRes HQ is recommended and supported directly by Sony DVD Architect.
python3 tbc-video-export.py --ffmpeg-profile prores_hq example_decoded_media
ProRes HQ
--> DVD Architect
--> Master.iso
--> dvdisaser Embed ECC Data
--> Burn to Disc
--> Verify
--> Physically Store
While Blu-Ray is modern defacto due to disc size/cost and better bitrate support we understand DVD is still used.
We are also working on manual encode DVD/BluRay profiles for both NTSC & PAL regions.
Sony DVD Architect
is the last easy to get ''it works'' tool for creating complient Blu-Rays takes ProRes HQ that is properly encoded with FFmpeg directly and does not make any compliancy errors that players or software players made in the last 10 years or so should run into.
We recommend use of genunine DataLifePlus/M-Disc/DM-Archive/Sony 128GB optical discs which are archival grade using high quality molding and in-orgnaic layers.
This is for altering the flagging data inside the mov
, mp4
& mxf
containers.
This is the reason why proper mastered media will only show above the active headswich area when displayed on a TV/System with standard video flag support.
AMCDX Video Patcher Live Link / Archive Link This tool is dead simple to use and allows you to correctly flag recordings colour/timecode information, this allows files to be hardware & industry standard software compatible.
Example of a blank and correctly flagged progressive exports for NTSC & PAL using ProRes HQ / V210.
Blank:
PAL:
NTSC:
Credit goes to Jitterbug / Video Dump Channel for making the new Python script.
Credit goes to Wrapscallion (Ty)
on the DD86 Discord for showing me this truly invaluable and easy-to-use cross-platform tool.
Back Page RF Capture Decoding Guide
Forward Page Post-Processing Guide
- 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