A simple Python script to use Handbrake to convert videos in a folder
Requirements:
- Python3
- HandBrakeCli
- HandBrake exported preset file (*.json)
https://www.python.org/downloads/
https://handbrake.fr/downloads2.php
Copy the binary to executable path:
$sudo cp HandBrakeCLI /usr/local/bin
- Open HandBrake app
- Select "Presets" button at toolbar
- Select any preset
- Select the action button in bottom toolbar
- "Export..."
- Done!
$ python3 convert.py MyHandBrakePreset.json /Data/VideosToConvert`
Also you can mark the script as executable
$ chmod +x convert.py`
Then
$ convert.py MyHandBrakePreset.json /Data/VideosToConvert