I'm trying to archive some old video tapes and laserdiscs.
Here's what I have so far for an analog2theora script:
#!/bin/sh
if [ $# -lt 2 ]
then
echo "Usage: analog2theora out.ogv seconds"
exit
fi
vlc -v "v4l2:///dev/video0:fps=29.97" :v4l2-width=640 :v4l2-height=480 :norm=ntsc :input-slave="alsa://hw:0,0" :v4l2-standard=NTSC :vout-filter=crop :crop-geometry="626x288+10+94" --sout="#transcode{vcodec=theo,vb=800,scale=1,deinterlace=0,acodec=vorb,ab=128,channels=2,samplerate=48000}:standard{access=file,mux=ogg,dst='${1}'}" --run-time=${2} --sout-transcode-fps=30 --sout-transcode-crop-geometry="626x288+10+94"
It's not cropping. But I'm unclear how the pipeline works: do I have to force it to crop before passing it to sout? I tried a bunch of variants to try to do that (put it before sout, after, use the double-dash options or the colon options, ...)
For just cropping and watching the video, this works:
vlc v4l2:// :input-slave="alsa://hw:0,0" --vout-filter=crop --crop-geometry="626x288+10+94"
but how do I get it encoded _after_ being cropped?
My earlier method:
transcode -x v4l2,v4l2 -M 2 -i /dev/video0 -p /dev/dsp -y ffmpeg -F msmpeg4v2 -c 0-${2}:00 -g 640x480 -f 0,4 -I 5 -Q 5 -E 48000,16,2 --lame_preset medium -o ${1}
has suddenly stopped capturing audio; that was after emerge -avuND world (I'm on gentoo), so everything should be up-to-date now and vlc is version 1.0.6. When using transcode instead of vlc, it's not clear how to specify an alsa device for input. It is also not clear now to generate h264 or theora output, which is why I was putting up with mp4 in AVI container. Most of the examples on the web seem to be the vlc --sout variety rather than the direct transcode variety. All very confusing. I've spent several days on this stuff now and still just as lost.