Page 1 of 13

[Script] convert episodes or main-feature from DVD or BD or convert multiple files (on any os)

Posted: Mon Dec 31, 2012 4:48 pm
by AlBundy
I've created a ruby-Script to add some more features to HandbrakeCLI (see advantages)

With the script you can convert all your material and filter tracks, languages etc.

You can download the latest release here: https://github.com/AlBundy33/hb_rb/tree/master/build
Just download HandbrakeCLI for your platform and save it in the appropriate folder under tools.
I've tested the script on OSX and Windows.

This program comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt (available in archive).
This is free software, and you are welcome to redistribute it under certain conditions.

Main advantages of the script are:
- no need to work with audio-track-numbers - simply use "deu", "eng", etc. to specifiy the wanted language(s)
- filter tracks by duration (e.g. to convert all eposiodes from a dvd)
- prevent tracks from converting twice
- works with single-files, DVDs and with blurays
- recursive converting
- works also with presets

some examples

Code: Select all

convert main-feature with all original-tracks (audio and subtitle) for languages german and english (override languages with --lang)
hb.rb --input /dev/rdisk1 --output "~/Movie.m4v" --movie

convert all episodes with all original-tracks (audio and subtitle) for languages german and english
hb.rb --input /dev/rdisk1 --output "~/Series_SeasonX_#pos#.m4v" --episodes

convert complete file or DVD with all tracks, languages etc.
hb.rb --input /dev/rdisk1 --output "~/Output_#pos#.m4v"

convert all MKVs recursive in a directory
hb.rb --input "~/MKV/**/*.mkv" --output "~/#title#.m4v"
hb.rb

Code: Select all

This program comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt.
This is free software, and you are welcome to redistribute it under certain conditions.

For questions, feature-requests etc. visit: https://forum.handbrake.fr/viewtopic.php?f=10&t=26163

Usage: hb [options]

common
        --input INPUT                input-source
        --output OUTPUT              output-file (mp4, m4v and mkv supported)
                                     available place-holders
                                     #pos#               - title-number on input-source
                                     #size#              - resolution
                                     #fps#               - frames per second
                                     #ts#                - current timestamp
                                     #title#             - source-title (dvd-label, directory-basename, filename)
                                     #source#            - name of input
                                     #source_basename#   - name of input without extension
                                     #source_dirname#    - complete path to the input-file
                                     #source_parentname# - directoryname of the input-file
                                     #encoder#           - the used video-encoder
        --force                      force override of existing files
        --check                      show only available titles and tracks
        --help                       Display this screen
        --hbpreset PRESET            user defined presets (bluray, plex)

output-options
        --compatibility              enables iPod compatible output (only m4v and mp4)
        --autocrop                   automatically crop black bars
        --max-width WIDTH            maximum video width (e.g. 1920, 1280, 720)
        --max-height HEIGTH          maximum video height (e.g. 1080, 720, 576)
        --audio LANGUAGES            the audio languages
        --subtitles LANGUAGES        the subtitle languages
        --lang LANGUAGES             sets audio and subtitle languges
        --burnin-forced              Burn in the first forced subtitle
        --audio-track SETTINGS       the audio-settings to use
                                     allowed options
                                     encoder - the audio encoder to use (allowed: copy, auto, ca_aac, ca_haac, ac3, mp3, vorbis, flac16, flac24, default: copy)
                                     mixdown - allowed: auto, mono, left_only, right_only, stereo, dpl1, dpl2, 5point1, 6point1, 7point1, 5_2_lfe), default: auto)
                                     bitrate - the bitrate to use (default: 160kb/s)
                                     codec - the codec-filter to apply (regular expression)
                                     language - the language-filter to apply (space separated)
        --audio-settings SETTINGS    encoding settings for auto-encoder depending on audio-type
                                     allowed options
                                     track - regular expression for track (use * to set default settings)
                                     encoder - the audio encoder to use (allowed: copy, ca_aac, ca_haac, ac3, mp3, vorbis, flac16, flac24)
                                     mixdown - allowed: auto, mono, left_only, right_only, stereo, dpl1, dpl2, 5point1, 6point1, 7point1, 5_2_lfe))
                                     bitrate - the bitrate to use
        --preset PRESET              the handbrake-preset to use
                                     allowed: Android, Android Tablet, AppleTV, AppleTV 2, AppleTV 3, High Profile, Normal, Universal, Windows Phone 8, iPad, iPhone & iPod touch, iPod)
        --preview [RANGE]            convert only a preview in RANGE (default: 00:01:00-00:02:00)

