I recently bought
- a PCIe expansion card for FireWire (1394a and 1394b) capture
- a PCIe expansion card for component video, composite video, VGA and DVI-I capture
- an nvidia GT 220 GPU to make room in my chassi for the other two cards, because my ASUS TUF Gaming GeForce RTX 3080 OC Edition 12GB GDDR6X’s big butt was in the way.
The goal is to help mom and dad to digitize old VHS, VHS-C, Mini DV and audio cassette tapes. The above expansion cards will arrive sometime next week and meanwhile, I have been doing some research on ffmpeg and v4l2-ctl. It’s absolutely amazing how much you can do - or could do - with ffmpeg if you had about two-three lifetimes to learn. 🤣
Anyway, using a cheap HDMI to USB video capture dongle, I have successfully captured some video with v4l2-ctl -d /dev/video0 --stream-mmap --stream-to=video.raw --stream-count=100 and then converted it using ffmpeg -i video.raw video.mkv.
I am really interested in what this .raw file is, but all I could find was this, which seems to pertain to raw image files, rather than what v4l2-ctl outputs.
I tried to do some Ctrl+f searches on Video for Linux API, but this was far beyond what I was able to comprehend. On the other hand, the manual is far too “shallow” and doesn’t explain much. Do you have any recommendations on what to read in order to understand a little bit more about the inner workings without having to take a PhD in how Linux does video? Why are these .raw files so big? What is the difference between them and the standard containers (.mkv, .mpeg, .avi etc.)?
Also, a huge bonus if you can find the time and will to point out any rookie mistakes in the digitizing project itself.
The person who said file and mediainfo put you on the right track. You’ll figure it out.
The video tapes do a somewhat decent job of correcting their own instability but cassette players need to be adjusted for wow and flutter as well as head azimuth. Make sure you’re using a player that supports the tape type and noise reduction scheme as well.
E: you may need to fiddlefuck around to get good capture from that star tech card. Or maybe it’s fine to you.
I’m no expert but I believe
ffmpegwill be using therawvideodecoder to read that file. If it appears to work I guess the stream output byv4l2-ctlhappens to match up closely enough with the default parameters listed in that doc, you may want to work out what it is and double check compatibility though.The difference from a regular container is that it’s uncompressed (hence the size) and can’t include any metadata (hence the need to specify parameters manually).
v4l2-ctlwriting in this format means it doesn’t need to worry about compressing and encoding the video on-the-fly, which would complicate the implementation and might not always be feasible in real-time.If you wanted to avoid the intermediate file you should be able to pipe
v4l2-ctldirectly intoffmpeg.Have you tried throwing
fileand/ormediainfocommands at those files?I completely forgot about
fileand didn’t know ofmediainfo. I’ll try! 😁
What does
v4l2-ctl -d /dev/video0 --alltell you?Uhm, well, my analog capture cards haven’t arrived yet and I have put away the little dongle, so I won’t be able to answer that today/tonight. 🙏


