Opened 16 years ago
Last modified 13 years ago
#1273 new defect
mencoder encodes variable framerate MP4s to wrong rate
Reported by: | Owned by: | reimar | |
---|---|---|---|
Priority: | normal | Component: | demuxer |
Version: | HEAD | Severity: | normal |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Reproduced by developer: | no | Analyzed by developer: | no |
Description
When mencoder encodes a variable framerate MP4 to AVI, the resulting AVI is the wrong framerate.
libavformat populates r_frame_rate with the timebase of variable framerate MP4s (see https://roundup.mplayerhq.hu/roundup/ffmpeg/issue622 )
mplayer plays these back properly, even though it reports the framerate incorrectly e.g.
VIDEO: [mp4v] 320x240 24bpp 30000.000 fps 0.0 kbps ( 0.0 kbyte/s)
mencoder doesn't encode these properly. If encoding to AVI, it sets the framerate to 300000 and encodes a very short duration (few ms). If -ofps 15 is specified, the resulting AVI is 15fps but duration is still very short.
Sample videos were uploaded for issue622 above (15fps30000fps.mp4) and some existing videos in the samples:
http://samples.mplayerhq.hu/mobileVideo_3gp/no-sound-3gp.3gp
http://samples.mplayerhq.hu/mobileVideo_3gp/Video006.3gp
This results in a 5ms duration, 30000fps AVI:
mencoder 15fps30000fps.mp4 -v -ovc raw -vf format=i420 -oac pcm -o test.avi
If -ofps 15 is specified, the AVI is 15fps and 67ms duration:
mencoder 15fps30000fps.mp4 -v -ovc raw -vf format=i420 -oac pcm -ofps 15 -o test.avi
mencoder seems to handle encoding properly from VFR ASF/WMV which report 1000.0fps, as long as you specify -ofps.
Attachments (2)
Change History (6)
by , 16 years ago
Attachment: | mencoder-15fps30000fps.log added |
---|
comment:1 by , 16 years ago
comment:2 by , 16 years ago
comment:3 by , 16 years ago
Adding -ofps 15 and -noskip seems to help:
mencoder 15fps30000fps.mp4 -v -ovc raw -vf format=i420 -oac pcm -ofps 15 -noskip -o test.avi
This results in a 15fps 9sec AVI. Without -noskip but with -ofps 15, all frames but one are skipped and the AVI has only a single frame and 15fps. With neither -noskip nor -ofps 15, the resulting AVI has 136 frames but 30000fps framerate.
So despite the docs saying you cannot use -noskip with variable framerate source, it seems to be necessary in this case.
comment:4 by , 13 years ago
Owner: | changed from | to
---|
mencoder log without -ofps 15