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