1
I would like to digitalize old VHS casettes with EasyCAP STK1160 under linux. The composite video input is /dev/video1
, and hw:2,0
is for its the USB ALSA composite two-channel audio.
For capturing the streams in raw format, I use:
ffmpeg -f alsa -ac 2 -i hw:2,0 -f rawvideo -r 25 -s 720x576 -i /dev/video1 -codec:a pcm_s16le -codec:v rawvideo -f rawvideo raw_streams.raw
For encoding the raw file to h264 in two pass, I use:
time ffmpeg -f rawvideo -codec:v rawvideo -s:v 720x576 -r 25 -pix_fmt yuyv422 -deinterlace -i raw_streams.raw -pass 1 -codec:v libx264 -codec:a libfdk_aac -b:a 128k -preset ultrafast -y -b:v 6100k -f mp4 /dev/null
time ffmpeg -f rawvideo -codec:v rawvideo -s:v 720x576 -r 25 -pix_fmt yuyv422 -deinterlace -i raw_streams.raw -pass 2 -codec:v libx264 -codec:a libfdk_aac -b:a 128k -preset ultrafast -y -b:v 6100k -f mp4 "final.mp4"
Question #1: The resulting encoded .mp4 has good video, but no sound. How do I add the sound channel to the raw file and then to the mp4? Succesfully capturing only the sound with the following command shows that there is sound on the line in.
ffmpeg -f alsa -i hw:2,0 output.wav
Question #2:
How do I specify PAL-B to be the video capturing format for the raw video? man ffmpeg
does not seem to have any information on this matter.
Question #3: Since not all the casettes have recordings on their entire length, I would also like to view the live stream while capturing so that I know when to stop. I do this with:
mplayer -fps 25 tv:// -tv driver=v4l2:device=/dev/video1
I either view the stream or capture. Trying to do both of them produces the following error: /dev/video1: Device or resource busy
How can I do these things simultenously?