cxadc-linux3 icon indicating copy to clipboard operation
cxadc-linux3 copied to clipboard

Playing back output

Open tony4212 opened this issue 1 year ago • 4 comments

After installing the drivers and running the following two commands: sudo echo 1 >/sys/class/cxadc/cxadc0/device/parameters/vmux timeout 10s cat /dev/cxadc0 |pv > CX_Card_28msps_8-bit.u8

I get a file output, but I am not sure how to convert it to play back the video output that it should have captured. I tried opening the file in virtualdub and staxrip with no success. The card I have is the CX25800 white variant unmodified. The setup I have is using a VHS player with the RCA video cable hooked up in the back and connected to the AV port on the card.

Card: CX25800 white variant unmodified OS: Ubuntu server 22.04.3

I know I am missing something, but I am not sure what it is.

tony4212 avatar Nov 25 '23 01:11 tony4212

@tony4212

CXADC is documented and maintained for capturing raw FM RF off test points primarily.

You just captured 28msps 8-bit RF to file.

CVBS (Composite Yellow RCA connector output) is not genreally captured due to lack of stability alongside practical archival use, when we can just sample the RAW FM which is the orignal signal and more compressable, and easy to get at on 99% of tape formats decks.

I think you skipped over a lot of documentation here... vhs-decode wiki.

You have to decode RF data into the TBC format then that gets chroma-decoded into YUV video files you can use with standard workflow, you can try decode your capture with CVBS-Decode, but it will mostlikey be a mess at stock settings.

harrypm avatar Nov 25 '23 01:11 harrypm

I am aware of documentation for the RAW FM, but I wanted to see what the output would look like before going through the trouble of trying to find a test point on the VHS player (not in the list of VHS players).

I know that isn't how the software was meant to be used. However, I figured that if the card can be made to output raw file, then might as well test it out to see what the card can even do on a stock VHS setup. I did try going through the normal commands for vhs-decode page, but when running the following command: ./vhs-decode --debug --ntsc--threads 4 --tape_format VHS --cxadc CX_Card_28msps_8-bit.u8 result

The script fails. With the following: Cannot build json: 'NoneType' object is not subscriptable I am guessing this is due to the fact that all fields are dropped since I am only giving it the signal from the RCA and not the RAW FM.

I'm currently trying your suggestion of using the CVBS-Decode.

tony4212 avatar Nov 25 '23 02:11 tony4212

@tony4212

What you captured is Baseband composite RF or just CVBS, VHS RF is FM modulated "FM RF" its a very big distinction to make as its the VCR processed signal which is the whole point of RF capture cutting that processing out of the equation but fair enough its fun to play with, this is the command you ideally want to use to start with:

./cvbs-decode --debug --ntsc -A --threads 4 --cxadc CX_Card_28msps_8-bit.u8 result

I just updated the CVBS-Decode page, and as you said your VCR is not in the tap list please do share model, and before/after photos of the RF tap, but the hardware guide covers every flavor of name and type of test point you will encounter.

If you do not have sixdb 0 and level 0 set for gain on the CX Cards it will go into re-sampling mode instead of constant raw output mode once a internal gain level is reached breaking the capture and resulting decode like so:

https://github.com/happycube/cxadc-linux3/assets/56382624/8f7ab75b-1023-42c6-a6cc-23fa74819a32

harrypm avatar Nov 25 '23 03:11 harrypm

That seemed to work, but I did notice some color issues along with the scan lines not always lining up. Will try a couple different tapes and VHS players to see if the issue is across the board. When trying to create the mkv I noticed the output kept saying "Field phaseID sequence mismatch". Not sure if that is related.

Also when looking at the output with ffplay I noted that it would create several duplicate images. Not sure if that is partly responsible. Changing levels outside of 0 made it worse. I am guessing that is what you were talking about.

tony4212 avatar Nov 26 '23 18:11 tony4212