[mythtv] [PATCH] (mythvideo) per-directory player command

Michael T. Dean mtdean at thirdcontact.com
Wed Oct 20 14:22:28 UTC 2004


John Patrick Poet wrote:

> I have some videos which are 16:9 and some which are 4:3.  These 
> videos may be mpegs or avis.
>
> This patch causes mythvideo to look for a ".mythvideo" file in the 
> directory where the video file is located.  If that file exists, the 
> content will be used as the player command instead of the default.
>
> For example, in the directory where I keep my 4:3 video files, I have 
> a .mythvideo file which contains:
>
> xrandr -s 640x480;mplayer -quiet -monitoraspect 4:3 -framedrop 
> %s;xrandr -s 888x500
>
> This changes my output resolution to 640x480, runs mplayer with a 4:3 
> aspect, and then switched back to my normal 888x500 (16:9) "menu" 
> resolution when mplayer exits.
>
> There may be a better (more efficient) way to achieve this 
> functionality, but this was a simple change.

Both MPlayer and xine support on-the-fly resolution switching using the
X VidModeExtension.  When using the built-in xvidmode support, the
player will determine the best video mode to use (of all the available
modes you have configured in your XF86Config (or xorg.conf) file) based
on resolution and aspect ratio (and refresh rate?) of the video.  If
using Xv video out, the video will then be scaled to full-screen for the
selected resolution in the event none of the video modes is an exact
match for the video's resolution.

To have mplayer switch the resolution specify the "-vm" option on the
command-line (works with "-vo xv", in spite of what the man page
implies).  To have xine switch the resolution, specify

gui.use_xvidext:1

in the ~/.xine/config file (can be specified through the GUI at the
bottom of the "gui" tab of the xine setup dialog--check the box "use
XVidModeExtension when switching to full screen").

Unfortunately, xine doesn't set the resolution back to the pre-switch
resolution, but MPlayer does.

Mike



More information about the mythtv-dev mailing list