Page 10 of 14

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

Posted: Fri Sep 19, 2014 9:16 am
by AlBundy
--burn is a good idea.

Maybe I'll switch to github in the future. ;-)

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

Posted: Fri Dec 05, 2014 4:09 pm
by RoboJ1M
This is such a fantastic script!

I used this a while back but forgot to backup my configuration and I lost it all when a drive failed.

I'm now in the process of putting it back together again and I'm struggling a bit.

I now have a virtual machine host with a dedicated media ripping VM, which will be based off of hb.rb and abcde for ripping my music and video collection to my new Plex media server (another VM! 8D)

It's using 64bit Ubuntu Server 14.04, so no GUI just command line.

The goal is to build an hb.rb running script which requires as little input as possible and takes everything off the disk. The you the delete what you don't want before publishing it to the NAS which stores all my media.

I tried a DVD which contains 2 58minute expisodes of a box set and part one of a making of documentary.
I used the comand `hb.rb --input /dev/sr0 --output "~/Name S01E#pos#.mp4" --episodes`

But, all it did was encode the the documentary and ignored the episodes.
How do I tell it to just pull all instances of video off the disk?
Also it says something about English and German. I need it to just copy (not transcode) *all* audio and subtitle tracks, setting the default subtitle tracks to default if possible.

Finally, quality. For a 32 minute video it used 370MB. What decisions is it making for that? I want it to choose a good variale bit rate which is better than what you get on the original but at the same time doesn't show any loss in quality. I've got 3TB on the NAS so far, which I can push up to 9TB when I fill the two remaining slots so space is not an issue. No point in wasting it though!

I also want to learn about the episode tagging this time, but I'm going to get the automatic high quality rip process done first.

Many Thanks,

J1M.

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

Posted: Fri Dec 05, 2014 6:58 pm
by AlBundy
According to the help --episodes sets only some other argument to filter tracks ;-)

Code: Select all

        --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
So if you want to convert all titles with coping all audio-tracks and subtitles use

Code: Select all

hb.rb --input /dev/sr0 --output "~/Name S01E#pos#.mp4"
If you want to watch the movies on a big TV I wouldn't recommend to downsize the quality-settings.

If you use plex there's no need to tag the files because plex will lookup all informations (title, description, image etc) automatically.

Al

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

Posted: Fri Dec 05, 2014 11:34 pm
by RoboJ1M
Many thanks!

In my defence, I read the help text but I just failed to understand it! :oops:

Will the following work?

Code: Select all

--episodes --max-length 10:00:00
Is this equivalent to:

Code: Select all

--default --min-length 00:10:00 --max-length 10:00:00 --skip-duplicates
In other words, can I override settings set by --episodes?

I don't think I worded my quality question correctly.

What are the default quality settings? Is it like LAME's VBR modes where it chooses the best bitrate to maintain a level where you can't notice any loss in quality? I don't want to reduce the perceived quality at all, I want it to look identical to the original MPEG2 on the DVD.

I know Plex downloads all the meta data, it matches based on filename. I was wondering whether there is anyway to set the filename based on what information can be gleaned from the DVD, like how you can get the correct metadata from CDDB based on the CD's fingerprint. Or have I got the wrong end of the stick here? I don't mind having to name it myself, I'm just investigating what steps can be eliminated.

Many Thanks,

J1M.

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

Posted: Sat Dec 06, 2014 8:56 pm
by AlBundy
--default is only a shortcut for --audio deu,eng --subtitles deu,eng --audio-copy --skip-commentaries --only-first-track-per-language

I think --min-length 00:10:00 - - skip-duplicates - - audio-copy should be enough for you to encode all titles longer than 10 minutes with all audio-tracks copied.
Bevor calling handbrake hb.rb shows some informations aber inpit and output and also the commandline for HandbrakeCLI

The default encoder is x264 with a qf of 20 or 21 (not sure right know - simply check the output of hb.rb).
The current quality settings are my preferred settings because I used the forum to create them.

Afaik there is nothing like cddb for DVDs and BDs.
Therefore I simple name the files according to plex's suggestions to get them lookedup.

For renaming episodes I use tag_episodes.rb.

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

Posted: Mon Dec 08, 2014 2:15 pm
by xylol
How to remove your --quality x preset? Is there something like --quality "unset". (I do not want to adjust the quality but remove the parameter)
Thank you for the script and your time.

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

Posted: Tue Dec 09, 2014 10:43 am
by Atasco
Sry for the late response... i excluded the folder containing the specific media. seems like handbake cli has a problem with scanning some sort of directorys.

AlBundy wrote:I've uploaded a new version with minor windows-related changes to avoid "no disk" popups.

@Atasco: Can you please explain what your problem was and how you could fix it?

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

Posted: Tue Dec 09, 2014 7:27 pm
by AlBundy
xylol wrote:How to remove your --quality x preset? Is there something like --quality "unset". (I do not want to adjust the quality but remove the parameter)
Thank you for the script and your time.
I've uploaded a new version - if you set a negative quality or simply "" the parameter is omitted.

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

