Digitize a VHS tape with FFmpeg
On this thread, I found a perfect command to digitize a VHS tape with FFmpeg using a USB video grabber. All good with that; it works like a charm. Acceptable bitrate, no dropped frames and, most importantly, a good output file.
Working command:
ffmpeg \
-f v4l2 -standard PAL -thread_queue_size 2048 -i /dev/video1 \
-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 \
vhs_output.mov
Question: How to get a live preview?
I've read numerous threads talking about pipes and tee objects, but I still haven't figured out how to get a live preview.
My try for a ffplay pipe:
ffmpeg \
-f v4l2 -standard PAL -thread_queue_size 2048 -i /dev/video1 \
-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 \
vhs_output.mov \
-f h264 - | ffplay -
The problem with this command is that there are now two x264 encoders active. Secondly, the preview isn't as fluid as the output since there are now lot's of dropped frames. Where have I gone wrong? How can I reuse the first output? Raw piping isn't an option since ffplay can't handle it.