[mythtv-users] VLC and Auto Resize Screen Resolution

Another Sillyname anothersname at googlemail.com
Tue Mar 25 20:12:40 UTC 2008


Hi All

One of the things I've managed to get working really well on my .21
setup is infra red and VLC for video and music playback (I've used VLC
longer and am used to it's tweaks).

However one of the problems with using a large screen with a high
resolution is that anything that you've recorded and then turned into
an avi at say 480x280 resolution looks rubbish when scaled up to
1920x1200 resolution.....as well as the tearing you get on playback.

This got me thinking about how to 'resize' the display on the fly from
within mythtv to minimise tearing and get the screen to handle
rescaling as close to the original native resolution as possible.

To that end I've written the following script that will rescale your
monitor before vlc starts and reset it back to where it was
afterwards.

I'm currently working on a more advanced version that detects the
actual resolution of the avi and then rescales the screen to the next
nearest size one up.

The commands needed are xrandr for the resizing and mplayer to detect
the resolution of a avi/mpeg/ts etc... so make sure your setup has
them and they work before setting up the script.

To see what resolutions your monitor supports type...

xrandr -q

replace the 800x600 and 1920x1200 below to suit your setup.

The script is very simple.......

WHATVID="`cat /tmp/whatvid`"
xrandr -s 800x600
vlc "$WHATVID"
xrandr -s 1920x1200

save it in /usr/local/bin as vlc4myth and make sure to make it executable

once you have this working load mythfrontend

Utilities/Setup -->  Setup  -->  Media Settings  -->  Video Settings
-->  Player Settings  -->  Default Video Player

Change the text in Default Video Player to read -->

echo %s > /tmp/whatvid & vlc4myth

then click finish and try it.

Have fun and let me know if it's been useful

J


More information about the mythtv-users mailing list