site  contact  subhomenews

Auto-run video-DVD, audio-CD

June 03, 2008 — BarryK
This is so nice! I have finished what I had originally planned for pup_event, now added automatic handling of video-DVD and audio-CD.

Each block device that has an icon on the desktop also has an associated 'handler' script. There is a master script, /usr/local/bin/drive_all, and for each drive icon a copy is made of that script and the icon's run-action associated with that copy. In the case of optical drive /dev/sr0, the associated script is /usr/local/bin/drive_sr0.

Previously, when a drive icon is clicked on, the 'handler' script just ran Pmount. Now, I have added automatic detection if a video-DVD or audio-CD is inserted, and run the media player immediately.

Everything is configurable, via the Event Manager. You can configure no auto-detection and only run Pmount. You can configure to run the 'handler' as soon as the disc is inserted, or only after the desktop icon is clicked on.

The reason for doing this auto-run is I want to make it easier for Windows refugees who do not understand mounting and unmounting. It is extra confusing that mounting is not wanted to play a video-DVD or audio-CD -- but is if it is required to play a media file on the CD/DVD.

As an extra feature a bit later I might put a bit of explanation about this into the 'optical' tab in Pmount.

I have updated the Event management page:

Note, the audio-CD is launched with:
defaultmediaplayer cdda://



No boot up
Username: Lobster
""Does anyone know an alternative way to launch the CD from the commandline, that will not have that delay?" I would have suggested cdp (with interface) or cdplay (command line only) which is in Puppy but was not working on my machine for some reason . . .

Re: cdp, cdplay
Username: BarryK
"The problem with those is the optical drive needs to have the physical analog audio cable installed that links the drive to the motherboard/card audio. Not all PCs have that, especially in situations where they have more than one optical drive, or a USB optical drive. I documented problems with Xine-ui and Mplayer in my blog. Incompatibility with JWM. We would have to dump JWM, go to OpenBox/Lxpanel perhaps -- which is on the cards.

CD/DVD playback
Username: Dougal
"I'm sorry to say that it might not be as simple as it seems... I tried to implement that in Hotpup about a year ago and found that the URI commands in the media players are not very dependable... I tried Gxine, Xine, Mplayer and VLC and VLC was the only one that worked properly (keep in mind that a cd will **not** always be in /dev/cdrom, so you need to give it the right device). I also tried hacking XfreeCD to support being given a device as an argument, but couldn't get that to work.

mut2 for Audio CD
Username: Jesse
"Mut2 Audio CD playback, via drive multimedia cmds (the physical audio cable): /usr/sbin/mut mutclient --drivecmd play hda /usr/sbin/mut mutclient --drivecmd next hda /usr/sbin/mut mutclient --drivecmd stop hda /usr/sbin/mut mutclient --drivecmd pause hda

Tags: puppy