Perl script which can be used with Cygwin or WSL to generate a Handbrake queue file file.
My purpose was to shrink some of my handycam videos which were stored as .MP4.
You could easily create your own queue with your settings.
- Choose one of your files
- Select the encoding profile you want
- Add to queue
- Open queue
- Export queue as somefile.hbq and open it
- Remove xml-header and <ArrayOfQueueTask> start and end tags
- Keep only your <QueueTask>...</QueueTask> with those tags and save it as task_template.xml alongside this script into the start folder from which you will start your find
- Edit
- <ScannedSourcePath>D:\Someplace\___SOURCE___</ScannedSourcePath>
<Source>D:\Someplace\___SOURCE___</Source>
<Destination>D:\Someplace\___DESTINATION___</Destination>
- <ScannedSourcePath>D:\Someplace\___SOURCE___</ScannedSourcePath>
- This assumes you copy the task_template.xml and the script to /mnt/d/Someplace
- Replace the rest of your path with ___SOURCE___ and ___DESTINATION___
- The script will add the found .MP4 files (if you have others, just alter the script) to ___SOURCE___ and will add the same filename to ___DESTINATION___ as .mkv (you may alter this to your needs too).
- Edit $fileDir in the script to fit your linux style start-path
- Fire the script in a bash at the start-path location and it will generate a file called handbrake_final_queue.hbq
Import this file back into your handbrake queue and you should see all the jobs for all your files found under the start path.