So I mainly use Linux, but for some tasks I turn to Windows. In this particular case it was setting up my iPad so that my wife could take it to Spain with her, packed with movies, to entertain the kids. This included the use of iTunes. I’m sure there’s some way to make it work in Linux as well, but I thought I’d write a post based on a solution I found in Windows, for once.
I needed to convert existing .avi-files to the format the iPad uses. This is where the program Handbrake comes into play. It’s excellent for converting from one format to another, but it’s the batch-convert part that isn’t too good. So how to solve this? Well, first install Handbrake, then proceed to create a .bat-script in the directory that contains the .avi-files. I do realize that Handbrake has a Add to queue function, but that sort of takes away the point of batch-converting. Rather I specify a folder, then it convert every file in it, than me adding a file manually one by one.
Open up Notepad, and place the following bit of text in it:
1 |
FOR /F "tokens=*" %%G IN ('DIR /B /S *.avi') DO "C:\Program Files\Handbrake\HandBrakeCLI" -i "%%G" -o "%%G".mp4 --preset="iPad" |
When saving the file, remember to select All files on the Save as type-field. Then type in script.bat in the File Name field.
So when you’re done with this, it’s just a case of double-clicking the script to batch convert all of the .avi-files in the directory the script is placed in.
Oh, another word of advice. Make sure your Windows-machine doesn’t hibernate or go to sleep. I learned that the hard way.
Thanks you are star!
Thanks, it’s very Helpful specially with chromecast
You’re welcome! :) From what I could tell last time, VLC (the app) should now be able to play .avi-files on the iPad. The people developing VLC have also mentioned that they’re planning on including support for Chromecast in future releases, so you should check that out!
That script works great.. what im trying to find are other scripts or a packag eof scripts that could be used to watch a folder then convert the video and move and insert in itunes.. similar what i found at the following link but the downloads arent there
https://videoscripts.wordpress.com/2011/11/15/watchfolder-for-handbrake-new-release/
handbrake Watch folder etc
Thanks a lot, your script has helped me to find a way to convert all my video files to be able to play them on Chromecast and saving some space on my hadrdrives.
You’re welcome, glad it helped! :)
This is awesome! I was helping a friend move everything from iMovie to Premiere and he has 500GB of videos that needed converting. This did the trick! Thanks a bunch!
You’re welcome, happy to know it helped!