DominionZA
Executive Member
I decided to convert my collection to m4v for native compatibility with XBox and ATV. For this I use Handbrake with a PowerShell script.
The script was only written yesterday and still in it's early stages.
The second post contains the script and the post will be updated as the script is updated. If you make any handy mods to the script please post it here and I will update the first post with it.
If you have an issue running this script it is more than likely permission related.
Run Powershell as Administrator and execute the following: Set-ExecutionPolicy RemoteSigned
Should be fine afterwards.
Requirements: Handbrake
Usage: Set the first 6 variables with you root paths
$TVShowsFolder: This is the root folder for your TV Shows
$MoviesFolder: This is the root folder for your Movies.
$TVShowsBackupFolder: Once a TV Show is converted, the original file will be moved to this folder retaining the folder layout.
$MoviesBackupFolder: Once a Movie is converted, the original file will be moved to this folder retaining the folder layout.
$HandbrakeCLI: This is the app used to do the actual work.
$HandbrakePreset: This is the preset to use. I chose AppleTV 3 as it is the most current. On initial install of Handbrake the script failed as it could not find this preset. I had to open Handbrake and instantly it updated it's preset list. The script worked fine afterwards.
This script will find all *.mkv,*.avi,*.mpeg,*.mpg files in collection and convert them to m4v. The converted file is stored in the same location as the original source file.
Once completed, it will move the original source file to your backup location. Ensure you have sufficient write permissions in your backup location. You can delete files from your backup location once you feel satisfied that Handbrake did it's job correctly.
On my Quad Core 3.2Ghz Xeon server, it converts around 1GB per 15 to 20 minutes depending on the codecs uses in the source file. So depending on the size of your collection, expect it to take some time.
Planned:
1. Automate it to run at specified intervals. Any new content will then be converted and backed up.
2. Enable iTunes support.
Enjoy! And if you have any better ways to do this, feel free to comment. I will update the second post if your changes are worthy
The script was only written yesterday and still in it's early stages.
The second post contains the script and the post will be updated as the script is updated. If you make any handy mods to the script please post it here and I will update the first post with it.
If you have an issue running this script it is more than likely permission related.
Run Powershell as Administrator and execute the following: Set-ExecutionPolicy RemoteSigned
Should be fine afterwards.
Requirements: Handbrake
Usage: Set the first 6 variables with you root paths
$TVShowsFolder: This is the root folder for your TV Shows
$MoviesFolder: This is the root folder for your Movies.
$TVShowsBackupFolder: Once a TV Show is converted, the original file will be moved to this folder retaining the folder layout.
$MoviesBackupFolder: Once a Movie is converted, the original file will be moved to this folder retaining the folder layout.
$HandbrakeCLI: This is the app used to do the actual work.
$HandbrakePreset: This is the preset to use. I chose AppleTV 3 as it is the most current. On initial install of Handbrake the script failed as it could not find this preset. I had to open Handbrake and instantly it updated it's preset list. The script worked fine afterwards.
This script will find all *.mkv,*.avi,*.mpeg,*.mpg files in collection and convert them to m4v. The converted file is stored in the same location as the original source file.
Once completed, it will move the original source file to your backup location. Ensure you have sufficient write permissions in your backup location. You can delete files from your backup location once you feel satisfied that Handbrake did it's job correctly.
On my Quad Core 3.2Ghz Xeon server, it converts around 1GB per 15 to 20 minutes depending on the codecs uses in the source file. So depending on the size of your collection, expect it to take some time.
Planned:
1. Automate it to run at specified intervals. Any new content will then be converted and backed up.
2. Enable iTunes support.
Enjoy! And if you have any better ways to do this, feel free to comment. I will update the second post if your changes are worthy