A Simple TBC playback utility, currently only CLI (Command Line Interface)
This will later be both GUI/CLI.
Its a digital Time Base Corrected lossless 16-bit video file thats in 1 file for Composite streams and 2 files for S-Video streams.
Via VHS-Decode (Tape Decoding) and LD-Decode (LaserDisk Decoding) or CVBS-Decode (Composite Decoding)
VGA to RCA Aliexpress
VGA to BNC Male/Female Amazon UK / Amazon USA
Red - Right Audio
Blue - Left Audio
Green - Composite Video
Green - Lumanace Y
Blue - Chroma C
Red - Mono/Mono Mix Audio
Simply download the latest Windows Release.
Decompress the .zip file.
For GUI users
Open the fl2k_2.bat file.
For CLI users
Open an CMD Window and open the directory with CD once inside simply use fl2k-tbc-player.exe to open the software.
sudo apt-get install libusb-1.0-0-dev
Install the libusb headers if not already present
git clone https://gitea.osmocom.org/sdr/osmo-fl2k mkdir osmo-fl2k/build cd osmo-fl2k/build
cmake ../ -DINSTALL_UDEV_RULES=ON make -j 3 sudo make install sudo ldconfig
Before being able to use the device as a non-root user, the udev rules need to be reloaded:
sudo udevadm control -R
sudo udevadm trigger
git clone https://github.com/vrunk11/fl2k_2/.git fl2k-tbc-player
To enter into the install directory use CD
cd fl2k-tbc-player
Compile the player with
sudo compile.sh
Run the software with
./fl2k_2 [arguments]
Support yet to be Implimented.
As its an VGA R-G-B adapter so there is 3 ADC's
To play a file on an ADC channel you do -R for red -G for green and -B for blue
For the Samplerate/TV System you can do -s ntsc
or -s pal
Currently to make tbc playback possible you need to do the 16 to 8 bit conversion with:
-R16 for red -G16 for green -B16 for blue
Also needed is removal of the extra line on each frame:
-tbcR for red -tbcG for green -tbcB for blue
For windows just use fl2k_2.exe
Linux:
./fl2k_2 -u -s ntsc -G16 -tbcG -R example.tbc
Windows:
fl2k_2.exe -u -s ntsc -G16 -tbcG -R example.tbc
Linux:
./fl2k_2 -u -s pal -G16 -tbcG -R example.tbc -B16 -tbcB -B example_chroma.tbc
Windows:
fl2k_2.exe -u -s pal -G16 -tbcG -R example.tbc -B16 -tbcB -B example_chroma.tbc
-d
device_index (default: 0)
-readMode
(default = 0) option : 0 = multit-threading (RGB) / 1 = hybrid (R --> GB) / 2 = hybrid (RG --> B) / 3 = sequential (R -> G -> B)
-s
samplerate (default: 100 MS/s) allows you to change TV System -s ntsc
or -s pal
-u
Set sample type to unsigned
-R
filename (use '-' to read from stdin)
-G
filename (use '-' to read from stdin)
-B
filename (use '-' to read from stdin)
-R16
(convert bits 16 to 8)
-G16
(convert bits 16 to 8)
-B16
(convert bits 16 to 8)
-tbcR
interpret R as tbc file
-tbcG
interpret G as tbc file
-tbcB
interpret B as tbc file
-CgainR
Control Signal Gain Level
-CgainG
Control Signal Gain Level
-CgainB
Control Signal Gain Level
You might see this in Linux:
Allocating 6 zero-copy buffers libusb: error [op_dev_mem_alloc] alloc dev mem failed errno 12 Failed to allocate zero-copy buffer for transfer 4
If so then you can then increase your allowed usbfs buffer size with the following command:
echo 0 > /sys/module/usbcore/parameters/usbfs_memory_mb
Falling back to buffers in userspace Requested sample rate 14318181 not possible, using 14318170.000000, error is -11.000000
When the end of the file is reached you will see in CLI:
(RED) : Nothing more to read
Also, to enable USB zerocopy for better I/O stability and reduced CPU usage:
echo 0 > /sys/module/usbcore/parameters/usbfs_memory_mb
And reboot. This was added to the kernel back in 2014. The default buffer size is 16.