On Thu, 27 Jan 2005, Lehmeier Michael wrote: > I record from a TV card with the following command: > mencoder -tv driver=v4l2:input=3:adevice=/dev/dsp:forceaudio tv:// -ovc > lavc -oac pcm -lavcopts vcodec=mpeg4:vbitrate=3000:keyint=50 -endpos > 700mb -vf pp=lb -o out.avi > > As a test I tried the following line: > lav2yuv out.avi | yuvscaler -O VCD | mpeg2enc -s -o mpg.mpg
lav2yuv only works on mjpeg avi files, it can't do other codecs like mpeg4. You need to use mplayer to generate the yuv4mpeg stream from the avi. mkpipe stream.yuv mplayer -vo yuv4mpeg:aspect=59/54 -nosound -benchmark -vf scale=352:288 out.avi & mpeg2enc -s -f 1 -o out.mpv < stream.yuv This will send yuv4mpeg output from mplayer into a pipe, which mpeg2enc will then read. This way you don't need the HUGE yuv file on disk. The scaler in mplayer is much much faster than yuvscaler, so use it with -vf scale and avoid calling yuvscaler. The aspect override requires a patch to mplayer that the mplayer people won't accept, so you'll probably want to omit it. Use the -n p -a 2 options in mpeg2enc to override the incorrect aspect info mplayer emits. To encode the audio, I've been doing this: mencoder -ovc frameno -oac toolame -toolameopts br=224 -o out.mpa.avi out.avi mplayer -dumpaudio -dumpfile out.mpa out.mpa.avi rm out.mpa.avi You can use lavc instead of toolame, but I've heard toolame is suposed to be better quality, while lavc is about twice as fast. You could always encoder to mp2 when you capture your tv program, instead of using pcm, if you have enough cpu for it. It seems that mencoder will only output an avi file, so you have to write an avi with the mpeg audio, then use mplayer to dump the audio out of the avi file. Once you have the mpa and mpv MPEG-ES files, you multiplex them a MPEG-PS file with mplex, and then that can be mastered into a vcd image with vcdimager. ------------------------------------------------------- This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting Tool for open source databases. Create drag-&-drop reports. Save time by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc. Download a FREE copy at http://www.intelliview.com/go/osdn_nl _______________________________________________ Mjpeg-users mailing list Mjpeg-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mjpeg-users