filter-options
        --main                       main-feature only
        --titles TITLES              the title-numbers to convert (use --check to see available titles)
        --chapters CHAPTERS          the chapters to convert (e.g. 2 or 3-4)
        --min-length DURATION        the minimum-track-length - format hh:nn:ss
        --max-length DURATION        the maximum-track-length - format hh:nn:ss
        --skip-duplicates            skip duplicate titles (checks block-size)
        --only-first-track-per-language
                                     convert only first audio-track per language
        --skip-commentaries          ignore commentary-audio- and subtitle-tracks
        --skip-forced                ignore forced subtitles

options passed through handbrake (see handbrake-help for info)
        --large-file
        --encopts OPTIONS
        --quality QUALITY
        --[no-]decomb
        --[no-]detelecine
        --[no-]loose-anamorphic

logging
        --log [LOGFILE]              write all output to LOGFILE
        --log-override               always override logfile
        --log-overview LOGFILE       write additional overview-file
        --create-encode-log          create the handbrake encode-log based on the outputfile-name

expert-options
        --loops LOOPS                processes input LOOPS times (default: 1)
        --wait LOOPS                 retries LOOPS times to wait for input (default: unlimited)
        --xtra ARGS                  additional arguments for handbrake
        --temp DIR                   use DIR as temp-directory
        --debug                      enable debug-mode (doesn't start conversion)
        --verbose                    enable verbose output
        --testdata FILE              read info from/write info to file
        --encoder ENCODER            sets the video-encoder to use (available: x264, mpeg4, mpeg2, theora)
        --qsv                        enables hardware-acceleration with qsv_h264 if available, otherwise x264 will be used
        --x264-profile PRESET        use x264-profile (baseline, main, high, high10, high422, high444)
        --x264-preset PRESET         use x264-preset (ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, placebo)
        --x264-tune OPTION           tune x264 (film, animation, grain, stillimage, psnr, ssim, fastdecode, zerolatency)
        --disable-progress           disables handbrakes progress output

commands to run after input was processed
        --input-done-cmd COMMAND     runs user defined COMMAND (use #file# as placeholder)
        --input-move TARGETDIR       moves file to TARGETDIR
        --input-delete               deletes file
        --input-copy TARGETDIR       copies file to TARGETDIR
        --input-eject                eject tray

commands to run after output was created
        --output-done-cmd COMMAND    runs user defined COMMAND (use #file# as placeholder)
        --output-move TARGETDIR      moves file to TARGETDIR
        --output-copy TARGETDIR      copies file to TARGETDIR

shorts
        --audio-copy                 sets: --audio-track encoder=copy
        --audio-mixdown              sets: --audio-track encoder=ca_aac,mixdown=dpl2
        --movie                      sets: --default --main
        --episodes                   sets: --default --min-length 00:10:00 --max-length 00:50:00 --skip-duplicates
        --default                    sets: --audio deu,eng --subtitles deu,eng --audio-copy --skip-commentaries --only-first-track-per-language
        --bluray                     sets: --no-decomb --no-detelecine --no-loose-anamorphic

hints:
use raw disk devices (e.g. /dev/rdisk1) to ensure that libdvdnav can read the title
see https://forum.handbrake.fr/viewtopic.php?f=10&t=26165&p=120036#p120035

examples:
convert main-feature with all original-tracks (audio and subtitle) for languages german and english
hb.rb --input /dev/rdisk1 --output "~/Movie.m4v" --movie

convert all episodes with all original-tracks (audio and subtitle) for languages german and english
hb.rb --input /dev/rdisk1 --output "~/Series_SeasonX_#pos#.m4v" --episodes

convert complete file or DVD with all tracks, languages etc.
hb.rb --input /dev/rdisk1 --output "~/Output_#pos#.m4v"

convert MKV, add at first the english mixed down track and after that the copied english and german track
hb.rb --input ~/mymovie.mkv --output "~/Output_#pos#.m4v" --audio-track encoder=ca_aac,mixdown=dpl2,language=eng --audio-copy

convert all local DVDs recursive in a directory
hb.rb --input "~/DVD/**/VIDEO_TS" --output "~/#title#_#pos#.m4v"

convert all MKVs in a directory
hb.rb --input "~/MKV/*.mkv" --output "~/#title#.m4v"

convert 10 DVDs, eject disc when done (OSX) and wait for next
hb.rb --input /dev/rdisk1 --output "~/#title_#pos#.m4v" --movie --preset "Android Mid" --loops 10 --input-done-cmd "drutil tray eject"

input not set

tag_episode.rb

Code: Select all

tag_episode.rb Copyright (C) 2013 AlBundy
This program comes with ABSOLUTELY NO WARRANTY; for details see LICENSE.txt.
This is free software, and you are welcome to redistribute it under certain conditions.

For questions, feature-requests etc. visit: https://forum.handbrake.fr/viewtopic.php?f=10&t=26163

Usage: tag_episode [options]
        --provider PROVIDER          tag-provider
		imdb: imdb.com (en)
		sj: serienjunkies.de (de)
        --query QUERY                series QUERY (depending on provider)
        --season NUM                 season number
        --episode NUM                episode number
        --name NAME                  series name (overrides name from provider)
        --test                       test-only
        --tag                        tag file
        --rename                     rename file
        --pattern PATTERN            pattern for the new name (default: #name# - #season#x#episode# - #title# (#title_org#).#filename#)
        --help                       Display this screen

ATTENTION: By default the pattern for the new filename will have the old filename as suffix!!

Code: Select all

requirements
============
To run hb.rb you need an installed ruby-interpreter.
You can get the current version of ruby for your platfrom from http://www.ruby-lang.org/

installation
============
1. download the latest version from https://forum.handbrake.fr/viewtopic.php?f=10&t=26163
2. extract the archive
3. download Handbrake CLI for your platform from http://handbrake.fr/downloads2.php  
4. extract/install Hanbrake CLI to the appropriate folder in hb.rb-installation-folder under tools/handbrake (e.g. HandbrakeCLI.exe to tools/handbrake/windows)
5. repeat step 4 for AtomicParsley and/or Subler if you want to tag your files with tag_epsiodes.rb
6. if you want to work with presets in plist-files you have to install this gem
   gem install plist
7. if you want to use tag_episodes.rb you have to install some gems with following commands
   gem install hpricot
   gem install imdb
8. if you use a ruby-version < 1.9.0 you'll get an error-message when loading imdb - in that case simply open series.rb (path is in stacktrace) and add a \ at the end of line 18
   
run
===
Now you should be able to run hb.rb.
Maybe directly via ./hb.rb or via path_to_ruby/ruby.exe hb.rb

To get a list of possible options and example-calls run hb.rb without any arguments or with --help.

For any questions about hb.rb use also this thread https://forum.handbrake.fr/viewtopic.php?f=10&t=26163

tag and or rename converted files
=================================
If your ripped files are orderd e.g. for According to Jim Season 1
ATJ_S1D1T2.m4v (season 1, disc 1, title 2)
ATJ_S1D1T3.m4v (season 1, disc 1, title 3)
...
you can run
./tag_episode.rb --id Accordingtojim --season 1 --episode 1 --tag --rename ATJ_S1*.m4v
So the first file will have the name and tags for episode 1, the second file for episode 2 and so on. 

useful commands
===============
restart
OSX    : osascript -e 'tell application "System Events" to restart'
windows: shutdown -r -t 0

sleep
OSX    : osascript -e 'tell application "System Events" to sleep'

showdown
OSX    : osascript -e 'tell application "System Events" to shut down'
windows: shutdown -s -t 0

logoff
OSX    : osascript -e 'tell application "System Events" to log out'
windows: shutdown -l -t 0

eject disc
OSX    : drutil tray eject
For a benchmark of x264 vs. qsv_h264 have a look at this thread viewtopic.php?f=9&t=30010
To enable qsv on windows have a look at this thread: viewtopic.php?f=11&t=29498
For encrypted dvd support download the dll according to your handbrake version from here: http://download.videolan.org/pub/videol ... ss/1.2.11/
To directly convert blurays you should have a look at this thread viewtopic.php?f=10&t=30432

viewtopic.php?f=11&t=31197

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Fri Jan 11, 2013 8:35 pm
by ded_ch
You man, are my hero!

I was looking for exactly this. I was able to find a lot of ripping programs with batch support, but none supported all my requirements until I found your solution.
It allows me fully unattended ripping of Episodes and Movies from DVDs with the right Audio Tracks, number of titles and the settings I prefer.

I had to adjust a few settings in your script to fit my needs, but that was just a little tweaking.

I changed the encoder to ffmep4 as my application demands it. Also, I noticed, that if you specify a preset to use, it ignores the --title option when crafting the HandbrakeCLI Command. I found a way around that as well, but I ended up not using the preset option in the end. Still, it would be nice to specify a preset to use (for quality settings, encoder, etc.) and still only rip the titles selected.
Another thing I changed was to include a time stamp into the output file name.
The reason for this is, that a lot of Series DVD's or hand made DVD's have the same Title, so if left unattended, the next DVD out of the series would overwrite the already existing destination files as it would use the same directory. Adding the timestamp to the filename eliminates this problem.

In combination with another great tool/script, created by a guy with the handle quueg, I now have a fully automated 10-Drive ripping station.:
Link to ConsoleDecrypter: http://lime-technology.com/forum/index.php?topic=7045.0

Now, I pop DVD's in all drives and its "set it and forget it" until I find all drives popped out which means I can refill the drives and it just continues.

Thanks so much for the work you have surely put into this.
I highly appreciate it.

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sun Feb 03, 2013 6:10 pm
by AlBundy
I've updated the archive.
--title is now also set if you use a preset

To set the current time into your output-filename you can simply use #ts# as placeholder.

To use another encode you don't have to modify the script - simply pass it as extra-argument to the call.
--xtra "--encoder ffmpeg4"

Al

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sat Feb 09, 2013 11:22 pm
by AlBundy
I've updated the script - now it can also convert files.

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sun Feb 10, 2013 4:53 pm
by AlBundy
handbrake standard-output will now only show in verbose mode (progress comes from standard-error).
add some x264-options.

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sun Feb 24, 2013 4:22 pm
by AlBundy
removed "--large-file" for xbox-compatibility
added argument --preview

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Fri Mar 08, 2013 5:30 pm
by watcher30
I found a small bug in the script: at line 259, you need #{options.preset}, not #{preset}. Patch follows.

Thanks for the script; it helps!

Code: Select all

259c259
<         command << " --preset \"#{preset}\""
---
>         command << " --preset \"#{options.preset}\""

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Fri Mar 08, 2013 7:44 pm
by AlBundy
Thanks for this info - I've uploaded an updated archive with this bugfix.

Al

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sun Mar 10, 2013 2:39 pm
by AlBundy
New options to define own mixdown mappings (e.g copy 5.1 and mixdown 2.0 to stereo)

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sun Mar 10, 2013 3:10 pm
by AlBundy
removed own audio-encoder options (merged with mixdown-options)

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Mon Mar 11, 2013 6:26 pm
by AlBundy
removed --audio-mixdown-mappings and use optional argument to --audio-mixdown instead.

hb.rb --input /dev/rdisk1 --output "~/Desktop/Output_#pos#.m4v" --audio-mixdown "5.1:copy,1.0:mono,2.0:stereo,Dolby Surround:copy"

5.1, Dolby Surround etc. are regular expressions - if the description of an audio-track matches the regex the track will be mixed down.

The correct and maybe more common syntax would be something like this: --audio-mixdown ".*5[.]1.*:copy,.*1[.]0.*:mono,.*2[.]0.*:stereo"
but the example is more readabe and works well....

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Thu Mar 14, 2013 11:18 am
by ultra0
It looks like you've put a lot of time into this script and it looks amazing, so thank you. I realize, by the very fact that we're in a CLI forum, that it'll take a fair amount of scripting knowledge to use this script...

But for the tinkerers like myself, who know no little to nothing about scripting and command line, this thing is in desperate need of a Read Me. :D

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Thu Mar 14, 2013 7:22 pm
by AlBundy
I've added a litte readme.txt - hope this helps.

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sat Mar 23, 2013 4:27 pm
by mcmara
Thank you for sharing your work!
I have one question: I noticed that there are 2 different behaviors:

Invoking the script with only input and output arguments, i.e.:

> hb.rb --input /path/to/dvd --output "~/Desktop/Output_#pos#.m4v"
does indeed convert complete DVD with all tracks and all subtitles.

Instead, if I add a preset:

> hb.rb --input /path/to/dvd --output "~/Desktop/Output_#pos#.m4v" --preset "AppleTV 3"

only the first language track gets included, and there are no subtitles.
Is this normal or am I missing something?

Thanks,

Jack

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sat Mar 23, 2013 5:59 pm
by AlBundy
I've added the possibility to recursive convert directories.
from help:

Code: Select all

convert recursive all local DVDs in a directory
hb.rb --input "~/DVD/**/VIDEO_TS" --output "~/Desktop/#title#_#pos#.m4v"

convert all MKVs in a directory
hb.rb --input "~/MKV/*.mkv" --output "~/Desktop/#title#.m4v"

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sat Mar 23, 2013 6:42 pm
by AlBundy
@Jack: the mentioned behavior is normal because track, subtitles and some other settings are defined in the profile.
If you define a profile I'll not override it (at least currently)
from HandbrakeCLI --preset-list

Code: Select all

   + AppleTV 3:  -e x264  -q 20.0 -r 30 --pfr  -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1920 --decomb="7:2:6:9:1:80" --loose-anamorphic --modulus 2 -m -x b-adapt=2
-e x264 => uses hb.rb too
-q 20.0 => uses hb.rb too
-r 30 => not set to preserve original video framerate
--pfr => not set because -r is not set
-a 1,1 => depends on your language selection
-E faac,copy:ac3 => argumentcount and settings depeding on hb.rb arguments --audio, --audio-copy and --audio-mixdown
-B 160,160 => same as -E
-6 dpl2,auto => same as -E
-R Auto,Auto => same as -E
-D 0.0,0.0 => not set because 0.0 should be default
-f mp4 => set depeding on file extension of your outputfile
-4 => not set because it breaks compatibility with some other devices (e.g. XBOX and PS3)
-X 1920 => no set to preserve original size
--decomb="7:2:6:9:1:80" => I only set --decomb because default is 7:2:6:9:80:16:16:10:20:20:4:2:50:24:1:-1)
--loose-anamorphic => uses hb.rb too
--modulus 2 => no set (uses default 16)
-m => uses hb.rb too
-x b-adapt=2 => not set

You can try to call
hb.rb --input /path/to/dvd --output "~/Desktop/Output_#pos#.m4v" - maybe the output is already playable by your device
If not, you can extend the arguments
hb.rb --input /path/to/dvd --output "~/Desktop/Output_#pos#.m4v" --xtra "-r 30 --pfr -4 -X 1920 --modulus 2 -x b-adapt=2 -D 0.0,0.0"

If you also need reencodeed audio-track additional this arguments to hb.rb: --audio-copy --audio-mixdown

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sat Mar 23, 2013 7:12 pm
by AlBundy
@Jack don't care about my last post - I've uploaded a new version with "full" preset support.
This means I simply add all preset-arguments at the beginning of the argument list and override title, subtitle and audio-settings with my own.
[edit]
You have to use hb.rb's arguments to set your wanted audio-formats (copy, mixdown etc)
[/edit]

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sun Mar 24, 2013 5:19 pm
by mcmara
Thank you for your help above and for your latest upload.
I can see now all the audio tracks and subtitles after the conversion. In particular I found the following

- yes: as you mentioned, the output is already playable on ATV3 with the following string:
hb.rb --input /path/to/dvd --output "~/Desktop/Output_#pos#.m4v" --audio-copy --audio-mixdown

- it works well also with your latest uploaded script and the following arguments:
hb.rb --input /path/to/dvd --output "~/Desktop/Output_#pos#.m4v" --preset "AppleTV 3" --audio-copy --audio-mixdown

- Because subtitles in a DVD are bitmaps, they don't work in iTunes or AppleTV (but they work well in VLC). To have compatible subtitles in the iDevices, I had to add an extra pass with Subler, which does OCR on the bitmaps (unfortunately only with the GUI version subler so far, so I'm still unable to automate the process).

Jack

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sun Mar 24, 2013 10:47 pm
by AlBundy
You can also burn in subtitles.
Maybe you can download the subtitles from internet.

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Thu Mar 28, 2013 12:12 am
by dimaestro
Thanks for the script.

Win7x64 Home Premium
Ruby 193
When I run hb.rb

I receive this output

Code: Select all

C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require':
cannot load such file -- lib/tools.rb (LoadError)
        from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:i
n `require'
        from C:/Users/dim/Desktop/handbrake/hb.rb:8:in `<class:Handbrake>'
        from C:/Users/dim/Desktop/handbrake/hb.rb:6:in `<main>'

Now, from what I guess is it's failing to load the tools.rb from lib/tools.rb

So I edited

Code: Select all

require 'lib/tools.rb
----
require './lib/tools.rb'
This appears to have fixed it. Not sure if this is a bug, or an issue with ruby 193 ( I wasn't sure which one to install, picked the newest non 2.0 release)

Now, will I have to fix all the paths such for Windows? (IE tools or any other path?)

---- Edit
Appears not. I haven't tried atomic or subler, but a straight handbrake encode works.

This is really gonna help me out. Thanks again.

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Thu Mar 28, 2013 4:55 pm
by AlBundy
Thank you very much - I've updated the archive with you fix.

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sun Mar 31, 2013 7:37 pm
by AlBundy
I've uploaded a new version with minor fixes and a modified option to create previews (e.g. to check settings):
--preview 00:01:00-00:02:00
will only encode from timeindex 00:01:00 to 00:02:00 (format hh:mm:ss of course).

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Mon Apr 01, 2013 1:13 am
by AlBundy
I've uploaded a new version which uses audio-settings from preset (but gets titles per language)

e.g.

Code: Select all

./hb.rb --input /dev/rdisk1 --output ~/Desktop/test.m4v --movie --preview --preset "Classic"
produces a command line

Code: Select all

HandBrakeCLI --input "/dev/rdisk1" --output "~/Desktop/test.m4v" -b 1000  --format mp4 --optimize --markers --start-at duration:60 --stop-at duration:60 --audio 2,1 --aencoder faac,faac --arate Auto,Auto --mixdown dpl2,dpl2 --ab 160,160 --drc 0.0,0.0 --aname "Deutsch","English" --audio-fallback faac --subtitle 2,1 --title 1 2>/dev/null
according to the classic-preset.

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sat Apr 06, 2013 3:31 pm
by AlBundy
I've updated the archive.
Script will now wait for input until input exists (checks also modification-time).
I've you don't want to wait forever use the argument --wait-timeout

Also a new argument --input-done-cmd is introduced - this command will be called after a input-file was processed.

If you want to convert multiple DVDs you can use this command

Code: Select all

./hb.rb --input /dev/rdisk1 --output ~/#title_#pos#.m4v --movie --loops 10 --input-done-cmd "drutil tray eject"
This command:
- waits for /dev/rdisk1
- converts main-title
- ejects /dev/rdisk1
- does this steps 10 times

use --loops -1 for endless loops.
On Linux and Windows you have to use other commands to eject the disc of course (you can use #input# as placeholder for input-device)

Re: [Script] rip all episodes or only main-feature from DVD

Posted: Sun Apr 07, 2013 12:15 am
by AlBundy
uploaded new archive.
--output-done-cmd runs a command after an output-file was generated (e.g. to move it to another directory, play it, ...)