Sujao
12th February 2005, 14:54
Title: nrip
Version: 0.0.3
Last change: 21.02.2005
Purpose: Rip DVD, reencode video and audio tracks and multiplex into matroska container.
Author: removed for privacy reasons, see README file
Contact: removed for spam reasons, see README file
Download: http://nforum.de/forum/topic,726.html
License: GPL v2
########
FEATURES
########
nrip does in detail:
-Rip main title of dvd and reencode the video track with XVID codec in two pass mode, quality is made top priority. The xvid parameter can be changed by the user (interactive variables).
-Rip and reencode: ac3 5.1 --> user defined bitrate or keeping original, ac3 stereo --> ogg vorbis, mpeg1 --> left original to avoid further quality loss.
-Rip userdefined subtitle tracks.
-Multiplex everything into a matroska container.
nrip was designed for high quality rips thus target size shouldnt be less than. 2,18GB what is 1/2 of DVD-5. Since version 0.0.3 the target size is variable and can be specified by the user.
The encoding duration strongly depends whether you choose to use GMC(Global Motion Compensation) or not, the lenght of the movie and of course your CPU. I need about 26h for a 02h10m movie with GMC turned on and a 1000Mhz Athlon Thunderbird.
##############
REQUIEREMENTS
##############
The script needs the following programs to work:
- mplayer/mencoder
- lsdvd
- mkvmerge which is part of mkvtoolnix-1.0.1 (maybe also earlier versions but definetely later than 0.8.8. I upgraded directly to 1.0.1 and didn't test the packages inbetween. Gentoo users have to unmask the newest package. I did too and it works just fine.)
- oggenc which is part of libvorbis
- a arbitrary image viewer for viewing of crop preview. Default is "xv". You can change the path in the beginning of the script. Scroll down to the "interactive variables" section.
And optionally "dvdbackup" in order to be able to cache the DVD on harddrive.
More utils are required but they are all part of coreutils which are installed on 99.9% of all linux systems by default. There will be a check in the beginning so just start and you will see if something is missing.
Upgrade all packages to the newest version if possible. These are the packages I use so they should work for sure:
mplayer-1.0_pre5-r5
mkvtoolnix-1.0.1
lsdvd-0.10
dvdbackup-0.1.1-r1
libvorbis-1.0.1
If you are unsure whether your programms will work or not activate one-chapter-mode to perform a quick part conversion and test the resulting video for functions. If one-chpater-mode works than normal mode will work for 95%. One-chapter-mode is also activated at interactive variables in the script. Scroll down to this section. Its pretty obvious.
###########
LIMITATIONS
###########
-Can handle only single title DVDs, that means DVDs with ONE movie. Later versions will be able to handle several DVD titles per DVD disc. This is needed for DVDs with shows. At the moment only the main title is ripped.
-Can handle at most 10 audio/subtitle tracks.
-Can only handle ac3 and mpeg1 audio stremas, no dts/aac.
-Can't determine whether audio track is usual track or commentary. The tracks will apear identical. If that is so you have to find out yourself which one is the right ine. But in 98% of all cases the comentary is the last audiotrack.
-Only simple deinterlacing is possible. Inverse Telecine is not yet implemented. That means NTSC DVDs with 29,97 that were interlaced for DVDs will not be encoded very effectively. You probably wont see a difference but about 33% addition space will be wasted. I have not been able to figure out how the invert telecine filter works in mencoder and as I only have one NTSC DVD that was not made for theathers I have nothing to test with. So you would propably not want to use this script for NTSC DVDs as you wont get optimal results. And to be honest I dont know if I will investigate this issue at all... I mean, in the beginning I just wanted to write some lines of script to automate my ripping process. Some lines means 5-10! I didn't want to make a ~1300 line script. This thing here is much too complex for a bash script.
For more information about inverse telecine see here: http://www.divx-digest.com/articles/vhs_capture2.html
####
BUGS
####
-If temporary folder had been created and has to be deleted then deletes only last level of folder hirarchy. If /home/user was present and /home/user/movies/output/ was created as temporary folder than only "output" will be deleted afterwards and not "movies".
-At the time of this realease I wasnt able to track down the reason for a malfunction of xvid. It doesnt produce files with correct sizes. This bug might only appear when GMC is activated but I havent done enough testint to ensure this. If you produce final files with about 2.1GB please contact me and tell me whether you used GMC and which version of xvid and mplayer you use.
Please report further bugs as soon as discovered. Launch the script with the --debug option and send me the whole output with an description of what happended and what didn't work.
####
TIPS
####
- Pressing ENTER while entering a path makes nrip chose the default folder.
- You can edit some default values at the beginning of the script. Most important are default paths. Be careful with changing. Don't change a mount pount to a device ex. /home/user-->/dev/dvd and vice versa as this might break the script.
- There is a one-chapter-mode avaiable for quick testing. With this option activated only the first chapter of the first DVD title is converted. Depending on the DVD its duration is 10s to 5min. As all steps of the conversion are performed you can be pretty sure that if the one-chapter-mode conversion was successful the normal will be too.
#########
THANKS TO
#########
- The users of the Gentoo Forums for helping me with various problems. (forums.gentoo.org)
- "chris aka ctt" for lots of help with scripts.
- "booiiing" for testing.
Have fun!
#########
CHANGELOG
#########
0.0.3
- dvd cache is now really working
- dvd cache is now really left on harddrive if wanted
- overall target size is variable
- bitrate of ac3 5.1 streams is variable and can be left original
- ac3 stereo (2.0) is converted to ogg. new dependency "oggenc"
- added interactive variable "delete_temp_dir"
- added interactive variable "xvid_parameter". You can now change the parameters for the xvid codec if you want.
0.0.2a
- audio/subtitle listing uses longest track as it should (thanks to kKDu)
- changed volume normalisation to fit closer to original
- tuned target size to fit 1/2 DVD-5 more.
- no errors during listing anymore if no audio/subtitle tracks are in title
0.0.2
- implemented workaround for mencoder bug that displaces ac3 channels (thanks to brancaleone)
- mpeg2 audio is processed
- some minor bugs fixed
- some video encoding improvements
- preview also for manual crop mode
- some internal reorganisation
Be sure to download the latest package by all means.
Version: 0.0.3
Last change: 21.02.2005
Purpose: Rip DVD, reencode video and audio tracks and multiplex into matroska container.
Author: removed for privacy reasons, see README file
Contact: removed for spam reasons, see README file
Download: http://nforum.de/forum/topic,726.html
License: GPL v2
########
FEATURES
########
nrip does in detail:
-Rip main title of dvd and reencode the video track with XVID codec in two pass mode, quality is made top priority. The xvid parameter can be changed by the user (interactive variables).
-Rip and reencode: ac3 5.1 --> user defined bitrate or keeping original, ac3 stereo --> ogg vorbis, mpeg1 --> left original to avoid further quality loss.
-Rip userdefined subtitle tracks.
-Multiplex everything into a matroska container.
nrip was designed for high quality rips thus target size shouldnt be less than. 2,18GB what is 1/2 of DVD-5. Since version 0.0.3 the target size is variable and can be specified by the user.
The encoding duration strongly depends whether you choose to use GMC(Global Motion Compensation) or not, the lenght of the movie and of course your CPU. I need about 26h for a 02h10m movie with GMC turned on and a 1000Mhz Athlon Thunderbird.
##############
REQUIEREMENTS
##############
The script needs the following programs to work:
- mplayer/mencoder
- lsdvd
- mkvmerge which is part of mkvtoolnix-1.0.1 (maybe also earlier versions but definetely later than 0.8.8. I upgraded directly to 1.0.1 and didn't test the packages inbetween. Gentoo users have to unmask the newest package. I did too and it works just fine.)
- oggenc which is part of libvorbis
- a arbitrary image viewer for viewing of crop preview. Default is "xv". You can change the path in the beginning of the script. Scroll down to the "interactive variables" section.
And optionally "dvdbackup" in order to be able to cache the DVD on harddrive.
More utils are required but they are all part of coreutils which are installed on 99.9% of all linux systems by default. There will be a check in the beginning so just start and you will see if something is missing.
Upgrade all packages to the newest version if possible. These are the packages I use so they should work for sure:
mplayer-1.0_pre5-r5
mkvtoolnix-1.0.1
lsdvd-0.10
dvdbackup-0.1.1-r1
libvorbis-1.0.1
If you are unsure whether your programms will work or not activate one-chapter-mode to perform a quick part conversion and test the resulting video for functions. If one-chpater-mode works than normal mode will work for 95%. One-chapter-mode is also activated at interactive variables in the script. Scroll down to this section. Its pretty obvious.
###########
LIMITATIONS
###########
-Can handle only single title DVDs, that means DVDs with ONE movie. Later versions will be able to handle several DVD titles per DVD disc. This is needed for DVDs with shows. At the moment only the main title is ripped.
-Can handle at most 10 audio/subtitle tracks.
-Can only handle ac3 and mpeg1 audio stremas, no dts/aac.
-Can't determine whether audio track is usual track or commentary. The tracks will apear identical. If that is so you have to find out yourself which one is the right ine. But in 98% of all cases the comentary is the last audiotrack.
-Only simple deinterlacing is possible. Inverse Telecine is not yet implemented. That means NTSC DVDs with 29,97 that were interlaced for DVDs will not be encoded very effectively. You probably wont see a difference but about 33% addition space will be wasted. I have not been able to figure out how the invert telecine filter works in mencoder and as I only have one NTSC DVD that was not made for theathers I have nothing to test with. So you would propably not want to use this script for NTSC DVDs as you wont get optimal results. And to be honest I dont know if I will investigate this issue at all... I mean, in the beginning I just wanted to write some lines of script to automate my ripping process. Some lines means 5-10! I didn't want to make a ~1300 line script. This thing here is much too complex for a bash script.
For more information about inverse telecine see here: http://www.divx-digest.com/articles/vhs_capture2.html
####
BUGS
####
-If temporary folder had been created and has to be deleted then deletes only last level of folder hirarchy. If /home/user was present and /home/user/movies/output/ was created as temporary folder than only "output" will be deleted afterwards and not "movies".
-At the time of this realease I wasnt able to track down the reason for a malfunction of xvid. It doesnt produce files with correct sizes. This bug might only appear when GMC is activated but I havent done enough testint to ensure this. If you produce final files with about 2.1GB please contact me and tell me whether you used GMC and which version of xvid and mplayer you use.
Please report further bugs as soon as discovered. Launch the script with the --debug option and send me the whole output with an description of what happended and what didn't work.
####
TIPS
####
- Pressing ENTER while entering a path makes nrip chose the default folder.
- You can edit some default values at the beginning of the script. Most important are default paths. Be careful with changing. Don't change a mount pount to a device ex. /home/user-->/dev/dvd and vice versa as this might break the script.
- There is a one-chapter-mode avaiable for quick testing. With this option activated only the first chapter of the first DVD title is converted. Depending on the DVD its duration is 10s to 5min. As all steps of the conversion are performed you can be pretty sure that if the one-chapter-mode conversion was successful the normal will be too.
#########
THANKS TO
#########
- The users of the Gentoo Forums for helping me with various problems. (forums.gentoo.org)
- "chris aka ctt" for lots of help with scripts.
- "booiiing" for testing.
Have fun!
#########
CHANGELOG
#########
0.0.3
- dvd cache is now really working
- dvd cache is now really left on harddrive if wanted
- overall target size is variable
- bitrate of ac3 5.1 streams is variable and can be left original
- ac3 stereo (2.0) is converted to ogg. new dependency "oggenc"
- added interactive variable "delete_temp_dir"
- added interactive variable "xvid_parameter". You can now change the parameters for the xvid codec if you want.
0.0.2a
- audio/subtitle listing uses longest track as it should (thanks to kKDu)
- changed volume normalisation to fit closer to original
- tuned target size to fit 1/2 DVD-5 more.
- no errors during listing anymore if no audio/subtitle tracks are in title
0.0.2
- implemented workaround for mencoder bug that displaces ac3 channels (thanks to brancaleone)
- mpeg2 audio is processed
- some minor bugs fixed
- some video encoding improvements
- preview also for manual crop mode
- some internal reorganisation
Be sure to download the latest package by all means.