Added new eject_opts option for greater flexibility.
[rip_dvd/.git] / README
1 ----------------------------------------------
2 DEPENDENCIES
3 ----------------------------------------------
4 The following packages need to be installed on your system:
5
6 Package Dependencies (apt-get install these for example):
7 lsdvd dvdauthor gddrescue dvdbackup tovid mencoder mplayer genisoimage gpac ogmtools
8
9 The libdvdcss2 package is also needed, but can only be downloaded from the medibuntu repository:
10 https://help.ubuntu.com/community/Medibuntu
11
12 NOTE:  In Ubuntu, depending on your version, replace libdvdcss2 with what you find on this page.
13   https://help.ubuntu.com/community/RestrictedFormats/PlayingDVDs
14
15 NOTE:  After apt-get install on Ubuntu you may need to run this:
16   sudo /usr/share/doc/libdvdread4/install-css.sh
17
18 Specific Executable (program) Dependencies (must be found in $PATH):
19 volname makexml lsdvd dvdauthor ddrescue dvdbackup mencoder mplayer mkisofs
20
21 NOTE:  The script puts /usr/share/tovid on your path which should contain makexml
22
23 Optional Dependencies:
24 lookup imdb info/posters for mythvideo: http://www.mythtv.org/wiki/Fill_mythvideo_metadata.pl
25 HandBrake CLI video encoder (version 0.9.3 required for xvid encoding): google to find it
26 HandBrake CLI video encoder (version >=0.9.4 required for mp4 encoding): http://handbrake.fr/
27 You can also get these HandBrake versions from here: https://www.pippins.net/cgi-bin/index.pl?/www/files/video_utils/handbrake
28
29 Windows Dependencies:
30 To play back the videos in windows that use the divx encoding profiles, you'll
31 need to download and install the xvid codec:
32 http://www.koepi.info/xvid.html
33
34 ----------------------------------------------
35 INSTALL
36 ----------------------------------------------
37 The following steps should be followed to pull this code project
38 into a local GIT repository (local directory):
39
40 This command will create a directory called "rip_dvd" in the CWD and pull the code for this project:
41 > git clone http://git.pippins.net/rip_dvd/.git rip_dvd
42
43 To pull updates in the future of this project into your local directory:
44 > cd rip_dvd
45 > git pull origin
46
47 To see the changelog for what you have pulled, run this command:
48 > git whatchanged
49
50 -------------------------------------------------
51 ENABLING MENCODER XVID TO ENCODE USING MULTICORES
52 -------------------------------------------------
53 The libxvidcore4 package that you can get through ubuntu or debian
54 is version 1.1.0. They didn't enable multi-core encoding using this
55 library until version 1.2.0. Since you can't get that in a package,
56 you can build it from source easily. Since the xvid codec (this lib)
57 is used by mencoder by rip_dvd in all of its xvid profiles (the default),
58 you can speed up the encode process quite a bit if you enable multi-cores.
59 Follow these instructions to enable the xvid encoding to use multi-cores:
60
61 > wget http://downloads.xvid.org/downloads/xvidcore-1.2.1.tar.gz
62 > gunzip xvidcore-1.2.1.tar.gz
63 > tar xvf xvidcore-1.2.1.tar
64 > cd xvidcore/build/generic
65 > ./configure --prefix=/usr
66 > make
67 > sudo make install
68 > cd /usr/lib
69 > sudo rm libxvidcore.so.4
70 > sudo ln -s libxvidcore.so.4.2 libxvidcore.so.4
71
72 After you do these steps, when rip_dvd is running using any xvid profile,
73 you will note with 'top' that the mencoder process is using > 100% of your CPU.
74
75 ----------------------------------------------
76 CONFIGURATION
77 ----------------------------------------------
78 You'll need to copy the rip_dvd.conf.dist file to a local copy of the
79 file called rip_dvd.conf. This way, you can customize the settings
80 needed by the script in a file that isn't tracked by GIT. The conf
81 file tracked by GIT (rip_dvd.conf.dist) will then contain the defaults
82 the script needs to run. You can override these in your own rip_dvd.conf
83 file you create locally.  This will allow you to get updates from my
84 GIT repository at a later point in time without blowing away your 
85 local settings. You can put your copy of the rip_dvd.conf file in 
86 any of the following locations:
87
88  1) /path/to/rip_dvd/script/rip_dvd.conf.dist
89  2) /path/to/rip_dvd/script/rip_dvd.conf
90  3) /etc/rip_dvd.conf
91  4) /path/to/where/rip_dvd/is/run/from/rip_dvd.conf
92
93 ----------------------------------------------
94 MYTHTV MENU SETUP
95 ----------------------------------------------
96 Copy the menu files provided in the GIT repository to your mythtv
97 menu location:
98
99 > cp optical_menu.xml /usr/share/mythtv/
100 > cp rip_dvd_menu.xml /usr/share/mythtv/
101
102 You'll also need to edit the rip_dvd_menu.xml file so that the paths,
103 commands, buttons, actions, meet your needs to accomplish the common
104 encoding tasks you will want to do.
105
106 The optical_menu.xml file was modified with a single entry for the
107 rip_dvd_menu.xml file. You can take a look at this entry in this file
108 and place it in any xml file you want to get it on the menu you want.
109 I choose to place it on the optical menu.
110
111 The menu items in these examples call the rip_dvd.wrap script.
112 This is a simple script I wrote to implementation hide the full
113 command line options for rip_dvd from the mythtv menu system.
114 I also use this wrapper script to determine where to put the
115 ripped DVD images. You can copy this example and call it something
116 else on your system and change it appropriately to meet your needs.
117
118 ----------------------------------------------
119 COMMAND LINE EXAMPLES
120 ----------------------------------------------
121
122 Rip a DVD into a compressed AVI file with default xvidhq profile:
123 > rip_dvd -d /path/to/dest/dir -b 2000 -z
124
125 Rip a DVD into a compressed AVI file with default xvidhq profile scaling to 320x240 compressed video size:
126 > rip_dvd -d /path/to/dest/dir -b 2000 -z -a 320:240
127
128 Rip a DVD into a compressed AVI file with default xvidhq profile targetting a certain compressed video filesize (in MB):
129 > rip_dvd -d /path/to/dest/dir -b 2000 -z -s 650
130
131 Rip a DVD into a VOB file:
132 > rip_dvd -d /path/to/dest/dir -v
133
134 Rip a DVD into an ISO file:
135 > rip_dvd -d /path/to/dest/dir -m
136
137 Rip a DVD into a burnable DVD compliant folder (creating VIDEO_TS and AUDIO_TS folders):
138 > rip_dvd -d /path/to/dest/dir -f
139
140 Rip a VOB file into a compressed AVI file:
141 > rip_dvd -d /path/to/dest/dir -b 2000 -z -n /path/to/file.vob
142
143 Rip a DVD Folder into a compressed AVI file:
144 > rip_dvd -d /path/to/dest/dir -b 2000 -z -n /path/to/dvd/folder/that/contains/a/VIDEO_TS
145
146 Rip a DVD into a compressed MP4 file for an ipod:
147 > rip_dvd -d /path/to/dest/dir -b 2000 -z -p ipod
148
149 Rip a DVD into a compressed MP4 file for an ipod AND again for a compressed AVI file:
150 > dvdname=`volname /dev/dvd | awk '{ print $1 }'`
151 > rip_dvd -d /path/to/dest/dir -v
152 > rip_dvd -d /path/to/dest/dir/ipod -b 2000 -z -p ipod -n /path/to/dest/dir/$dvdname.VOB
153 > rip_dvd -d /path/to/dest/dir/xvid -b 2000 -z -p xvidhq -n /path/to/dest/dir/$dvdname.VOB
154 > rm /path/to/dest/dir/$dvdname.VOB
155