MEncoder

„MEncoder is a free command line video decoding, encoding and filtering tool released under the GNU General Public License. It is a close sibling to MPlayer and can convert all the formats that MPlayer understands into a variety of compressed and uncompressed formats using different codecs.“

MEncoder. (2008, February 23). In Wikipedia, The Free Encyclopedia. Retrieved 18:57, April 5, 2008, from
http://en.wikipedia.org/w/index.php?title=MEncoder&oldid=193447614


My Blog List

Wednesday, April 23, 2008

Re: [MEncoder-users] framerate denominator and numerator got much bigger after encoding

RC wrote:
> On Wed, 23 Apr 2008 09:06:38 +0800
> JRaSH <jrash06@163.com> wrote:
>
>> Could anyone tell me how I can control the behaviour of MEncoder so
>> that the denominator and numerator will stay the same as the source?
>
> There is no numerator or denominator. There is only a single frame-rate
> value stored in the file. There are millions of possible different ways
> to represent that number it, for the sake of humans.

In AVI, samplerate and framerate are stored as a numerator and
denominator: dwRate and dwScale.

http://msdn2.microsoft.com/en-us/library/ms902872.aspx

-----------------------------------------------------------------------
dwScale
Used with dwRate to specify the time scale that this stream will
use. Dividing dwRate by dwScale gives the number of samples per second.
For video streams, this rate should be the frame rate. For audio
streams, this rate should correspond to the time needed for nBlockAlign
bytes of audio, which for PCM audio simply reduces to the sample rate.
dwRate
See dwScale.
-----------------------------------------------------------------------

To the original poster: what values are you seeing? Run "mplayer -v
outputfile.avi" and look for a block like this:


====== STREAM Header =====
Type: vids FCC: xvid (64697678)
Flags: 0
Priority: 0 Language: 0
InitialFrames: 0
Rate: 24000/1001 = 23.976 <---------look at this line
Start: 0 Len: 83093
Suggested BufferSize: 108990
Quality 10000
Sample size: 0
==========================

In general, mplayer will simply copy the input framerate to the output
framerate, unless you specify -ofps. I think the problem is in the
avisynth demuxer, but I can't test it. Try the attached patch. Maybe
it'll work; maybe it'll segfault; maybe it won't compile.

You can additionally try removing the line right above the lines my
patch adds:
sh_video->fps = (float) ((float) AVS->video_info->fps_numerator / ...

-Corey

No comments:

PCBs

Links

Forex brokers, Forex online


Privacy Policy