I have a very valuable french VHS tape and have been asked to digitize it with my USB capture device Terratec Grabby, but I have some unreliable although cleaned VHS players and I am uncertain to have the possibility to do many time as capture as I want due to the condition of the tape or player. Thus I am testing different software tools on other test tapes.
I discovered FFmpeg and its capabilities.
As I am beginner in the video domain, I searched and found some commands to apply nearly as-is which give a good result (see below) and I started to learn the tool.
I understand that the raw files would be divided in a video part and an audio part.
The goal is to get the command that will capture video and audio without losing a single frame in a single playback, assuming I can not repeat the operation later. This capture will not be modified later. It will remain to try different configurations and tools to encode the raw streams into the resulting video in order to find the best weight/quality ratio.
Thanks to @Bravo I found a way to do a raw digitizing but I do not found the way to encode it to have a workable video.
Here is the command to capture with preview (based to this post) which works perfectly which does not produce a raw file but a MKV file with loss:
ffmpeg -y \
-f v4l2 -standard SECAM -thread_queue_size 8192 -i /dev/video0 \
-f alsa -thread_queue_size 2048 -i hw:2,0 \
-vcodec libx264 -preset superfast -crf 23 -vf yadif=1 \
-acodec libmp3lame -b:a 128k -channels 2 -ar 48000 \
-f matroska pipe:1 OUT.mkv \
| ffplay -i pipe:0
Note: as I am a beginner I do not master all the parameters, maybe some are usefulness or unadapted.
Based on @Bravo remarks, I tried this command to get divided raw files:
ffmpeg -y \
-f v4l2 -standard SECAM -thread_queue_size 8192 -i /dev/video0 \
-f alsa -thread_queue_size 2048 -i hw:2,0 \
-vcodec rawvideo \
-acodec pcm_s16le \
-c:a copy OUT.wav \
-f matroska pipe:1 \
-f rawvideo OUT.264 \
| ffplay -i pipe:0
Note : the matroska stream is only for preview.
This produces a raw WAV PCM 16 bits file (648MB/h) and I suppose a raw H264 file (74GB/h), which gives approximately 120GB/h which attests me the data are raw.
I said "I supposed" because mediainfo does not return properties on this stream as it was a regular binary file:
$ mediainfo OUT.264
General
Complete name : ../OUT.264
File size : 815 MiB
I tried to encode the video and audio raw streams with this:
ffmpeg -y \
-i OUT.wav \
-f rawvideo -video_size 720x576 -i OUT.264 \
-f matroska result.mkv
But the result is not workable : only the audio seems OK but the video is problematic (as shown below).
The problematic encoded video:
Finally, I am not sure how to deal with the limitations of the USB 2.0 capture device, especially its capture rate, as I suspect it acts as a bottleneck for the accuracy and volume of captured stream data.