Posted: Tue Dec 09, 2014 7:28 pm
by AlBundy
Atasco wrote:Sry for the late response... i excluded the folder containing the specific media. seems like handbake cli has a problem with scanning some sort of directorys.

AlBundy wrote:I've uploaded a new version with minor windows-related changes to avoid "no disk" popups.

@Atasco: Can you please explain what your problem was and how you could fix it?
What was the content of the folder?
Are you sure that this was a problem of HandbrakeCLI and not my script?

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

Posted: Wed Dec 10, 2014 6:35 am
by Stunner
Dude this is brilliant, just what I was looking for! You have this up on GitHub anywhere? Would be much easier to collaborate/improve it with others on there. Thanks!

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

Posted: Wed Dec 10, 2014 7:30 am
by Stunner
I get the following error:

Code: Select all

$ ruby hb.rb --input /dev/disk1 --output ~/Movies/13/
hb.rb Copyright (C) 2014 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

[2014-12-09, 23:04:30]  WARN -- hb.rb: processing /dev/disk1 (title=, title_alt=, name=disk1)
/Users/Stunner/Downloads/handbrake/lib/hb_lib.rb:920:in `block in convert': error unsupported extension  (RuntimeError)
	from /Users/Stunner/Downloads/handbrake/lib/hb_lib.rb:846:in `each'
	from /Users/Stunner/Downloads/handbrake/lib/hb_lib.rb:846:in `convert'
	from hb.rb:68:in `block (2 levels) in <main>'
	from hb.rb:60:in `each'
	from hb.rb:60:in `block in <main>'
	from hb.rb:48:in `each'
	from hb.rb:48:in `<main>'

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

Posted: Wed Dec 10, 2014 8:02 am
by AlBundy
Of course - you have to specify the output file, not the directory. ;-)

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

Posted: Wed Dec 10, 2014 9:45 pm
by Stunner
Thanks, that did it for me.

Now I am noticing that most of my tracks are being deleted after being written to disk. Your script will write file Output_1.m4v for instance and then when it switches tracks, it deletes Output_1.m4v and creates Output_2.m4v. I currently see Output_6.m4v and Output_10.m4v (its currently writing Output_10.m4v) in Finder. Is it deleting videos that are shorter than a certain duration? If so, how do I make it so that all tracks are kept?

This is the command and log that I see:

Code: Select all

$ ruby hb.rb --input /dev/disk1 --output ~/Movies/Magna/14/Output_#pos#.m4v
hb.rb Copyright (C) 2014 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

