I recently bought

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.

  • TrollAccount69@lemmy.ml
    link
    fedilink
    arrow-up
    1
    ·
    edit-2
    2 hours ago

    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.

  • apparia@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    3 hours ago

    I’m no expert but I believe ffmpeg will be using the rawvideo decoder to read that file. If it appears to work I guess the stream output by v4l2-ctl happens 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-ctl writing 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-ctl directly into ffmpeg.