Page 1 of 1

Handbrake Script/Program For Batch Video Conversion Needed

PostPosted: Sep 19th, '18, 05:22
by yankee495
Hello,

I have a 4TB hard drive with 573 folders in it. They are standard DVD rip folders. Each folder is a ripped DVD with a main folder and a VIDEO_TS sub folder etc.
I need to encode each folder to a h.264 .m4v file. I thought Handbrake had batch conversion and it sort of does. But it's going to be very time consuming because you have to add each movie folder to the queue manually, which would take a week. Ok, maybe just a few hours, but it's sure to be error prone because of human error.

I'd like to have a good program with GUI to do this but a script will work. I'd like to keep it as simple as possible for myself and other users, but I'm open to any suggestions that work. I'm going to copy them all to a new 3TB HDD as they are encoded to h.264, then move them back to the original 4TB HDD after the size is reduced. I'm hoping to end up with 600 GB or so of h.264 movies with a lot of free space on the 4TB drive. I figured someone has done something similar and there isn't any point in reinventing the wheel. Thank you.

Re: Handbrake Script/Program For Batch Video Conversion Need

PostPosted: Sep 19th, '18, 20:23
by doktor5000

Re: Handbrake Script/Program For Batch Video Conversion Need

PostPosted: Sep 21st, '18, 23:07
by yankee495
Thanks Dok,

I've read that and it may be a big help in figuring this out. The Windows version has a "Open Folder" type option that the Linux version doesn't have. I'm not sure how it works but I know it's there. I believe it takes mp4 or AVI files and processes them all the same way, but will not work with DVD files.

My problem is these are DVD rips with a top title folder and AUDIO_TS and VIDEO_TS sub folders with several .vob files. I need it to open the top folder (which will also be the name of the movie and the file it produces) and parse the vob's then add it to the queue automatically. It can't do that, at least the Linux version can't. I thought about listing the directory and redirecting the output to a text file, then editing the text file to add the command at the front (HandBrakeCLI -i VIDEO_TS -o) and options at the end (-e x264 -q 20 -B 160). Then that would run like a batch file with one trans-code command per line. That might actually work but I've been to busy to play around with it and I don't think it takes chapters and other DVD specific info into account.

Really, just parsing the folders and adding them to a queue would do the job. I've found several scripts people have written to add all kinds of media files to the queue, but none that add a movie in a DVD structured folder format. I'm going to look around a bit more right now while I have a little time. I could probably work at it until I got it going but I was hoping someone had already did that. I believe someone with experience in scripting could do this in a half hour and it might take me quite awhile. It's worth doing though, so I might just give it a shot, at least try.