[MPlayer-users] Mencoder: Changing frame rate (RealMedia to vcd)

Bill Moseley moseley at hank.org
Sat Jan 1 19:49:05 CET 2005

On Sat, Jan 01, 2005 at 11:17:42AM -0400, Giacomo Comes wrote:
> I disagree with the whole story of expand or crop.
> Just -vf scale=352:240 is enough.
> The Realmedia video is 320x240 (aspect 4/3), you scale to 352x240 and that's it.
> mencoder will add 4/3 aspect ratio to the mpeg stream and the player will
> take the 352x240 video and scale it.

That makes sense.  The player scales it back from 352x240 => 352x264.

> The crop/expand stuff would be required if you set 1:1 aspect ratio,
> (-lavcopts aspect=1), but that's unnecessary because VCD usually have 4/3 aspect ratio.
> Belive me, I have been working A LOT on scaling and aspect ratio with both
> mencoder and yuvscaler in encode2mpeg

What about other another aspect ratio?:

$ tcprobe -i test.avi
[tcprobe] MPEG program stream (PS)
[tcprobe] summary for test.avi, (*) = not default, 0 = not detected
import frame size: -g 640x368 [720x576] (*)
     aspect ratio: 1:1 
       frame rate: -f 30.000 [25.000] frc=5 (*)
                   PTS=161.2929, frame_time=33 ms, bitrate=104857 kbps
      audio track: -a 0 [0] -e 44100,16,2 [48000,16,2] -n 0x50 [0x2000] (*)
                   PTS=47721.8576, bitrate=224 kbps
                   -D -1426816 --av_fine_ms -31 (frames & ms) [0] [0]

I assume that I can use aspect=16/9 in that case since it's basically
in 16:9 format.

But what if the image size is something else that doesn't fit nicely
into 4:3 or 16:9.  Then I'd need to "expand" to make it fit (assuming
I want to preserver the full frame size and original aspect ratio)
which adds black bars.

Oh Geeze.  I don't really get it yet, though.  Once it is expanded it
needs to be resized to fit the stored frame size.  Do I have this
right?  For DVD the stored image size is 720x480.  If it's flagged
NTSC 16:8 then it is resized to 853x480, and if it's flagged 4:3 it's
resized to 720x540.  I'm still trying to understand what happens with
480x480 svcd.

In case you cannot tell, I'm struggling to learn about this stuff.
It's easy to spend hours and hours reading and just getting more
confused.  Or at least realize how little I know so far... ;)

I'll try out encode2mpeg -- my goal is to learn more, not just create
the media.  I suspect looking over that script will be instructive.

My simple understanding is that the video is either marked 4:3 or
16:9 and that tells the player to either resize the hight or width of
the frame.

> Could you explain me why your patch is required?
> I usually use mplayer with "-dumpvideo" and "-dumpaudio" on the file 
> mencoder outputs, to create .m2v and .mp2 files and seems to work fine.

I tried using -dumpvideo and -dumpaudio with the Real input stream and
couldn't seem to play those streams directly.  I couldn't figure out
the right options, I suppose.

(Another weird thing is that I cannot play (with mplayer) the .mpa
files without renaming to .mp2.  Does that mean xmms is looking at
the file name to determine the encoding?)

Bill Moseley
moseley at hank.org

More information about the MPlayer-users mailing list