Difference between revisions of "Multimedia and DVDs in Ubuntu"

From FreekiWiki
Jump to navigation Jump to search
Line 42: Line 42:
 
  brw-rw----  1 root cdrom 22, 64 2005-02-25 22:38 hdd
 
  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 simlink for the cdrom probably points to the dvd drive.
+
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
 
  freekbox3:/dev# ls -l cdrom
Line 51: Line 51:
 
  freekbox3:/dev# eject /dev/hdd
 
  freekbox3:/dev# eject /dev/hdd
  
The tray on the cdrom will eject if this is the device node for the cdrom.  To replace the simlink for the cdrom you have to delete the existing one first.   
+
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# rm /dev/cdrom
 
  freekbox3:/dev# ln -s /dev/hdd cdrom
 
  freekbox3:/dev# ln -s /dev/hdd cdrom
  
I usually also add simlinks for them by their order in the system too though this is optional.   
+
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/hdc cdrom0

Revision as of 08:57, 22 February 2007

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.

Check out this page for Ubuntu

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.


Physically Install your DVD-ROM

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. Some media players don't seem to even have any option of using any drive but the first.

Setup symlinks

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 http://www.debian-multimedia.org/ 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

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