[2014-12-10, 13:17:10]  WARN -- hb.rb: processing /dev/disk1 (title=, title_alt=, name=disk1)
[2014-12-10, 13:17:10]  WARN -- hb.rb: input: /dev/disk1 (title=, title_alt=, name=disk1)
[2014-12-10, 13:17:10]  WARN -- hb.rb:   title 1 00:05:23 720x480 (blocks: 93972)
[2014-12-10, 13:17:10]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:17:10]  WARN -- hb.rb:     - track 1: [und] Unknown (AC3) (2.0 ch)
[2014-12-10, 13:17:10]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:17:10]  WARN -- hb.rb:     - track 1: [und] Unknown
[2014-12-10, 13:17:10]  WARN -- hb.rb:     - track 2: [und] Closed Captions
[2014-12-10, 13:17:10]  WARN -- hb.rb: output: /Users/Aaron/Movies/Magna/14/Output_01.m4v
[2014-12-10, 13:17:10]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:17:10]  WARN -- hb.rb:     - track 1: Unknown (AC3) (2.0 ch) - Auto Passthru
[2014-12-10, 13:17:10]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:17:10]  WARN -- hb.rb:     - track 1: Unknown
[2014-12-10, 13:17:10]  WARN -- hb.rb:     - track 2: Closed Captions
[2014-12-10, 13:17:10]  WARN -- hb.rb: "/Users/Aaron/Downloads/handbrake/tools/handbrake/osx/HandBrakeCLI" --input "/dev/disk1" --output "/Users/Aaron/Movies/Magna/14/Output_01.m4v" --encoder x264 --quality 20.0 --decomb --detelecine --crop 0:0:0:0 --loose-anamorphic --format mp4 --optimize --markers --title 1 --audio 1 --aencoder copy --mixdown auto --ab auto --drc 0.0 --aname "Unknown (AC3) (2.0 ch)" --audio-fallback faac --subtitle 1,2  2>/dev/null
Muxing: this may take awhile...(27.06 fps, avg 27.68 fps, ETA 00h03m29s)
[2014-12-10, 13:19:39]  WARN -- hb.rb: Handbrake exited with return-code pid 3295 exit 4 - removing file Output_01.m4v
[2014-12-10, 13:19:39]  WARN -- hb.rb: == done (required time: 00:02:30) =================================
[2014-12-10, 13:19:39]  WARN -- hb.rb: input: /dev/disk1 (title=, title_alt=, name=disk1)
[2014-12-10, 13:19:39]  WARN -- hb.rb:   title 2 (main-feature) 00:11:58 720x480 (blocks: 212369)
[2014-12-10, 13:19:39]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:19:39]  WARN -- hb.rb:     - track 1: [und] Unknown (AC3) (2.0 ch)
[2014-12-10, 13:19:39]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:19:39]  WARN -- hb.rb:     - track 1: [und] Unknown
[2014-12-10, 13:19:39]  WARN -- hb.rb:     - track 2: [und] Closed Captions
[2014-12-10, 13:19:39]  WARN -- hb.rb: output: /Users/Aaron/Movies/Magna/14/Output_02.m4v
[2014-12-10, 13:19:39]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:19:39]  WARN -- hb.rb:     - track 1: Unknown (AC3) (2.0 ch) - Auto Passthru
[2014-12-10, 13:19:39]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:19:39]  WARN -- hb.rb:     - track 1: Unknown
[2014-12-10, 13:19:39]  WARN -- hb.rb:     - track 2: Closed Captions
[2014-12-10, 13:19:39]  WARN -- hb.rb: "/Users/Aaron/Downloads/handbrake/tools/handbrake/osx/HandBrakeCLI" --input "/dev/disk1" --output "/Users/Aaron/Movies/Magna/14/Output_02.m4v" --encoder x264 --quality 20.0 --decomb --detelecine --crop 0:0:0:0 --loose-anamorphic --format mp4 --optimize --markers --title 2 --audio 1 --aencoder copy --mixdown auto --ab auto --drc 0.0 --aname "Unknown (AC3) (2.0 ch)" --audio-fallback faac --subtitle 1,2  2>/dev/null
Encoding: task 1 of 1, 23.70 % (25.75 fps, avg 28.05 fps, ETA 00h09m45s)
[2014-12-10, 13:22:49]  WARN -- hb.rb: Handbrake exited with return-code pid 3302 exit 4 - removing file Output_02.m4v
[2014-12-10, 13:22:49]  WARN -- hb.rb: == done (required time: 00:03:10) =================================
[2014-12-10, 13:22:49]  WARN -- hb.rb: input: /dev/disk1 (title=, title_alt=, name=disk1)
[2014-12-10, 13:22:49]  WARN -- hb.rb:   title 3 00:05:36 720x480 (blocks: 99327)
[2014-12-10, 13:22:49]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:22:49]  WARN -- hb.rb:     - track 1: [und] Unknown (AC3) (2.0 ch)
[2014-12-10, 13:22:49]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:22:49]  WARN -- hb.rb:     - track 1: [und] Unknown
[2014-12-10, 13:22:49]  WARN -- hb.rb:     - track 2: [und] Closed Captions
[2014-12-10, 13:22:49]  WARN -- hb.rb: output: /Users/Aaron/Movies/Magna/14/Output_03.m4v
[2014-12-10, 13:22:49]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:22:49]  WARN -- hb.rb:     - track 1: Unknown (AC3) (2.0 ch) - Auto Passthru
[2014-12-10, 13:22:49]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:22:49]  WARN -- hb.rb:     - track 1: Unknown
[2014-12-10, 13:22:49]  WARN -- hb.rb:     - track 2: Closed Captions
[2014-12-10, 13:22:49]  WARN -- hb.rb: "/Users/Aaron/Downloads/handbrake/tools/handbrake/osx/HandBrakeCLI" --input "/dev/disk1" --output "/Users/Aaron/Movies/Magna/14/Output_03.m4v" --encoder x264 --quality 20.0 --decomb --detelecine --crop 0:0:0:0 --loose-anamorphic --format mp4 --optimize --markers --title 3 --audio 1 --aencoder copy --mixdown auto --ab auto --drc 0.0 --aname "Unknown (AC3) (2.0 ch)" --audio-fallback faac --subtitle 1,2  2>/dev/null
Encoding: task 1 of 1, 25.45 % (33.30 fps, avg 32.49 fps, ETA 00h03m51s)
[2014-12-10, 13:24:16]  WARN -- hb.rb: Handbrake exited with return-code pid 3306 exit 4 - removing file Output_03.m4v
[2014-12-10, 13:24:16]  WARN -- hb.rb: == done (required time: 00:01:27) =================================
[2014-12-10, 13:24:16]  WARN -- hb.rb: input: /dev/disk1 (title=, title_alt=, name=disk1)
[2014-12-10, 13:24:16]  WARN -- hb.rb:   title 4 00:07:38 720x480 (blocks: 134927)
[2014-12-10, 13:24:16]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:24:16]  WARN -- hb.rb:     - track 1: [und] Unknown (AC3) (2.0 ch)
[2014-12-10, 13:24:16]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:24:16]  WARN -- hb.rb:     - track 1: [und] Unknown
[2014-12-10, 13:24:16]  WARN -- hb.rb:     - track 2: [und] Closed Captions
[2014-12-10, 13:24:16]  WARN -- hb.rb: output: /Users/Aaron/Movies/Magna/14/Output_04.m4v
[2014-12-10, 13:24:16]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:24:16]  WARN -- hb.rb:     - track 1: Unknown (AC3) (2.0 ch) - Auto Passthru
[2014-12-10, 13:24:16]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:24:16]  WARN -- hb.rb:     - track 1: Unknown
[2014-12-10, 13:24:16]  WARN -- hb.rb:     - track 2: Closed Captions
[2014-12-10, 13:24:16]  WARN -- hb.rb: "/Users/Aaron/Downloads/handbrake/tools/handbrake/osx/HandBrakeCLI" --input "/dev/disk1" --output "/Users/Aaron/Movies/Magna/14/Output_04.m4v" --encoder x264 --quality 20.0 --decomb --detelecine --crop 0:0:0:0 --loose-anamorphic --format mp4 --optimize --markers --title 4 --audio 1 --aencoder copy --mixdown auto --ab auto --drc 0.0 --aname "Unknown (AC3) (2.0 ch)" --audio-fallback faac --subtitle 1,2  2>/dev/null
Encoding: task 1 of 1, 31.62 % (35.95 fps, avg 30.88 fps, ETA 00h05m05s)
[2014-12-10, 13:26:45]  WARN -- hb.rb: Handbrake exited with return-code pid 3313 exit 4 - removing file Output_04.m4v
[2014-12-10, 13:26:45]  WARN -- hb.rb: == done (required time: 00:02:29) =================================
[2014-12-10, 13:26:45]  WARN -- hb.rb: input: /dev/disk1 (title=, title_alt=, name=disk1)
[2014-12-10, 13:26:45]  WARN -- hb.rb:   title 5 00:05:27 720x480 (blocks: 94133)
[2014-12-10, 13:26:45]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:26:45]  WARN -- hb.rb:     - track 1: [und] Unknown (AC3) (2.0 ch)
[2014-12-10, 13:26:45]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:26:45]  WARN -- hb.rb:     - track 1: [und] Unknown
[2014-12-10, 13:26:45]  WARN -- hb.rb:     - track 2: [und] Closed Captions
[2014-12-10, 13:26:45]  WARN -- hb.rb: output: /Users/Aaron/Movies/Magna/14/Output_05.m4v
[2014-12-10, 13:26:45]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:26:45]  WARN -- hb.rb:     - track 1: Unknown (AC3) (2.0 ch) - Auto Passthru
[2014-12-10, 13:26:45]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:26:45]  WARN -- hb.rb:     - track 1: Unknown
[2014-12-10, 13:26:45]  WARN -- hb.rb:     - track 2: Closed Captions
[2014-12-10, 13:26:45]  WARN -- hb.rb: "/Users/Aaron/Downloads/handbrake/tools/handbrake/osx/HandBrakeCLI" --input "/dev/disk1" --output "/Users/Aaron/Movies/Magna/14/Output_05.m4v" --encoder x264 --quality 20.0 --decomb --detelecine --crop 0:0:0:0 --loose-anamorphic --format mp4 --optimize --markers --title 5 --audio 1 --aencoder copy --mixdown auto --ab auto --drc 0.0 --aname "Unknown (AC3) (2.0 ch)" --audio-fallback faac --subtitle 1,2  2>/dev/null
Encoding: task 1 of 1, 23.86 % (26.32 fps, avg 27.32 fps, ETA 00h04m33s)
[2014-12-10, 13:28:18]  WARN -- hb.rb: Handbrake exited with return-code pid 3433 exit 4 - removing file Output_05.m4v
[2014-12-10, 13:28:18]  WARN -- hb.rb: == done (required time: 00:01:33) =================================
[2014-12-10, 13:28:18]  WARN -- hb.rb: input: /dev/disk1 (title=, title_alt=, name=disk1)
[2014-12-10, 13:28:18]  WARN -- hb.rb:   title 6 00:06:12 720x480 (blocks: 110236)
[2014-12-10, 13:28:18]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:28:18]  WARN -- hb.rb:     - track 1: [und] Unknown (AC3) (2.0 ch)
[2014-12-10, 13:28:18]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:28:18]  WARN -- hb.rb:     - track 1: [und] Unknown
[2014-12-10, 13:28:18]  WARN -- hb.rb:     - track 2: [und] Closed Captions
[2014-12-10, 13:28:18]  WARN -- hb.rb: output: /Users/Aaron/Movies/Magna/14/Output_06.m4v
[2014-12-10, 13:28:18]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:28:18]  WARN -- hb.rb:     - track 1: Unknown (AC3) (2.0 ch) - Auto Passthru
[2014-12-10, 13:28:18]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:28:18]  WARN -- hb.rb:     - track 1: Unknown
[2014-12-10, 13:28:18]  WARN -- hb.rb:     - track 2: Closed Captions
[2014-12-10, 13:28:18]  WARN -- hb.rb: "/Users/Aaron/Downloads/handbrake/tools/handbrake/osx/HandBrakeCLI" --input "/dev/disk1" --output "/Users/Aaron/Movies/Magna/14/Output_06.m4v" --encoder x264 --quality 20.0 --decomb --detelecine --crop 0:0:0:0 --loose-anamorphic --format mp4 --optimize --markers --title 6 --audio 1 --aencoder copy --mixdown auto --ab auto --drc 0.0 --aname "Unknown (AC3) (2.0 ch)" --audio-fallback faac --subtitle 1,2  2>/dev/null
Muxing: this may take awhile... (26.32 fps, avg 24.50 fps, ETA 00h00m00s)
[2014-12-10, 13:36:05]  WARN -- hb.rb: created file /Users/Aaron/Movies/Magna/14/Output_06.m4v (125.27 MB)
[2014-12-10, 13:36:06]  WARN -- hb.rb: == done (required time: 00:07:48) =================================
[2014-12-10, 13:36:06]  WARN -- hb.rb: input: /dev/disk1 (title=, title_alt=, name=disk1)
[2014-12-10, 13:36:06]  WARN -- hb.rb:   title 7 00:07:12 720x480 (blocks: 125497)
[2014-12-10, 13:36:06]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:36:06]  WARN -- hb.rb:     - track 1: [und] Unknown (AC3) (2.0 ch)
[2014-12-10, 13:36:06]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:36:06]  WARN -- hb.rb:     - track 1: [und] Unknown
[2014-12-10, 13:36:06]  WARN -- hb.rb:     - track 2: [und] Closed Captions
[2014-12-10, 13:36:06]  WARN -- hb.rb: output: /Users/Aaron/Movies/Magna/14/Output_07.m4v
[2014-12-10, 13:36:06]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:36:06]  WARN -- hb.rb:     - track 1: Unknown (AC3) (2.0 ch) - Auto Passthru
[2014-12-10, 13:36:06]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:36:06]  WARN -- hb.rb:     - track 1: Unknown
[2014-12-10, 13:36:06]  WARN -- hb.rb:     - track 2: Closed Captions
[2014-12-10, 13:36:06]  WARN -- hb.rb: "/Users/Aaron/Downloads/handbrake/tools/handbrake/osx/HandBrakeCLI" --input "/dev/disk1" --output "/Users/Aaron/Movies/Magna/14/Output_07.m4v" --encoder x264 --quality 20.0 --decomb --detelecine --crop 0:0:0:0 --loose-anamorphic --format mp4 --optimize --markers --title 7 --audio 1 --aencoder copy --mixdown auto --ab auto --drc 0.0 --aname "Unknown (AC3) (2.0 ch)" --audio-fallback faac --subtitle 1,2  2>/dev/null
Encoding: task 1 of 1, 20.79 % (32.43 fps, avg 29.38 fps, ETA 00h05m49s)
[2014-12-10, 13:37:45]  WARN -- hb.rb: Handbrake exited with return-code pid 3453 exit 4 - removing file Output_07.m4v
[2014-12-10, 13:37:45]  WARN -- hb.rb: == done (required time: 00:01:39) =================================
[2014-12-10, 13:37:45]  WARN -- hb.rb: input: /dev/disk1 (title=, title_alt=, name=disk1)
[2014-12-10, 13:37:45]  WARN -- hb.rb:   title 8 00:01:16 720x480 (blocks: 20853)
[2014-12-10, 13:37:45]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:37:45]  WARN -- hb.rb:     - track 1: [und] Unknown (AC3) (2.0 ch)
[2014-12-10, 13:37:45]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:37:45]  WARN -- hb.rb:     - track 1: [und] Unknown
[2014-12-10, 13:37:45]  WARN -- hb.rb:     - track 2: [und] Closed Captions
[2014-12-10, 13:37:45]  WARN -- hb.rb: output: /Users/Aaron/Movies/Magna/14/Output_08.m4v
[2014-12-10, 13:37:45]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:37:45]  WARN -- hb.rb:     - track 1: Unknown (AC3) (2.0 ch) - Auto Passthru
[2014-12-10, 13:37:45]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:37:45]  WARN -- hb.rb:     - track 1: Unknown
[2014-12-10, 13:37:45]  WARN -- hb.rb:     - track 2: Closed Captions
[2014-12-10, 13:37:45]  WARN -- hb.rb: "/Users/Aaron/Downloads/handbrake/tools/handbrake/osx/HandBrakeCLI" --input "/dev/disk1" --output "/Users/Aaron/Movies/Magna/14/Output_08.m4v" --encoder x264 --quality 20.0 --decomb --detelecine --crop 0:0:0:0 --loose-anamorphic --format mp4 --optimize --markers --title 8 --audio 1 --aencoder copy --mixdown auto --ab auto --drc 0.0 --aname "Unknown (AC3) (2.0 ch)" --audio-fallback faac --subtitle 1,2  2>/dev/null
Muxing: this may take awhile... (35.40 fps, avg 30.43 fps, ETA 00h00m00s)
[2014-12-10, 13:39:10]  WARN -- hb.rb: Handbrake exited with return-code pid 3457 exit 4 - removing file Output_08.m4v
[2014-12-10, 13:39:10]  WARN -- hb.rb: == done (required time: 00:01:25) =================================
[2014-12-10, 13:39:10]  WARN -- hb.rb: input: /dev/disk1 (title=, title_alt=, name=disk1)
[2014-12-10, 13:39:10]  WARN -- hb.rb:   title 9 00:10:21 720x480 (blocks: 183556)
[2014-12-10, 13:39:10]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:39:10]  WARN -- hb.rb:     - track 1: [und] Unknown (AC3) (2.0 ch)
[2014-12-10, 13:39:10]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:39:10]  WARN -- hb.rb:     - track 1: [und] Unknown
[2014-12-10, 13:39:10]  WARN -- hb.rb:     - track 2: [und] Closed Captions
[2014-12-10, 13:39:10]  WARN -- hb.rb: output: /Users/Aaron/Movies/Magna/14/Output_09.m4v
[2014-12-10, 13:39:10]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:39:10]  WARN -- hb.rb:     - track 1: Unknown (AC3) (2.0 ch) - Auto Passthru
[2014-12-10, 13:39:10]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:39:10]  WARN -- hb.rb:     - track 1: Unknown
[2014-12-10, 13:39:10]  WARN -- hb.rb:     - track 2: Closed Captions
[2014-12-10, 13:39:10]  WARN -- hb.rb: "/Users/Aaron/Downloads/handbrake/tools/handbrake/osx/HandBrakeCLI" --input "/dev/disk1" --output "/Users/Aaron/Movies/Magna/14/Output_09.m4v" --encoder x264 --quality 20.0 --decomb --detelecine --crop 0:0:0:0 --loose-anamorphic --format mp4 --optimize --markers --title 9 --audio 1 --aencoder copy --mixdown auto --ab auto --drc 0.0 --aname "Unknown (AC3) (2.0 ch)" --audio-fallback faac --subtitle 1,2  2>/dev/null
Encoding: task 1 of 1, 21.26 % (21.17 fps, avg 27.40 fps, ETA 00h08m55s)
[2014-12-10, 13:41:42]  WARN -- hb.rb: Handbrake exited with return-code pid 3461 exit 4 - removing file Output_09.m4v
[2014-12-10, 13:41:42]  WARN -- hb.rb: == done (required time: 00:02:32) =================================
[2014-12-10, 13:41:42]  WARN -- hb.rb: input: /dev/disk1 (title=, title_alt=, name=disk1)
[2014-12-10, 13:41:42]  WARN -- hb.rb:   title 10 00:07:48 720x480 (blocks: 138677)
[2014-12-10, 13:41:42]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:41:42]  WARN -- hb.rb:     - track 1: [und] Unknown (AC3) (2.0 ch)
[2014-12-10, 13:41:42]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:41:42]  WARN -- hb.rb:     - track 1: [und] Unknown
[2014-12-10, 13:41:42]  WARN -- hb.rb:     - track 2: [und] Closed Captions
[2014-12-10, 13:41:42]  WARN -- hb.rb: output: /Users/Aaron/Movies/Magna/14/Output_10.m4v
[2014-12-10, 13:41:42]  WARN -- hb.rb:   audio-tracks
[2014-12-10, 13:41:42]  WARN -- hb.rb:     - track 1: Unknown (AC3) (2.0 ch) - Auto Passthru
[2014-12-10, 13:41:42]  WARN -- hb.rb:   subtitles
[2014-12-10, 13:41:42]  WARN -- hb.rb:     - track 1: Unknown
[2014-12-10, 13:41:42]  WARN -- hb.rb:     - track 2: Closed Captions
[2014-12-10, 13:41:42]  WARN -- hb.rb: "/Users/Aaron/Downloads/handbrake/tools/handbrake/osx/HandBrakeCLI" --input "/dev/disk1" --output "/Users/Aaron/Movies/Magna/14/Output_10.m4v" --encoder x264 --quality 20.0 --decomb --detelecine --crop 0:0:0:0 --loose-anamorphic --format mp4 --optimize --markers --title 10 --audio 1 --aencoder copy --mixdown auto --ab auto --drc 0.0 --aname "Unknown (AC3) (2.0 ch)" --audio-fallback faac --subtitle 1,2  2>/dev/null
Encoding: task 1 of 1, 45.47 % (20.73 fps, avg 21.18 fps, ETA 00h06m02s)

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

