Difference between revisions of "Multimedia and DVDs in Ubuntu"

From FreekiWiki
Jump to navigation Jump to search
(revised completely)
Line 1: Line 1:
'''Since downloading some of the following libraries violates some Digital Millenium Copyright laws, this wiki page is for educational purposes only.  Anyone who follows these directions for their computer does so at their own risk.'''
+
'''Since downloading some of the following libraries may violate some Digital Millenium Copyright laws, this wiki page is for educational purposes only.  Anyone who follows these directions for their computer does so at their own risk.'''
  
:'''Check out [https://help.ubuntu.com/community/RestrictedFormats this page] for Ubuntu'''
+
:Check out [https://help.ubuntu.com/community/RestrictedFormats this page] for additional information on Ubuntu and restricted media formats.
  
So, you've bought a DVD-ROM from the Thrift Store, and you want to play DVDs on your [[FreekBox]].  You'll need to install a few programs and mess around with some files.  This page will lead you through it.
+
So, you've bought a DVD-ROM from the Thrift Store, and you want to play DVDs on your [[FreekBox]].  You'll need to install a few programs in order to make it work.
  
 +
#Physically install the drive, paying attention to whether the drive should be master or slave.  If you replace the CD drive, the DVD drive must be set to master or cable-select.
 +
#On a Free Geek box with Ubuntu Dapper as the OS, you can run the "Automatix" script (Applications>System Tools>Automatix).  You need to be online at the time.
 +
#Install Totem-xine and Multimedia Codecs.
 +
#In order to play commercial encrypted DVDs, you will need to also install the AUD-DVD package which contains the libdvdcss library.  There are potential legal issues with this which is why Free Geek does not install this package on their boxes.  See [[wikipedia:libdvdcss]].
  
== Physically Install your DVD-ROM==
+
People without Automatix installed on their box can do the following:
  
All media players seem to look for the first optical drive by default so you can avoid the step of configuring the software if you set the DVD drive to [[master slave or cable select|master]].  Some media players don't seem to even have any option of using any drive but the first. 
+
# uncomment the universe deb lines in sources.list
 
+
# apt-get update
==Setup symlinks==
+
# apt-get install totem-xine
 
+
# run /usr/share/doc/libdvdread3/examples/install-css.sh
Once the drive is installed it is time to setup symlinks, and permissions. 
 
 
 
From a root shell cd to the /dev directory.
 
 
 
freekbox3:~# cd /dev
 
 
 
The DVD drive will probably be /dev/hdc verify this by running the eject command. 
 
 
 
freekbox3:~# eject /dev/hdc
 
 
 
If you got the right drive the tray will open, and if it isn't the tray of the drive that device node corresponds to should open.  Other options are /dev/hdb (on some laptops) or /dev/hdd if you set the drive to slave on a desktop machine.
 
 
 
Create a symlink to this drive.
 
 
 
freekbox3:~# cd /dev
 
freekbox3:/dev# ln -s hdc dvd
 
 
 
If the dvd drive is /dev/hdd, or you have another optical drive useing that device node you will probably have to change the permissions for it. 
 
 
 
freekbox3:/dev# ls -l hdc hdd
 
brw-rw----  1 root cdrom 22,  0 2005-02-25 22:38 hdc
 
brw-rw----  1 root disk  22, 64 2005-02-25 22:38 hdd
 
 
 
Notice how the dvd drive is in the cdrom group, and the cdrom is in the disk group. This means that normal users don't have permission to access this drive.  Change the group for this drive to the cdrom group. 
 
 
 
freekbox3:/dev# chown root:cdrom /dev/hdd
 
freekbox3:/dev# ls -l hdc hdd
 
brw-rw----  1 root cdrom 22,  0 2005-02-25 22:38 hdc
 
brw-rw----  1 root cdrom 22, 64 2005-02-25 22:38 hdd
 
 
 
If you have a cdrom as well as a dvd drive then the symlink for the cdrom probably points to the dvd drive.
 
 
 
freekbox3:/dev# ls -l cdrom
 
lrwxrwxrwx  1 root root 8 2000-12-31 16:06 cdrom -> /dev/hdc
 
 
 
Check to make sure that the cdrom is /dev/hdd by running eject again
 
 
 
freekbox3:/dev# eject /dev/hdd
 
 
 
The tray on the cdrom will eject if this is the device node for the cdrom.  To replace the symlink for the cdrom you have to delete the existing one first. 
 
 
 
freekbox3:/dev# rm /dev/cdrom
 
freekbox3:/dev# ln -s /dev/hdd cdrom
 
 
 
I usually also add symlinks for them by their order in the system too though this is optional. 
 
 
 
freekbox3:/dev# ln -s /dev/hdc cdrom0
 
freekbox3:/dev# ln -s /dev/hdd cdrom1
 
 
 
==Create a mountpoint==
 
 
 
Some applications need a mountpoint in order to read information off of a dvd drive.  This requires both a place to mount the drive in the filesystem, and an entry in /etc/fstab. 
 
 
 
freekbox3:/dev# cd /
 
freekbox3:/# mkdir dvd
 
 
 
Now there is a place in the filesystem to mount disks in the dvd drive.  Next setup /etc/fstab.  Currently the test system looks like this. 
 
 
 
freekbox3:/# cat /etc/fstab
 
/dev/hda1 /boot ext3 defaults 0 2 #size=100
 
/dev/hda2 none swap sw 0 0 #size=250
 
/dev/hda3 / ext3 defaults,errors=remount-ro 0 1 #size=remaining
 
/dev/fd0 /floppy auto defaults,user,noauto 0 0
 
/dev/cdrom /cdrom iso9660 defaults,ro,user,noauto 0 0
 
proc /proc proc defaults 0 0
 
 
 
Use your favorite editor to make it look more like this. 
 
 
 
freekbox3:/# cat /etc/fstab
 
/dev/hda1 /boot ext3 defaults 0 2 #size=100
 
/dev/hda2 none swap sw 0 0 #size=250
 
/dev/hda3 / ext3 defaults,errors=remount-ro 0 1 #size=remaining
 
/dev/fd0 /floppy auto defaults,user,noauto 0 0
 
/dev/cdrom /cdrom auto defaults,ro,user,noauto 0 0
 
/dev/dvd /dvd auto defaults,ro,user,noauto 0 0
 
proc /proc proc defaults 0 0
 
 
 
run "man fstab" for more details
 
 
 
==Add apt source for essential media playback software==
 
 
 
The best place to find non standard debian packages is http://apt-get.org
 
 
 
I always forget the apt source for what I need so I click on "search for a package", and then search for "mplayer".  I know from previous experience that the first result has everything I need. 
 
 
 
Add these lines to the end of /etc/apt/sources.list
 
 
 
# DVD, and media related packages
 
deb <nowiki>http://www.debian-multimedia.org/</nowiki> sarge main
 
 
 
Now update your apt sources
 
 
 
freekbox3:/# aptitude update
 
 
 
== Install some Programs==
 
 
 
freekbox3:/# aptitude -r install mplayer-586 w32codecs libdvdcss vlc vlc-plugin-alsa xine-ui kaffeine totem-xine
 
 
 
The -r is important it gets reccomended stuff as well as the what is required. 
 
 
 
==Try it==
 
 
 
You should now have several video player programs installed. 
 
 
 
*totem
 
*xine
 
*kaffeine
 
*vlc
 
*mplayer
 
 
 
Try them out, and use the ones that you like best. 
 
 
 
== See also ==
 
*[[DVD-ROM testing]]
 
* [http://www.linux.org/docs/ldp/howto/DVD-HOWTO.html Linux DVD HOWTO]
 
* [http://www.linux.org/docs/ldp/howto/DVD-Playback-HOWTO/index.html DVD Playback HOWTO]
 
 
 
==Ubuntu==
 
For Ubuntu the process is much simpler.
 
 
 
* Physically install the drive, paying attention to whether the drive should be master os slave
 
* uncomment the universe deb lines in sources.list
 
* apt-get install totem-xine
 
* run /usr/share/doc/libdvdread3/examples/install-css.sh
 
  
  
 
[[Category:Tech support]]
 
[[Category:Tech support]]
 
[[Category:Build]]
 
[[Category:Build]]

Revision as of 23:18, 12 July 2007

Since downloading some of the following libraries may violate some Digital Millenium Copyright laws, this wiki page is for educational purposes only. Anyone who follows these directions for their computer does so at their own risk.

Check out this page for additional information on Ubuntu and restricted media formats.

So, you've bought a DVD-ROM from the Thrift Store, and you want to play DVDs on your FreekBox. You'll need to install a few programs in order to make it work.

  1. Physically install the drive, paying attention to whether the drive should be master or slave. If you replace the CD drive, the DVD drive must be set to master or cable-select.
  2. On a Free Geek box with Ubuntu Dapper as the OS, you can run the "Automatix" script (Applications>System Tools>Automatix). You need to be online at the time.
  3. Install Totem-xine and Multimedia Codecs.
  4. In order to play commercial encrypted DVDs, you will need to also install the AUD-DVD package which contains the libdvdcss library. There are potential legal issues with this which is why Free Geek does not install this package on their boxes. See wikipedia:libdvdcss.

People without Automatix installed on their box can do the following:

  1. uncomment the universe deb lines in sources.list
  2. apt-get update
  3. apt-get install totem-xine
  4. run /usr/share/doc/libdvdread3/examples/install-css.sh