Archive for September, 2008

Treat ISO as DVD in Gnome-MPlayer

Wow, it’s been a while!

I’ve been using Zenwalk Linux 5.0 (5.2 seems to break my DVD drive) for most of the summer. I really like it and I think I finally found a video player I like — Gnome-player.

One of the features that is missing from Gnome-MPlayer is the ability to treat a DVD iso as the dvd device like in MPlayer or GXine. Adding a dvd-device section to ~/.mplayer/config should fix the problem.

You can take this one step further by adding a custom action for Thunar. Here’s the custom action: ~/ %f

And here is the script

# usage: full_dvd_iso_path
# TODO: add a dvd-device line if it does not exist
# TODO: there should be a way to have awk update infile so the
# whole output redirection, mv stuff is not required
awk -v dev=$1 'BEGIN{OFS=FS="="} /dvd-device/{$2=dev}{print}' ~/.mplayer/config > ~/dskchng.tmp && mv ~/dskchng.tmp ~/.mplayer/config && g-mplayer dvdnav://

To change the dvd-device back to /dev/dvd just do ~/ /dev/dvd

I haven’t tested this yet, but changing the thunar action to ~/ %f; ~/ /dev/dvd should change the device back automatically when Gnome-MPlayer is closed.

It isn’t the disk changer application I’ve always wanted, but if I could somehow get Thunar to show a video thumbnail for the ISO’s it would be a step in the right direction.


September 13, 2008 at 6:38 pm 2 comments