[MEncoder-users] Usage of -ofps

Giacomo Comes comes at naic.edu
Mon Oct 22 03:27:38 CEST 2007


On Sun, Oct 21, 2007 at 06:51:46PM +0200, Bj?rn Nadrowski wrote:
> Hello, 
> I would like to ask a question concerning the use of -ofps
> 
> Let's suppose I want to prepare a movie for my nokia e90's
> internal realplayer.
> In order to do this, I use the following commands:
> 
> V_BITRATE=800
> X_SCALE=640
> Y_SCALE=352
> V_NAME=film.avi
> BASENAME=`echo ${V_NAME} | cut --delimiter='.' --fields=1`
> 
> mencoder -ofps $FPS -o temppi.m4v -of rawvideo \
> 		    -oac copy -ovc lavc -lavcopts vcodec=mpeg4:vbitrate=${V_BITRATE}:threads=2 \
> 		    -vf lavcdeint,scale=${X_SCALE}:${Y_SCALE} -lavdopts threads=2 \

  		    -vf lavcdeint,scale=${X_SCALE}:${Y_SCALE},harddup -lavdopts threads=2 \

should fix the problem

Giacomo

> 		    ${V_NAME}
> 
> mplayer -vo null -vc null -ao pcm:fast ${V_NAME}
> faac --mpeg-vers 4 audiodump.wav
> 
> MP4Box -new -add temppi.m4v -add audiodump.aac -fps $FPS \
>    -brand mp42 -isma ${BASENAME}${1}-${V_BITRATE}-${FPS}-${X_SCALE}.mp4
> 
> Audio is always fine and faac results into an audio track which has a duration of
> 2597.2 seconds, which is only 0.1 seconds longer than the film
> (deduced using mplayer -v:)
> ==> Found video stream: 0
> ====== STREAM Header =====
> Type: vids   FCC: xvid (64697678)
> Flags: 0
> Priority: 0   Language: 0
> InitialFrames: 0
> Rate: 24000/1001 = 23.976
> Start: 0   Len: 62269
> Suggested BufferSize: 90898
> Quality 10000
> Sample size: 0
> ==========================
> and 
> 62269/23.976=2597.13880547214
> 
> 
> 
> Now, above commands seem ok for values of FPS < 23;
> for this range of values, the length of the video matches closely the length 
> of the audio track. 
> However, when approaching FPS=24, the video becomes shorter and shorter,
> leading to very substantial audio/video desync, for extreme values, the video 
> even plays back in a visibly accelerated speed. 
> 
> Is this the expected behavior?
> I have no idea where this comes from , and would like to know the commands which 
> allow me to specify the FPS value I want (well, it would be sufficient to
> know the commands which allow encoding without audio/video desyncing; but not using
> ofps and FPS at all does not resolve the problems, in this case, the video is 10 minutes
> shorter than the original one...)
> 
> I attach a list of FPS - Duration values, 
> which I obtained for a series of encodings using different values of FPS and
> I extracted the duration of the movie using
> MP4Box -info film.mp4
> 
> I also attach a figure which displays this curious behavior. 
> 
> THanks for any help, Bjoern
> 
> #FPS   Duration
> 10.0	2597.2
> 10.5	2597.14
> 11.0	2597.18
> 11.5	2597.22
> 12.0	2597.17
> 12.5	2597.2
> 13.0	2597.15
> 13.5	2597.18
> 14.0	2597.14
> 14.5	2597.17
> 15.0	2597.13
> 15.5	2597.1
> 16.0	2597.06
> 16.5	2596.97
> 17.0	2596.82
> 17.5	2596.8
> 18.0	2596.5
> 18.5	2596.43
> 19.0	2596.26
> 19.5	2596.26
> 20.0	2596.1
> 20.5	2595.85
> 21.0	2595.71
> 21.5	2595.63
> 22.0	2595.59
> 22.5	2595.33
> 23.0	2595.48
> 23.5	2595.23
> 24.0	2592.08
> 24.5	2539.18
> 25.0	2488.4
> 25.5	2439.61
> 26.0	2392.69
> 26.5	2347.55
> 27.0	2304.07
> 27.5	2262.18
> 28.0	2221.78
> 28.5	2182.81
> 29.0	2145.17
> 29.5	2108.81
> 30.0	2073.67
> 30.5	2039.67
> 31.0	2006.77
> 31.5	1974.92
> 32.0	1944.06
> 32.5	1914.15
> 33.0	1885.15
> 33.5	1857.01
> 34.0	1829.7
> 34.5	1803.19
> 35.0	1777.43
> 35.5	1752.39
> 36.0	1728.06
> 36.5	1704.38
> 37.0	1681.35
> 37.5	1658.93
> 38.0	1637.11
> 38.5	1615.84
> 39.0	1595.13
> 39.5	1574.94
> 


> _______________________________________________
> MEncoder-users mailing list
> MEncoder-users at mplayerhq.hu
> http://lists.mplayerhq.hu/mailman/listinfo/mencoder-users

-- 



More information about the MEncoder-users mailing list