[MPlayer-users] Recording from tv:// isn't realtime

Marc MERLIN marc_mplayer at merlins.org
Mon Jul 28 00:05:34 CEST 2014


On Wed, Jul 23, 2014 at 07:51:17PM +0200, Reimar Döffinger wrote:
> > time mencoder tv:// -tv driver=v4l2:norm=PAL:width=720:height=576:outfmt=uyvy:device=/dev/video1:input=0:fps=25:alsa:amode=1:forcechan=2:audiorate=48000:forceaudio:immediatemode=0 -ovc x264 -x264encopts threads=8:subq=5:8x8dct:frameref=2:bframes=3:b_pyramid=normal:weight_b -oac mp3lame -lameopts cbr:br=128   -o test.avi 
> > 
> > Setting audio delay to 0.080s.
> > Video stream:    6.387 kbit/s  (798 B/s)  size: 4056 bytes  5.080 secs  309 frames
> 
> This says 309 frames in 5 seconds. Which would be 60 fps.
> I don't have enough experience to be sure what causes this, but one
> possibility would be that even though you told it to use 25 fps, the
> driver actually gives you 60 fps, thus confusing MPlayer.
> This is consistent with you getting 20 seconds of output after 1 minute.
> The solution would be to set fps=60 in the tv:// but using -ofps 25 to
> make mencoder drop frames (if desired).

Just to be clear, did you want me to try this?
time mencoder tv:// -tv
driver=v4l2:norm=PAL:width=720:height=576:outfmt=uyvy:device=/dev/video1:input=0:fps=60:alsa:amode=1:forcechan=2:audiorate=48000:forceaudio:immediatemode=0
-ovc x264 
-x264encopts threads=8:subq=5:8x8dct:frameref=2:bframes=3:b_pyramid=normal:weight_b
-oac mp3lame -lameopts cbr:br=128   -ofps 25 -o test.avi

I added -ofps 25 and changed fps=60

I ran it 3 seconds of video in 7.8s of real time. Below are the last bits up to where 
I killed it.
It still shows 181 frames in 3 seconds, which indeed agrees with 60fps.

I'm actually ok with saving 60fps video even if PAL is really only 50fps interlaced.
Is there a way to adjust the params to make this work at 60fps? I tried changing
-ofps 60 but that didn't help.
Also note the "259 frames dropped"

Skipping frame!
^CPos:   3.0s    181f ( 0%) 24.58fps Trem:   0min   0mb  A-V:0.000 [3:128]

Flushing video frames.
Writing index...
Writing header...
ODML: vprp aspect is 16384:13107.
Setting audio delay to 0.080s.

Video stream:    7.242 kbit/s  (905 B/s)  size: 2752 bytes  3.040 secs  181 frames

Audio stream:  128.000 kbit/s  (16000 B/s)  size: 48000 bytes  3.000 secs
x264 [info]: frame I:1     Avg QP: 9.00  size:   848
x264 [info]: frame P:19    Avg QP: 9.37  size:    31
x264 [info]: frame B:56    Avg QP:12.68  size:    24
x264 [info]: consecutive B-frames:  1.3%  0.0%  3.9% 94.7%
x264 [info]: mb I  I16..4: 99.9%  0.0%  0.1%
x264 [info]: mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:  0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
x264 [info]: mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:  0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%
x264 [info]: 8x8 transform intra:0.0%
x264 [info]: coded y,uvDC,uvAC intra: 0.0% 0.1% 0.0% inter: 0.0% 0.0% 0.0%
x264 [info]: i16 v,h,dc,p: 97%  0%  3%  0%
x264 [info]: i4 v,h,dc,ddl,ddr,vr,hd,vl,hu:  0%  0% 100%  0%  0%  0%  0%  0%  0%
x264 [info]: i8c dc,h,v,p: 100%  0%  0%  0%
x264 [info]: Weighted P-Frames: Y:0.0% UV:0.0%
x264 [info]: kb/s:7.24
v4l2: 184 frames successfully processed, 259 frames dropped.

real	0m7.824s
user	0m0.616s
sys	0m0.092s

thanks,
Marc
-- 
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems ....
                                      .... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/                         | PGP 1024R/763BE901


More information about the MPlayer-users mailing list