[Script] convert episodes or main-feature from DVD or BD or convert multiple files (on any os)
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Re: [Script] rip all episodes or only main-feature from DVD
Thanks for the link - using imdb is a good idea but it seems that imdb provides only english data.
Maybe I'll implement a second provider with imdb-data.
Do you have an idea how to include a gem into my scripts?
--> I don't want that the users has to run gem install imdb manually...
Al
Maybe I'll implement a second provider with imdb-data.
Do you have an idea how to include a gem into my scripts?
--> I don't want that the users has to run gem install imdb manually...
Al
Re: [Script] rip all episodes or only main-feature from DVD
If it were me, I'd package it as a gem. That way to install it they would just run something like 'gem install hbscript' and it would automatically install the dependencies. I work with Ruby every day as my job. If you need any help let me know.
Re: [Script] rip all episodes or only main-feature from DVD
I've uploaded a new archive which includes the hb.rb with the new shebang and tag_episode.rb to tag ripped series.
Currently it supports imdb.com and serienjunkies.de
see readme.txt for requirements of tag_episode.rb.
Currently it supports imdb.com and serienjunkies.de
Code: Select all
Usage: tag_episode [options]
--provider PROVIDER tag-provider
sj: get informations from serienjunkies.de (de) - ID = part of the series-url
imdb: get informations from imdb.com (en) - ID = Name of the series
--id ID series ID (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
-
- Posts: 5
- Joined: Tue May 28, 2013 10:30 pm
Re: [Script] rip all episodes or only main-feature from DVD
justintime001 wrote: First of all, I want to thank you for making such an awesome script...THANK YOU! Saved me so much time encoding all file types per directory.
My issue is this: I am converting MKV files (sometimes AVI or FLV), and I am having one issue when using the AppleTV 3 preset you have designated. When using the "--verbose" command, I notice that there are instances in the injected code for each file that essentially requests the file to encode audio tracks into AC3 files (ffac3). Here's an example: "AC3 Passthru requested and input codec is not AC3 for track 2, using AC3 encoder
AC3 Passthru requested and input codec is not AC3 for track 4, using AC3 encoder"
Basically, all of my files have one or more language audio tracks (almost always more than one) and almost all of them (though sometimes none) have subtitles.
My only issue is that when I use the --preset AppleTV 3 command to ensure what I am encoding works with iTunes, I get an extra track for every AAC track that is AC-3. In some instances when the original track was AC-3 6channel I definitely want those original 6-channel AC3 tracks to stay in the M4V file. For anything more than 2 channels, I want it converted to an AC-3 equivalent. However, since I am batch encoding hundreds of files (tv show series and movies), I am forced to open all these files using Subler and individually remove the AC3-2channel tracks, while being careful keep any AC-3 6-Channel tracks.
I realize that the best way for me to state what I am trying to accomplish is this: Convert all audio tracks to AAC (AppleTV3 preset). If the original is AAC 6-channel, then (unless I am mistaken for iTunes and AppleTV compatibility), I want to retain the AAC 6-Channel while having an extra AAC 2-channel track mixdown to work with Apple TV 3. I want the same to be true for any AC-3 6 channel audio tracks. I never want an AC-3 2-channel track since I will always have/need the AAC 2-channel track for iTunes and Apple TV3 compatibility.
The only reason I want to preserve anything more than 2-channel is for the future when it becomes supported in iTunes/AppleTV (3 or 4 etc.)
Any help at all with this would be immensely appreciated! Thank you!
-Justin
AlBundy wrote:Can you post the used command?
Al
Code: Select all
ruby hb.rb --input "/Volumes/4TB Seagate 2nd/MKV/*.mkv" --output "/Volumes/4TB Seagate 2nd/M4V/#title#.m4v" --preset AppleTV 3 --verbose
Justin
Last edited by justintime001 on Tue Aug 13, 2013 7:17 pm, edited 1 time in total.
Re: [Script] rip all episodes or only main-feature from DVD
You'll probably want to put your preset in quotes as follows:
Code: Select all
--preset "AppleTV 3"
-
- Posts: 5
- Joined: Tue May 28, 2013 10:30 pm
Re: [Script] rip all episodes or only main-feature from DVD
Thanks for the suggestion! I just tried with no difference in results.resinman wrote:You'll probably want to put your preset in quotes as follows:
Code: Select all
--preset "AppleTV 3"
When I eventually learn ruby, I'll hopefully be able to fix problems like this myself and share them with everyone.
Until then, any suggestions/ideas?
Re: [Script] rip all episodes or only main-feature from DVD
If you use a preset the audio-settings from preset should be taken.
I can check this at end of this week, when I'm back at home.
You can check the generated HandbrakeCLI command line.
Al
I can check this at end of this week, when I'm back at home.
You can check the generated HandbrakeCLI command line.
Al
Re: [Script] rip all episodes or only main-feature from DVD
I've checked the generated command line.
preset-settings are this:
generated command line is this (input-file has two audio-tracks):
So in my opinion all looks fine.
Al
preset-settings are this:
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 --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -f mp4 -4 -X 1920 -Y 1080 --decomb=fast --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 4.0
Code: Select all
"~/Documents/workspace/Handbrake/tools/handbrake/osx/HandBrakeCLI" --input "~/Desktop/testfile.mkv" --output "~/Desktop/temp.m4v" -e x264 -q 20.0 -r 30 --pfr --audio-copy-mask aac,ac3,dtshd,dts,mp3 --audio-fallback ffac3 -4 -X 1920 -Y 1080 --decomb=fast --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 4.0 --format mp4 --optimize --markers --title 1 --audio 1,1,2,2 --aencoder faac,copy:ac3,faac,copy:ac3 --arate Auto,Auto,Auto,Auto --mixdown dpl2,auto,dpl2,auto --ab 160,160,160,160 --drc 0.0,0.0,0.0,0.0 --aname "Deutsch","Deutsch","English","English" --audio-fallback faac --subtitle 1 2>/dev/null
Al
Re: [Script] rip all episodes or only main-feature from DVD
How would you use this script to try and rip the main track if it's a dvd movie or all the episodes on a dvd tv show?
Re: [Script] rip all episodes or only main-feature from DVD
-movie converts the main-track and -episodes converts all tracks in a time-range.
Al
Al
Re: [Script] rip all episodes or only main-feature from DVD
I tried to follow the step about ruby installing in windows OS. When I do the script I get errors and I dont know why.
This is my error, anybody can help me to this?
Thanks
C:\Ruby200-x64\bin>ruby.exe c:\handbrake\hb.rb --input "e:\prueba\*.mkv" --outpu
t "\prueba2\#title#.m4v" --preset AppleTV 3 --verbose
C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require
': cannot load such file -- ./lib/hb_lib.rb (LoadError)
from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:4
5:in `require'
from c:/handbrake/hb.rb:4:in `<main>'
This is my error, anybody can help me to this?
Thanks
C:\Ruby200-x64\bin>ruby.exe c:\handbrake\hb.rb --input "e:\prueba\*.mkv" --outpu
t "\prueba2\#title#.m4v" --preset AppleTV 3 --verbose
C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:45:in `require
': cannot load such file -- ./lib/hb_lib.rb (LoadError)
from C:/Ruby200-x64/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:4
5:in `require'
from c:/handbrake/hb.rb:4:in `<main>'
Re: [Script] rip all episodes or only main-feature from DVD
Start the script in c:\handbrake.
Al
Al
Re: [Script] rip all episodes or only main-feature from DVD
I've uploaded a new version.
The new version builds absolute paths to required libs - so you can run the script from every folder.
The new version builds absolute paths to required libs - so you can run the script from every folder.
-
- Posts: 1
- Joined: Sat Sep 14, 2013 2:46 am
Re: [Script] rip all episodes or only main-feature from DVD
Great work. Really great. Thank you.
How is your work licensed? GPL, Apache, Public Domain, etc.
I can't find a license for your work and I was going to put this up on github for my own convenience (so I can keep track of your changes as well as mine), but I don't want to violate your license and of course won't if you prohibit such a use. Please advise.
Thanks again,
Dave
How is your work licensed? GPL, Apache, Public Domain, etc.
I can't find a license for your work and I was going to put this up on github for my own convenience (so I can keep track of your changes as well as mine), but I don't want to violate your license and of course won't if you prohibit such a use. Please advise.
Thanks again,
Dave
Re: [Script] rip all episodes or only main-feature from DVD
I've uploaded a new version with included license (GPLv3) and refactored input- and output-done-commands including some builtin-commands to:
- move
- copy
- delete
- and on osx and linux eject disc
@reassembler: what changes do you want to do an my script?
Al
- move
- copy
- delete
- and on osx and linux eject disc
@reassembler: what changes do you want to do an my script?
Al
Re: [Script] rip all episodes or only main-feature from DVD
The script doesn't seem to work with a custom handbrake preset. Any chance of adding that functionality (or was I just doing something wrong)?
Re: [Script] rip all episodes or only main-feature from DVD
Do you get an error message?
Just have a look at the printed commandline.
Can you use your preset directly with HandbrakeCLI?
Just have a look at the printed commandline.
Can you use your preset directly with HandbrakeCLI?
Re: [Script] rip all episodes or only main-feature from DVD
The CLI has built-in presets hardcoded, there is no support for custom presets.
Re: [Script] rip all episodes or only main-feature from DVD
Well, I thought it was "open source" and anyone could modify its source code to fit their needs if necessary.Rodeo wrote:The CLI has built-in presets hardcoded, there is no support for custom presets.
Re: [Script] rip all episodes or only main-feature from DVD
What's that got to do with it?BlueCrypt wrote:Well, I thought it was "open source" and anyone could modify its source code to fit their needs if necessary.Rodeo wrote:The CLI has built-in presets hardcoded, there is no support for custom presets.
Re: [Script] rip all episodes or only main-feature from DVD
hb.rb is a script on top of HandbrakeCLI.BlueCrypt wrote:Well, I thought it was "open source" and anyone could modify its source code to fit their needs if necessary.Rodeo wrote:The CLI has built-in presets hardcoded, there is no support for custom presets.
Handbrake is open source but I'm not working on the project so feature requests should be posted in the appropriate subforum.
Re: [Script] rip all episodes or only main-feature from DVD
Hi,
thank you for your great effort. I am trying to rip a dvd episode but before I reach that step I followed the steps you mentioned in the readme file but I get error messages that I don't understand, could you please give me a hint, what could be the reason for these errors?
I am running this on windows 7. I installed Ruby1.93 in the root of C drive but I get this error and it does not matter if I use flags with my call, I get the same errors. Could you please help me?
C:\handbrake>ruby.exe hb.rb
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- ftools (LoadError)
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/handbrake/lib/commands.rb:1:in `<top (required)>'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/handbrake/lib/hb_lib.rb:4:in `<top (required)>'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from hb.rb:4:in `<main>'
thank you for your great effort. I am trying to rip a dvd episode but before I reach that step I followed the steps you mentioned in the readme file but I get error messages that I don't understand, could you please give me a hint, what could be the reason for these errors?
I am running this on windows 7. I installed Ruby1.93 in the root of C drive but I get this error and it does not matter if I use flags with my call, I get the same errors. Could you please help me?
C:\handbrake>ruby.exe hb.rb
C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- ftools (LoadError)
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/handbrake/lib/commands.rb:1:in `<top (required)>'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/handbrake/lib/hb_lib.rb:4:in `<top (required)>'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from C:/Ruby193/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
from hb.rb:4:in `<main>'
Re: [Script] rip all episodes or only main-feature from DVD
I've uploaded a new version where I've disabled move, copy and delete commands.
Now you should be able to run the script.
Maybe I can check the real problem on weekend.
Now you should be able to run the script.
Maybe I can check the real problem on weekend.
Re: [Script] rip all episodes or only main-feature from DVD
Thank you very much for your fast response.
Now it works but I have one issue. If I want to use other place holder than #pos# I don't get any correct output. I get this character, "/", for #source# and this one, "_", for #title#. If I do the same thing using GUI, Handbrake is able to read {source} and {title} correctly. Am I missing something?
Now it works but I have one issue. If I want to use other place holder than #pos# I don't get any correct output. I get this character, "/", for #source# and this one, "_", for #title#. If I do the same thing using GUI, Handbrake is able to read {source} and {title} correctly. Am I missing something?
Re: [Script] rip all episodes or only main-feature from DVD
Please run your commandline with the additional argument --check and post the output.
Al
Al