Posted: Wed Dec 10, 2014 10:19 pm
by AlBundy
The files are deleted because handbrake exited with another exit code than 0.

Handbrake exited with return-code pid 3295 exit 4 - removing file Output_01.m4v

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

Posted: Thu Dec 11, 2014 11:46 pm
by Stunner
Interesting... If I rip the DVD through the GUI it works for all tracks except 1 (of course the disc is scanned first). Any idea why it works on the GUI but doesn't through the HandbrakeCLI?

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

Posted: Sat Dec 13, 2014 12:41 am
by AlBundy
Enable the encode log - maybe we find the reason there.

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

Posted: Tue Dec 16, 2014 7:55 pm
by AlBundy
I've uploaded a new version with a bugfix for the last added option...

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

Posted: Thu Dec 18, 2014 7:38 pm
by AlBundy
I've migrated my local svn repository to github.
You'll find the project page on the first page.

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

Posted: Sun Dec 21, 2014 8:59 pm
by mortenfirst
Hi,

Is it possible to use the full commandline HandBrakeCLI to define encoding settings. I mean, instead of supplying the script with a plist, then just add a command like this:
-f mkv --detelecine --decomb --strict-anamorphic -e x264 -q 20 --vfr -a 1 -E faac -B 160 -6 dpl2 -R 48 -D 0 --gain=0 --audio-copy-mask none --audio-fallback ffac3 --subtitle 1 -x ref=9:weightp=1:subq=9:rc-lookahead=60:trellis=2:bframes=8:b-adapt=2:direct=auto:me=hex:merange=24:analyse=all:deblock=-1,-1:psy-rd=1.00,0.15:nr=100 --verbose=1

