Showing posts with label cd/dvd. Show all posts
Showing posts with label cd/dvd. Show all posts

Thursday, August 04, 2005

X11: Xine United

Here's a puzzle for you. When I first tried to get embedded media working in Firefox, I installed the MediaPlayerConnectivity extension and had it open files in xine. I gave up on this plan because xine wouldn't play QuickTime (.mov) files, like the movie trailers at Apple's web site, forcing me to use MPlayer. So I used MPlayer for all embedded media until I predictably got tired of it, and then I switched to VLC for a while. When it became apparent that VLC wouldn't give me DVD playback without some serious reconfiguration, I returned to my original strategy in desperation. Except this time it was a flawless victory.



I wasn't sure whether to be overjoyed or furious. I mean, after all the time I spent trying to get embedded media to play correctly… Let's review the sequence of events.
  1. Installed MediaPlayerConnectivity and xine.
  2. Installed MPlayer (and XMMS).
  3. Removed MPlayer, xine and MediaPlayerConnectivity.
  4. Installed VLC.
  5. Removed VLC.
  6. Reinstalled MediaPlayerConnectivity and xine.
  7. Holy shit, it works!
What happened between events 1 and 6 to cause event 7? For a while, I couldn't account for it. Then I remembered that Synaptic gives you two ways to remove packages, removal and complete removal. The latter removes all files associated with the package. With the former, "configuration files and user created data" remain untouched.

Maybe files lingering from one of the other packages made it possible for xine to play embedded media it couldn't play before. I doubt they came from VLC; it had more problems than xine did. MediaPlayerConnectivity doesn't include any codecs, and XMMS had been on my system before I ever tried xine. That leaves MPlayer.

I decided to investigate the xine documentation. It contains a section that recommends downloading Dynamic Link Libraries (DLLs) from the MPlayer site in order to play QuickTime files. On the other hand, it recommends a similar solution to playing Windows Media Video (WMV). I still can't play WMV in xine—or any other media player, for that matter. Eat my shorts, Microsoft. You and your proprietary video format can suck my USB dongle. In any case, I'm not willing to discount the MPlayer theory yet. I'll look into this tomorrow if I have time.

By the way, xine has beautiful DVD playback. All I had to do was get the libdvdcss2 package. I've seen suggestions that the use of this decryption library is illegal in the U.S. So it's illegal to play a DVD I bought with my own money in a computer likewise purchased? That's ridiculous. Nonetheless I feel obliged to warn you. Now here's how to install the package.

sudo apt-get install libdvdcss2

It's that easy. Go enjoy your favorite movie. You are big winner.

Friday, July 29, 2005

Access Granted

Direct Memory Access (DMA) allows hard drives and CD/DVD drives to access system memory. It can help to eliminate skipping during CD and DVD playback. Today I'll demonstrate how to enable DMA on a Samsung SM-348B drive. These instructions should be applicable to most other CD/DVD drives. Please make sure your drive is capable of DMA before following these steps. I'm assuming that hdc is your CD-ROM here. If you're not sure, check /etc/fstab.

First we should find out if DMA is already enabled for the drive.

sudo hdparm /dev/hdc

If it says that using_dma is on, then DMA has already been enabled for the drive and you don't need to continue. Otherwise we can enable it now.

sudo hdparm -d1 /dev/hdc

That's the number one, not an L. Of course, we also want the system to enable DMA at startup. We'll have to edit hdparm.conf for this. Let's back it up first.

sudo cp /etc/hdparm.conf /etc/hdparm.conf.bak
sudo gedit /etc/hdparm.conf


Now we must add the following lines to the end of the file.

/dev/hdc {
dma = on
}


Save the file and we should be good to go. If you run the first command after rebooting, you can see if it worked. Now your CD or DVD drive will have access to system memory and be able to read and write at its fastest.