Difference between revisions of "Video playback on Linux"

From Freephile Wiki
Jump to navigation Jump to search
m (Reverted edit of 209.66.124.150, changed back to last version by Freephile)
Line 1: Line 1:
DVD and video playback on Linux [[Image:Screenshot_xine.png|thumb|Xine screenshot]]
+
spam-free
My latest adventure had involved getting video and dvd playback from Debian (Sarge) and Fedora Core 1.  With Debian, getting xine installed was as easy as apt-get install xine-ui, because apt-get took care of the dependencies (namely xine lib).  Once xine was installed, I found a neat site about xine in general, and found out that you can install various skins for the xine player user interface (the picture shows Celoma Gold).  To download a new skin, you press Ctrl+d  while window focus is on the Xine application.  You should definately visit http://cambuca.ldhs.cetuc.puc-rio.br/xine/ for instructions on how to get xine, and how to get various codecs to support Windows and Mov file formats.
 
 
 
Of course, once xine was installed, I found out quickly that I could not access my CD-R drive, or my external DVD drive.  I would get an error to the effect that "only root could mount dev/scd0 on mnt/dvdram".  I was pretty sure that when I installed Debian on my system originally that I had chosen to allow normal users to mount devices (like floppy, cd-writer, dvd) -- mostly because this is my computer and I want to do what I want without having to invoke special super-user privileges.  Also, this is what I'm accustomed to doing in a Windows environment.  I think it is great that Linux allows you to precisely configure access to various resources, but for a desktop system, this feature can get in the way.  So, I went hunting for the proper way to turn these devices on.
 
 
 
ls -al /mnt
 
showed that there was indeed a mount point defined called /mnt/dvdram.  I tried to change the ownership of the mount point
 
  chown greg:greg /mnt/dvdram
 
but that didn't work
 
ls -al /dev/scd0
 
showed that the device was owned by root, and the group cdrom.  I checked into the group to see if I was a member by using the graphical tool kuser (System -> User Manager).  That showed I was a member of the cdrom group and the floppy group.
 
brw-rw-rw-    1 root    cdrom    11,  0 May 20 21:22 /dev/scd0
 
I read somewhere that I should do a 'modprobe ide-scsi' which didn't show any results.
 
The next command I found was
 
cdrecord -scanbus
 
which did show that my DVD drive was there, and also my scanner.
 
I made sure the device was indeed mounted on the /mnt/dvdram mountpoint
 
mount /dev/scd0 /mnt/dvdram
 
and, since Xine looks for DVDs at /dev/dvd by default, I created a symbolic link from /dev/dvd to the existing /dev/scd0
 
ln -s /dev/scd0 /dev/dvd
 
I also read that you need to have mtrr compiled into your kernel, which you can tell by this command
 
cat /proc/mtrr
 
According to this article, http://linux.omnipotent.net/article.php?article_id=11799,  you need DMA (Direct Memory Addressing) enabled on the drive in order to avoid jumpy playback. 
 
hdparm -d /dev/dvd
 
Told me I didn't have the hdparm tool, which I confirmed with a
 
locate hdparm
 
So, I installed hdparm
 
apt-get install hdparm
 
But now, when I run the same command, it tells me that this operation is not allowed on a SCSI drive.  As far as I know, this is not a scsi drive, but an ide drive using scsi emulation...Then again, I just a user, and I'm feeling pretty lucky that I know it's a DVD drive.  So, I'm not sure how to cure my jumpy playback issues.  Anyway, at least I've got the permission problems licked, and Xine is installed with a nice UI, and I can playback a DVD from my external DVD drive.
 

Revision as of 03:51, 7 February 2006

spam-free