I can't get the plist to work with my linux setup.

Or can I convert this command to a plist by any means?

Best Regards,
Morten

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

Posted: Sun Dec 21, 2014 9:32 pm
by AlBundy
You can use --xtra to send arguments directly to HandbrakeCLI.

Can you explain, why plist is not working?

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

Posted: Sun Dec 21, 2014 10:48 pm
by mortenfirst
I think there is some sort of error in my plist file. I get the same error as this guy:
Eelisland wrote:Hello Al,

Many thanks for very quick reply and sorry, i'have read every post of the forum and forget the readme :oops:

I have installed plist as root

Code: Select all

gem install plist
Fetching: plist-3.1.0.gem (100%)
Successfully installed plist-3.1.0
1 gem installed
Installing ri documentation for plist-3.1.0...
Installing RDoc documentation for plist-3.1.0...

Code: Select all

gem list

*** LOCAL GEMS ***

bigdecimal (1.1.0)
io-console (0.3)
json (1.5.5)
minitest (2.5.1)
plist (3.1.0)
rake (0.9.2.2)
rdoc (3.9.5)
I get this error:

Code: Select all

bash-4.2$ hb.rb --help
/usr/lib64/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
hb.rb Copyright (C) 2014 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

/home/toto/.ruby-handbrake/lib/manicure.rb:841:in `generateCLIParse': undefined method `to_i' for true:TrueClass (NoMethodError)
        from /home/toto/.ruby-handbrake/lib/manicure.rb:158:in `displayIndividualPreset'
        from /home/toto/.ruby-handbrake/lib/manicure.rb:120:in `block in displayCommandStrings'
        from /home/toto/.ruby-handbrake/lib/manicure.rb:115:in `each'
        from /home/toto/.ruby-handbrake/lib/manicure.rb:115:in `displayCommandStrings'
        from /home/toto/.ruby-handbrake/lib/manicure.rb:108:in `initialize'
        from /home/toto/.ruby-handbrake/lib/hb_lib.rb:498:in `initialize'
        from /home/toto/.ruby-handbrake/lib/hb_lib.rb:523:in `new'
        from /home/toto/.ruby-handbrake/lib/hb_lib.rb:523:in `loadPlist'
        from /home/toto/.ruby-handbrake/lib/hb_lib.rb:462:in `block in getPresets'
        from /home/toto/.ruby-handbrake/lib/hb_lib.rb:461:in `glob'
        from /home/toto/.ruby-handbrake/lib/hb_lib.rb:461:in `getPresets'
        from /home/toto/.ruby-handbrake/lib/hb_lib.rb:227:in `block in parseArgs'
        from /usr/lib64/ruby/1.9.1/optparse.rb:882:in `initialize'
        from /home/toto/.ruby-handbrake/lib/hb_lib.rb:170:in `new'
        from /home/toto/.ruby-handbrake/lib/hb_lib.rb:170:in `parseArgs'
        from ./hb.rb:14:in `<main>' 
