[Mplayer-dvb] [PATCH] mplayer.sh: try to scale as little as possible

Juri Haberland juri at koschikode.com
Fri Jan 3 03:15:18 CET 2003


Hi Martin et al.

I did some changes to mplayer.sh that I want to share.
The main reason was that my VDR box is not fast enough to scale all
videos up to full PAL resolution. As some of the videos already are in a
format that could be directly played via mplayer without additionaly
scaling I put some logic into mplayer.sh to try to play videos with as
little scaling as possible.

E.g.:
I have a video with, say, 160x120.
Why should I scale it up to 640x480 whereas 352x240 would be enough;
or:
the video is already in VCD format, so there's no need to scale at all.

I also discovered that the sound get's out of sync if a video with 25
fps is played as, e.g. 640x480, because mplayer plays it as a NTSC video
with 29.97 fps. If I force mplayer to use 25 fps the video isn't
fullscreen anymore :(
So I added more logic to distinguish between framerates and adjust the
resolution accordingly.

There are two major drawbacks with this version:

1.) it uses a new feature of mplayer: '-identify'
    This is faster and gives more reliable output of the video format
    and is easier to parse.
    I don't know when this option was added to mplayer - it is at least
    in -rc1

2.) your TV set must be capable of viewing NTSC video or you will have a
    b/w picture or no picture at all when you try to play a video with
    15, 29.97 or 30 frames/second.

There're still some rough edges but feel free to comment on it.

Cheers,
Juri
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mplayer.sh.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dvb/attachments/20030103/b68cef4b/attachment.asc>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mplayer.sh.conf.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dvb/attachments/20030103/b68cef4b/attachment.txt>


More information about the MPlayer-dvb mailing list