Difference between revisions of "Multimedia and DVDs in Ubuntu"

From FreekiWiki
Jump to navigation Jump to search
 
(71 intermediate revisions by 10 users not shown)
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.'''
+
This page in Spanish: [[Multimedia and DVDs in Ubuntu (Español)]]
  
:'''Check out [https://help.ubuntu.com/community/RestrictedFormats this page] for Ubuntu'''
+
'''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.'''
  
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==
+
==Instructions for  Ubuntu 12.04 ==
 +
NOTE:  Please make sure that sure to check the "multiverse" box under Menu -> Ubuntu Software Center -> Edit -> Software  Sources  before you begin.
 +
This is what it should look like (in Ubuntu 12.04) (though yours is probably gray in color).
  
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. 
+
[[Image:Software-sources.png]]
  
==Setup symlinks==
+
In order to make Multimedia and DVDs work in Ubuntu, you need to add some additional software.  This software is not installed by default because of licensing and legal issues.
  
Once the drive is installed it is time to setup symlinks, and permissions. 
+
*Make sure you are connected to the Internet
 +
*Install the following packages, either from the Ubuntu Software Center or from the command line:
 +
**xubuntu-restricted-extras
 +
**libdvdread4 (if you want DVD playback)
 +
**vlc (optional)
 +
===GUI===
 +
Open the Ubuntu Software Center form the main menu and type the name of the applications in the search box that appears on the right hand side under 'All Software'
  
From a root shell cd to the /dev directory.
+
===Command  Line Installation===
 +
To install from the command line, open a terminal (Applications>Accessories>Terminal) and type or paste the following:
  
  freekbox3:~# cd /dev
+
  sudo apt-get install vlc ubuntu-restricted-extras libdvdread4
  
The DVD drive will probably be /dev/hdc verify this by running the eject command.
+
You will need to give it your password. Don't worry is nothing shows up on the screen when you are typing your password it is supposed to be this way.
  
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.  
+
===Enabling DVD Playback===
 +
There is a final stage before DVD playback is enabled. type
  
Create a symlink to this drive.
+
Open a terminal (Menu -> Accessories-> Terminal Emulator)
  
  freekbox3:~# cd /dev
+
  sudo /usr/share/doc/libdvdread4/install-css.sh
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.
+
followed by the Enter key.
  
freekbox3:/dev# ls -l hdc hdd
+
This procedure adds a second media player (vlc) which will appear in Applications>Sound and Video as well as java, quicktime and some other media helpers and plugins.  
brw-rw----  1 root cdrom 220 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. 
+
To make VLC the default player for DVD's (recommended) open a terminal and type:
  
  freekbox3:/dev# chown root:cdrom /dev/hdd
+
  thunar-volman --configure
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.
+
then go to '''Multimedia''' tab and change  the ''Video CDS/DVDs'' command box to read
  
  freekbox3:/dev# ls -l cdrom
+
  vlc dvd://%d
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
+
if you want it to open in full screen use
  
  freekbox3:/dev# eject /dev/hdd
+
  vlc -f dvd://%d 
  
The tray on the cdrom will eject if this is the device node for the cdromTo replace the symlink for the cdrom you have to delete the existing one first.   
+
The install will ask you to agree to some licences license as well as clicking or entering ok on a couple of informational screens. You can use tab and the arrow keys to navigate. The chose options will be  highlighted in red. Click Enter to proceedThe installation may appear to stall part way throughBe patient.
  
  freekbox3:/dev# rm /dev/cdrom
+
==Instructions for Ubuntu 10.04 ==
freekbox3:/dev# ln -s /dev/hdd cdrom
+
NOTE: Please make sure that sure to check the "multiverse" box under system ---> administration ----> software sources before you begin.
 +
This is what it should look like (in Ubuntu 10.04)
 +
[[Image:Software-sources.png]]
  
I usually also add symlinks for them by their order in the system too though this is optional.
+
In order to make Multimedia and DVDs work in Ubuntu, you need to add some additional software.  This software is not installed by default because of licensing and legal issues.  
  
freekbox3:/dev# ln -s /dev/hdc cdrom0
+
*Make sure you are connected to the internet
freekbox3:/dev# ln -s /dev/hdd cdrom1
+
*Install the following packages, either from the Ubuntu Software Center or from the command line:
 +
**ubuntu-restricted-extras
 +
**libdvdread4 (if you want DVD playback)
 +
**vlc (optional)
  
==Create a mountpoint==
+
To install from the command line, open a terminal (Applications>Accessories>Terminal) and type or paste the following:
  
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.  
+
  sudo apt-get install vlc ubuntu-restricted-extras libdvdread4
  
freekbox3:/dev# cd /
+
You will need to give it your password. Don't worry is nothing shows up on the screen when you are typing your password it is supposed to be this way.
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
+
When this has finished type or paste
  
  freekbox3:/# cat /etc/fstab
+
  sudo /usr/share/doc/libdvdread4/install-css.sh
/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.   
+
This procedure adds a second media player (vlc) which will appear in Applications>Sound and Video as well as java, quicktime and some other media helpers and plugins.   
  
freekbox3:/# cat /etc/fstab
+
To make VLC the default player for DVD's (recommended) go to Places -> Home Folder. Click on Edit then Preferences. Then click on the Media Tab. Change the Dropdwn menu next to DVD Player to 'Open VLC media player'. It will then start automatically when you insert a DVD.
/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
+
The install will ask you to agree to some licences license as well as clicking or entering ok on a couple of informational screens. You can use tab and the arrow keys to navigate. The chose options will be  highlighted in red. Click Enter to proceed.  The installation may appear to stall part way through.  Be patient.  Flash is only installed with 10.04.
  
==Add apt source for essential media playback software==
+
== Problems ==
 +
*vlc has no installation candidate
 +
::Make sure that the multiverse box is checked in System>Administration>Software Sources
 +
*"lock file"
 +
::If you get a message saying that another package manager is running, first make sure you have closed Synaptic and are not running apt-get in another terminal window.  If you still get the error, run the following command and try again:
 +
sudo rm /var/lib/dpkg/lock
  
The best place to find non standard debian packages is http://apt-get.org
+
*Occasionally Adobe updates their version of flash without changing the name of the file.  In this case the flashplugin-nonfree package will download the flash installer, but not install it.  (Test by going to youtube.com) The installer can be found in /var/cache/flashplugin-nonfree, or follow the tar.gz method at [[install flashplayer|this page]].
 +
*Occasionally rebooting is necessary before things actually work
 +
*Installing Java will not work if you do not agree to the license terms, so if java does not work you should try reinstalling and making sure of the license agreement.  Test it by going to http://java.sun.com/applets/other/BouncingHeads.
 +
*Run "VLC" in Terminal to return error messages if something is not working correctly.  If VLC launches correctly, you're good to go.
  
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.  
+
==Legal Issues==
 +
The legal status of libdvdcss2 is questionable, since it has never been brought to court, but some people believe it could be.  Check out [http://ubuntucat.wordpress.com/2007/05/28/the-legality-or-illegality-of-w32codecs-and-libdvdcss2/ this link] for a discussion, or the Wikipedia article on [[wikipedia:libdvdcss|libdvdcss]]  
  
Add these lines to the end of /etc/apt/sources.list
+
==Other links==
 +
*[https://help.ubuntu.com/community/RestrictedFormats RestrictedFormats - Community Ubuntu Documentation]
  
# DVD, and media related packages
+
==Package Contents ([x]ubuntu-restricted-extras) ==
deb <nowiki>http://www.debian-multimedia.org/</nowiki> sarge main
 
  
Now update your apt sources
+
* adobe-flashplugin [i386]
 +
* Adobe Flash Player plugin installer
 +
* web browser plugin based on OpenJDK and IcedTea to execute Java applets
 +
* ffmpeg codec library
 +
* The KDE CD/DVD burning application library - extra decoders
 +
* An MP3 encoding library
 +
* MP3 Plugin for MusicBrainz tagging library
 +
* MPEG-related plugins for libxine1
 +
* Installer for Microsoft TrueType core fonts
 +
* Unarchiver for .rar files (non-free version)
  
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]]

Latest revision as of 15:18, 5 March 2013

This page in Spanish: Multimedia and DVDs in Ubuntu (Español)

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.


Instructions for Ubuntu 12.04

NOTE: Please make sure that sure to check the "multiverse" box under Menu -> Ubuntu Software Center -> Edit -> Software Sources before you begin. This is what it should look like (in Ubuntu 12.04) (though yours is probably gray in color).

Software-sources.png

In order to make Multimedia and DVDs work in Ubuntu, you need to add some additional software. This software is not installed by default because of licensing and legal issues.

  • Make sure you are connected to the Internet
  • Install the following packages, either from the Ubuntu Software Center or from the command line:
    • xubuntu-restricted-extras
    • libdvdread4 (if you want DVD playback)
    • vlc (optional)

GUI

Open the Ubuntu Software Center form the main menu and type the name of the applications in the search box that appears on the right hand side under 'All Software'

Command Line Installation

To install from the command line, open a terminal (Applications>Accessories>Terminal) and type or paste the following:

sudo apt-get install vlc ubuntu-restricted-extras libdvdread4

You will need to give it your password. Don't worry is nothing shows up on the screen when you are typing your password it is supposed to be this way.


Enabling DVD Playback

There is a final stage before DVD playback is enabled. type

Open a terminal (Menu -> Accessories-> Terminal Emulator)

sudo /usr/share/doc/libdvdread4/install-css.sh

followed by the Enter key.

This procedure adds a second media player (vlc) which will appear in Applications>Sound and Video as well as java, quicktime and some other media helpers and plugins.

To make VLC the default player for DVD's (recommended) open a terminal and type:

thunar-volman --configure

then go to Multimedia tab and change the Video CDS/DVDs command box to read

vlc dvd://%d

if you want it to open in full screen use

vlc -f dvd://%d  

The install will ask you to agree to some licences license as well as clicking or entering ok on a couple of informational screens. You can use tab and the arrow keys to navigate. The chose options will be highlighted in red. Click Enter to proceed. The installation may appear to stall part way through. Be patient.

Instructions for Ubuntu 10.04

NOTE: Please make sure that sure to check the "multiverse" box under system ---> administration ----> software sources before you begin. This is what it should look like (in Ubuntu 10.04) Software-sources.png

In order to make Multimedia and DVDs work in Ubuntu, you need to add some additional software. This software is not installed by default because of licensing and legal issues.

  • Make sure you are connected to the internet
  • Install the following packages, either from the Ubuntu Software Center or from the command line:
    • ubuntu-restricted-extras
    • libdvdread4 (if you want DVD playback)
    • vlc (optional)

To install from the command line, open a terminal (Applications>Accessories>Terminal) and type or paste the following:

sudo apt-get install vlc ubuntu-restricted-extras libdvdread4

You will need to give it your password. Don't worry is nothing shows up on the screen when you are typing your password it is supposed to be this way.

When this has finished type or paste

sudo /usr/share/doc/libdvdread4/install-css.sh

This procedure adds a second media player (vlc) which will appear in Applications>Sound and Video as well as java, quicktime and some other media helpers and plugins.

To make VLC the default player for DVD's (recommended) go to Places -> Home Folder. Click on Edit then Preferences. Then click on the Media Tab. Change the Dropdwn menu next to DVD Player to 'Open VLC media player'. It will then start automatically when you insert a DVD.

The install will ask you to agree to some licences license as well as clicking or entering ok on a couple of informational screens. You can use tab and the arrow keys to navigate. The chose options will be highlighted in red. Click Enter to proceed. The installation may appear to stall part way through. Be patient. Flash is only installed with 10.04.

Problems

  • vlc has no installation candidate
Make sure that the multiverse box is checked in System>Administration>Software Sources
  • "lock file"
If you get a message saying that another package manager is running, first make sure you have closed Synaptic and are not running apt-get in another terminal window. If you still get the error, run the following command and try again:
sudo rm /var/lib/dpkg/lock
  • Occasionally Adobe updates their version of flash without changing the name of the file. In this case the flashplugin-nonfree package will download the flash installer, but not install it. (Test by going to youtube.com) The installer can be found in /var/cache/flashplugin-nonfree, or follow the tar.gz method at this page.
  • Occasionally rebooting is necessary before things actually work
  • Installing Java will not work if you do not agree to the license terms, so if java does not work you should try reinstalling and making sure of the license agreement. Test it by going to http://java.sun.com/applets/other/BouncingHeads.
  • Run "VLC" in Terminal to return error messages if something is not working correctly. If VLC launches correctly, you're good to go.

Legal Issues

The legal status of libdvdcss2 is questionable, since it has never been brought to court, but some people believe it could be. Check out this link for a discussion, or the Wikipedia article on libdvdcss

Other links

Package Contents ([x]ubuntu-restricted-extras)

  • adobe-flashplugin [i386]
  • Adobe Flash Player plugin installer
  • web browser plugin based on OpenJDK and IcedTea to execute Java applets
  • ffmpeg codec library
  • The KDE CD/DVD burning application library - extra decoders
  • An MP3 encoding library
  • MP3 Plugin for MusicBrainz tagging library
  • MPEG-related plugins for libxine1
  • Installer for Microsoft TrueType core fonts
  • Unarchiver for .rar files (non-free version)