Opened 4 years ago

Last modified 3 years ago

#2147 new defect

Mplayer and Mencoder read FPS wrongly

Reported by: gggg08@… Owned by: reimar
Priority: normal Component: core
Version: HEAD Severity: critical
Keywords: Cc: cehoyos
Blocked By: Blocking:
Reproduced by developer: no Analyzed by developer: no

Description (last modified by reimar)

So title says it all. Both mencoder and mplayer read fps wrongly (shown on the left on attached screenshot).
I also assume, that due to this another problem arises. If I add -noskip to mencoder line, huge desync is created and video stream duration goes ~9-10 seconds more than the original on ~24min video (source file and output files info is shown on attached screenshot at center and on the right respectively). If I remove -noskip, there will be no desycn. But -noskip is necessary in some cases so removing it creates another problem.
Command line that I use
mencoder -demuxer mkv "Z:
One Piece
One Piece - 601.mkv" -o temp.avi -vf scale=480:272,harddup -af channels=2 -srate 44100 -oac faac -faacopts br=192:mpeg=4:object=1 -ovc x264 -ffourcc avc1 -x264encopts me=umh:level_idc=13:keyint=250:frameref=2:bframes=0:threads=auto:profile=main:rc_lookahead=60:crf=20 -aspect 16:9 -mc 0 -ass -noskip
Let me know if you need more info.

Attachments (1)

scr.png (226.4 KB) - added by gggg08@… 4 years ago.
Screenshot with info

Download all attachments as: .zip

Change History (5)

Changed 4 years ago by gggg08@…

Screenshot with info

comment:1 Changed 4 years ago by cehoyos

  • Cc cehoyos@… added

Please provide a sample (and please consider testing current FFmpeg).

comment:2 Changed 4 years ago by gggg08@…
With command line provided earlier, output file will have 23.810 fps instead of 23.976.
Interesting thing, that if I convert pretty much same rip (by that I mean streams of both rips are same), with only difference of with newer versions of mkvmerge, libebml and libmatroska won't produce this problem and will have correct fps.

comment:3 Changed 3 years ago by reimar

  • Analyzed by developer unset
  • Description modified (diff)
  • Reproduced by developer unset

I am afraid -demuxer mkv has a few issues and in particular doesn't have the ability to reliably estimate fps if the files are not quite correct.
You can add -fps to override the detected values.
However using the default -demuxer lavf would be better. If it has issues, getting these fixed have better chances, our own mkv demuxer isn't really maintained anymore.

comment:4 Changed 3 years ago by gggg08@…

Hmm, interesting thing, mediainfo lib of version couldn't read fps correctly too. It showed 23.810 (same as what output file by mencoder gets), but with newer version it gets fps correctly. I'm not sure when they changed the way they determine fps (possibly 0.7.59) but perhaps you could use same method?
demuxer lavf produces same results as demuxer mkv
As for your recommendation, I will grab fps with mediainfo and use -fps I guess since mediainfo lib reads it right.

Last edited 3 years ago by gggg08@… (previous) (diff)
Note: See TracTickets for help on using tickets.