Software and Programming

The recurring [K]ubuntu TV-out video saga

Upgrading my OS to Jaunty broke TV output, because the proprietary driver doesn’t work anymore. However, I eventually found how to get output to my TV. I set up the following script:

xrandr -s 800x600 # resize so that cloning goes smoothly
xrandr --output S-video --set load_detection 1
xrandr --addmode S-video 800x600
xrandr --output S-video --mode 800x600
# xvattr -a XV_CRTC -v 1
vlc -f $*
echo Done playing $*
xrandr -s 1024x768

xrandr is a program that modifies your display dynamically. I guess this is all doable with configuration, but the infamous X conf file appears to be deprecated, so whatever. I use xrandr anyway to change resolution, because the output of the screen is duplicated onto the TV, and I want it to fit without being cropped.

So, first the script sets the resolution to the TV-compatible 800 width by 600 height; next the S-video commands tell the OS to look for the TV and set it up – and then my script passes its arguments (my movies) to the vlc media player. Once vlc quits, the resolution is restored.

There’s a commented out command that uses an utility called xvattr to change whether the X-Video extension (XV) should apply to the default output (the computer screen) or the TV – with when you see video on one, you just get a blank window on the other. Thankfully, I can tell vlc to show video using regular X server video instead of the XV extension, so nevermind that. I don’t see any noticable difference in the display behavior, which is pretty bad in either case – whenever windows appear in a shot, I see blocky video boxes on the TV. I think the proprietary driver didn’t have this problem.

And because my LCD screen burnt out this Saturday (a year beyond its warranty), I’m using a huge and scratchy-screened old CRT, which makes old-school oomph noises whenever it switches resolution.