[MEncoder-users] Encoding iPhone MOV into MPEG-2 -- Video framerate is super fast!?
L Lee
llee040 at sbcglobal.net
Wed Nov 11 05:35:41 CET 2009
On 11/10/09 9:13 PM, "Jarred Nicholls" <jarred.nicholls at gmail.com> wrote:
> Hi everyone,
>
> Firstly I appreciate you all taking the time to help with this issue. Maybe
> it will stand out as an obvious or simple solution to someone.
>
> I am encoding a video taken from an iPhone 3GS (h.264 video, MOV container
> at 90 degree rotation/transformation matrix in the tkhd header). I have had
> troubles encoding this type of video into DVD compliant MPEG-2 video using
> mencoder (no issues with ffmpeg), but for this type of video I need mencoder
> strictly for the expand and rotate filters. The resulting MPEG-2 video is
> super fast (every 2 out of 5 frames are dropped/skipped when encoding) and
> the audio after muxed with the video is at its original speed. It's almost
> like the frame rate is super fast (~50+ fps), but definitely has something
> to do with the frames being dropped. MediaInfo reports the average fps is
> 19 (the video is variable fps).
>
> Here is the command I run:
>
> mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=dvd:tsaf -vf
> rotate=1,expand=720:480,harddup -srate 44100 -af lavcresample=44100
> -lavcopts
> vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=5000:keyint=18:v
> strict=0:acodec=ac3:abitrate=192:aspect=4/3
> -ofps 30000/1001 -o test2.mpg IMG_0018.MOV
>
> Here is a link to the source video and the result video respectively:
>
> http://www.bcam.org/tmp/IMG_0018.MOV
> http://www.bcam.org/tmp/test2.mpg
>
> I have tried several alterations to the command above. One in particular
> was to simply remove the explicit -ofps setting to see if it would simply
> keep the original video's framerate...and it errored out saying "MPEG1/2
> does not support 617/12 fps" which is approximately 51.41fps. This would
> explain the skipped frames and the video speed up, but why is it reading
> 51.41fps when the original video is (on average) only 19fps?
>
What happens if you add -mc 0.1 to the end of your command line?
Don't you want to crop vertically to preserve aspect ratio? Try
"crop=480:540:0:32" right after your "rotate" filter.
Laine Lee
More information about the MEncoder-users
mailing list