[MEncoder-users] Want a sample command to convert files to FLV

howard chen howachen at gmail.com
Fri Aug 18 18:44:17 CEST 2006

On 8/18/06, The Wanderer <inverseparadox at comcast.net> wrote:
> howard chen wrote:
> > On 8/18/06, The Wanderer <inverseparadox at comcast.net> wrote:
> >
> >> howard chen wrote:
> >>> yes, after i use "-v", i can get the average fps now...
> >>
> >> What's in your ~/.mplayer/config file? If the 'total time' and
> >> 'total frames' are not printed by default, then there's something
> >> weird going on.
> >
> > seems nothing (it is the default?)
> >
> > # Write your default config options here!
> That *is* strange, then. Not sure where to go from there.
> >>> in fact, i wonder the need to playback the whole file to get the
> >>> average fps, even the player play the first 20-30 seconds could
> >>> get the average fps.
> >>
> >> That will give you the average FPS over that small chunk of the
> >> file, but it won't necessarily be the same as the average FPS of
> >> the entire file; if the frame rate changes later on, the average
> >> FPS will be different.
> (This seems so self-evident to me that it seems hard to understand how
> you are managing to disagree with it...)
> >> In point of fact, I noticed that exact effect in the course of
> >> testing to make sure that the numbers I expected were in fact
> >> gettng printed. Once I let the video finish 'playing' and got total
> >> time of 420.2 seconds with 11822 frames, for an average FPS of
> >> ~28.13422; another time, I interrupted it early on at 35.0 seconds
> >> (by coincidence) and 832 frames, for an average FPS of 23.77143.
> >> Considering the desync I sometimes get in non-variable-FPS files
> >> whose FPS value is off by (as far as I can tell) about 0.1 frame
> >> per second, I'd say that 4.36 frames per second is a very
> >> significant difference.
> >
> > what kind of file you are using? seems as RC said, only WMV use
> > variable video bit rate, i doubt the difference in FPS is so large?
> A WMV file - officially reported as being 1000.000 FPS, which is the
> value MPlayer gives when the frame rate is variable.
> (I'm assuming you meant "variable frame rate", because WMV is certainly
> not the only format which uses VBR.)
> > the ffmpeg can determine the average fps of my wmv file during
> > encoding, so i doubt the need to play the whole file in order to get
> > the average fps.
> "Average FPS" is, by definition, "number of frames per unit time". If
> there is a way to know both of those numbers for the entire file without
> analyzing or otherwise processing the whole thing, then the average FPS
> can be determined without having to do that; however, I know of no way
> for that to be possible for WMV. I don't know where FFmpeg gets its
> reported input frame rate from, but for the source file I was using it
> says
> ==
>   Stream #0.1: Video: wmv3, yuv420p, 320x240, 30.00 fps(r)
> ==
> and, if I actually let it transcode the file and then play the result in
> MPlayer, it does not have the same total time as the original file -
> which, to the best of my knowledge, means that the frame rate is
> different.
> If I just remux the file with FFmpeg, it reports that there are 11823
> frames constituting 418.8 seconds (average FPS: 28.231). If I transcode
> the video with default settings (i.e. msmpeg4, minimal bitrate, etc.),
> it reports that there are 12565 frames constituting 418.8 seconds
> (average FPS: 30.000).
> MPlayer thinks that the remuxed file has 11822 frames constituting 418.2
> seconds (average FPS: 28.269), and the the transcoded file has 12564
> frames constituting 420.8 seconds (average FPS: 29.857) as well as a
> flood of MV errors which probably deserve a bug report somewhere.
> As you can see, there are an excess of different numbers; the only ones
> that agree with each other are FFmpeg's 'estimation' of the frame rate
> and the output-frame-rate value it uses when told to transcode the file
> (which, since it's based on the other, doesn't mean much). Given that, I
> think I'm inclined to trust the math here.
> --

for encoding a WMV file (avg fps : 15):

mencoder, i need to get the correct fps by mplayer, and use this value
as the ofps.

ffmpeg, i don't need to provide the `-r`, the ffmpeg auto can encode
the file using 15 fps.

so that's mean FFmpeg is smarter or FFmpeg might be `wrong` at some case?

More information about the MEncoder-users mailing list