Any other info i can provide? again many thanks for your help.
But when i use the --xtra argument, some of the setting is double, and thats not good. Because some of them are conflicting as they are not the same. So i would like to get the plist to work, or get the command translated into a plist?

Can your script handle copy protection? I just experienced an error with one DVD where the script got stuck after scanning the disc on:

Code: Select all

waiting for /dev/sr0...
Another thing, shouldn't it be possible to choose multiple audio tracks? If it is, how do i do that? If i just use --audio eng, dan I will only use the english one.
This is possible, I have just added a space between eng, dan. The correct syntax is: --audio eng,dan

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

Posted: Sun Dec 21, 2014 11:28 pm
by AlBundy
Can you upload your plist-file?

The script only automates HandbrakeCLI and has nothing to do with copy protection.
It seems that the device-file is not available (that's the only reason to get a waiting for /dev/sr0)

eng,dan is the correct syntax.
Before conversion you'll seethe available and selected tracks.

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

Posted: Sun Dec 21, 2014 11:40 pm
by mortenfirst
My plist file is:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
	<dict>
		<key>AudioAllowAACPass</key>
		<true />
		<key>AudioAllowAC3Pass</key>
		<true />
		<key>AudioAllowDTSHDPass</key>
		<true />
		<key>AudioAllowDTSPass</key>
		<true />
		<key>AudioAllowMP3Pass</key>
		<true />
		<key>AudioEncoderFallback</key>
		<string>AC3 (ffmpeg)</string>
		<key>AudioList</key>
		<array>
			<dict>
				<key>AudioBitrate</key>
				<string>160</string>
				<key>AudioEncoder</key>
				<string>AAC (faac)</string>
				<key>AudioEncoderActual</key>
				<string>faac</string>
				<key>AudioMixdown</key>
				<string>Dolby Surround</string>
				<key>AudioSamplerate</key>
				<string>Auto</string>
				<key>AudioTrack</key>
				<integer>1</integer>
				<key>AudioTrackDRCSlider</key>
				<real>0</real>
				<key>AudioTrackDescription</key>
				<string>Dansk (AC3) (Dolby Surround)</string>
				<key>AudioTrackGain</key>
				<real>0</real>
				<key>AudioTrackName</key>
				<string></string>
				<key>AudioTrackQuality</key>
				<real>-1</real>
				<key>AudioTrackQualityEnable</key>
				<false />
			</dict>
		</array>
		<key>ChapterMarkers</key>
		<true />
		<key>Default</key>
		<false />
		<key>FileFormat</key>
		<string>MKV file</string>
		<key>Folder</key>
		<false />
		<key>Mp4HttpOptimize</key>
		<false />
		<key>Mp4LargeFile</key>
		<false />
		<key>Mp4iPodCompatible</key>
		<false />
		<key>PictureAutoCrop</key>
		<true />
		<key>PictureBottomCrop</key>
		<integer>0</integer>
		<key>PictureDeblock</key>
		<integer>4</integer>
		<key>PictureDecomb</key>
		<integer>2</integer>
		<key>PictureDecombCustom</key>
		<string></string>
		<key>PictureDecombDeinterlace</key>
		<true />
		<key>PictureDeinterlace</key>
		<integer>0</integer>
		<key>PictureDeinterlaceCustom</key>
		<string></string>
		<key>PictureDenoise</key>
		<integer>0</integer>
		<key>PictureDenoiseCustom</key>
		<string></string>
		<key>PictureDetelecine</key>
		<integer>2</integer>
		<key>PictureDetelecineCustom</key>
		<string></string>
		<key>PictureKeepRatio</key>
		<true />
		<key>PictureLeftCrop</key>
		<integer>2</integer>
		<key>PictureLooseCrop</key>
		<true />
		<key>PictureModulus</key>
		<integer>2</integer>
		<key>PicturePAR</key>
		<string>1</string>
		<key>PicturePARHeight</key>
		<integer>45</integer>
		<key>PicturePARWidth</key>
		<integer>64</integer>
		<key>PictureRightCrop</key>
		<integer>0</integer>
		<key>PictureTopCrop</key>
		<integer>4</integer>
		<key>PresetBuildNumber</key>
		<integer>2014022799</integer>
		<key>PresetDescription</key>
		<string>HandBrake&apos;s normal, default settings.</string>
		<key>PresetName</key>
		<string>morten</string>
		<key>SubtitleList</key>
		<array>
		</array>
		<key>Type</key>
		<integer>1</integer>
		<key>UsesPictureFilters</key>
		<integer>1</integer>
		<key>UsesPictureSettings</key>
		<integer>2</integer>
		<key>VideoAvgBitrate</key>
		<integer>1500</integer>
		<key>VideoEncoder</key>
		<string>H.264 (x264)</string>
		<key>VideoFramerate</key>
		<string>Same as source</string>
		<key>VideoFramerateMode</key>
		<string>vfr</string>
		<key>VideoGrayScale</key>
		<false />
		<key>VideoQualitySlider</key>
		<integer>20</integer>
		<key>VideoQualityType</key>
		<integer>2</integer>
		<key>VideoTargetSize</key>
		<integer>700</integer>
		<key>VideoTurboTwoPass</key>
		<false />
		<key>VideoTwoPass</key>
		<false />
		<key>lavcOption</key>
		<string></string>
		<key>x264Option</key>
		<string>ref=9:weightp=1:subme=9:rc-lookahead=60:trellis=2:bframes=16:b-adapt=2:direct=auto:me=hex:merange=24:partitions=all:deblock=-1,-1:psy-rd=1|0,15:nr=100</string>
	</dict>
</array>
</plist>
Which should correspond to the command:
-f mkv --detelecine --decomb --strict-anamorphic -e x264 -q 20 --vfr -a 1 -E faac -B 160 -6 dpl2 -R 48 -D 0 --gain=0 --audio-copy-mask none --audio-fallback ffac3 -x ref=9:weightp=1:subq=9:rc-lookahead=60:trellis=2:bframes=16:b-adapt=2:direct=auto:me=hex:merange=24:analyse=all:deblock=-1,-1:psy-rd=1.00,0.15:nr=100 --verbose=1

What is the device-file? I can get it to work with other discs than just this one. I am just wondering what can cause this.

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

Posted: Sun Dec 21, 2014 11:50 pm
by AlBundy
I think I can fix the plist-error.
/dev/sr0 is a device file. :-)

If you get waiting for /dev/sr0... in my script you should also get an error message in terminal if you run ls /dev/sr0

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

Posted: Mon Dec 22, 2014 1:51 am
by AlBundy
It seems that you have an old plist-file.
Please use the latest version of Handbrake to export the plist-file.
--> Instead of true and false, integers of 1 and 0 should be used.

I've also made some changes for plist-preset - please test your new file with the current version (https://github.com/AlBundy33/hb_rb/tree/master/build).

Al