[MPlayer-dev-eng] [PATCH] v4l capture RC1(?)
Jindrich Makovicka
makovick at KMLinux.fjfi.cvut.cz
Sat Aug 10 11:14:00 CEST 2002
On Fri, Aug 09, 2002 at 09:34:10PM +0200, Gábor Lénárt wrote:
> mencoder -tv on:driver=v4l:width=384:height=288:outfmt=rgb24:norm=PAL \
> -oac mp3lame -ovc lavc -lavcopts vcodec=mpeg4 -o /tmp/tv.avi
1) Do NOT use rgb colorspace, it's a waste of cpu cycles. Everything finally
converts to yv12.
2) It is necessary to specify an audio codec explicitly.
This is the script I currently use for capture ($1=filename, $2=video bitrate).
the -oac and -lameopts are relevant to audio encoding (see docs for more)
#!/bin/sh
nice -n -10 mencoder -v -tv on:driver=v4l:width=768:height=576:outfmt=i420
-vc rawi420 \
-ovc lavc -lavcopts vcodec=mpeg4:vbitrate=$2 \
-oac mp3lame -lameopts cbr:br=64 \
-vop crop=720:540:24:18,pp -npp lb -o "$1"
>
> The result AVI file does not contain any audio, since mplayer said when
> I played /tmp/tv.avi:
>
> AVI_NI: No Audio stream found... ->nosound
> AVI: No Audio stream found... ->nosound
>
> And mencoder dumps a tons of messages till encoding:
>
> Invalid frame duration value ( nan/ nan => nan). Defaulting to 0.040 sec.
> (and sometimes very strange fast-motion effects ;-)
I'll have a look.. I guess that mencoder doesn't read any audio in this case
but the audio capture thread runs, which makes the a/v sync go completely
nuts...
>
> If I specify noaudio as a -tv suboption no more these messages though no
> audio either of course :) [playing speed is correct though]
>
> Another interesting information: mencoder mutes volume setting of TV card,
> at least it's on 0% when launching fbtv after a mencoder try.
Yes, it's a feature. I added this because all my tv applications turned the
volume on after start and off on exit. I didn't like when I finished
encoding and the tv audio was still heard.
>
> It's a Pinnacle PCTV Studio card with standard Linux 2.4.18 v4l drivers.
>
> - Gábor (larta'H)
> _______________________________________________
> MPlayer-dev-eng mailing list
> MPlayer-dev-eng at mplayerhq.hu
> http://mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
--
Jindrich Makovicka
More information about the MPlayer-dev-eng
mailing list