To download this script and its dependencies, copy and paste the following commands into your bash terminal.
# Install Dependencies
sudo apt update
sudo apt install ffmpeg wget
# Download Script
sudo wget https://github.com/Valkryst/Automated_Video_Conversion/blob/main/convert.sh
# Modify the script's permissions to allow it to be run.
sudo chmod +x convert.sh
With the script downloaded, you must then perform these steps:
-
Move the script into its own folder.
- e.g.
/home/conversion/video
- e.g.
-
Edit the script and make the following changes:
-
Change
/home/conversion/video
in the commandcd /home/conversion/video
to point to the folder in which you placed the script. -
Change
ubuntu
in the commandchown -R ubuntu "$folder_path"
to your username. -
Change
ubuntu
in the commandchgrp -R ubuntu "$folder_path"
to your username.
-
-
Run the script to generate all necessary subfolders.
-
Add a cron job to run the script at a set interval.
- e.g.
0 * * * * /bin/bash /home/conversion/video/convert.sh > /home/conversion/video/convert.log
- e.g.
Place files and folders in the todo
folder and they will be converted by the cron job.
-
Any folders containing the word
sample
are deleted, along with all files within those folders. -
Any files ending in
.exe
,.jpg
,.jpeg
,.png
,.nfo
or.txt
are deleted. -
Dolby Vision and HDR files are not supported.