Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

bmorris

macrumors 6502
Original poster
Nov 8, 2007
434
0
ATL
Wirelessly posted (Mozilla/5.0 (iPhone; U; CPU iPhone OS 4_1 like Mac OS X; en-us) AppleWebKit/532.9 (KHTML, like Gecko) Version/4.0.5 Mobile/8B117 Safari/6531.22.7)

I wanted to easily batch convert some Mkv files, about 150, to Apple TV mp4's. I love the Handbrake preset but I can only add one file at a time to the batch list. And unfortunately Compressor doesn't accept mkv's. Is there an easier solution?
 
HandbrakeCLI is your friend here. I will post my script for you. It is so easy it is sick.

EDIT: Okay here it is. Unzip, and put the file called convert into the folder with the mkv's. Then open terminal and type:

Code:
cd /path/to/mkv's
convert

It will convert every file one after another. After a successful conversion it will rename the originals with a .delete suffix. Also after each conversion it will printout how far along it is with converting them all.

EDIT: You need to have HandbrakeCLI installed to /usr/bin/ to use this script. Otherwise, open the script in a text editor and edit the path to handbrake variable at the top of the script. It is easy to see.
 

Attachments

  • convert.zip
    1.9 KB · Views: 818
Last edited:
if this is for an appletv2, you likely don't even have to re-encode. You can use something like mkvtools to batch convert mkv to apple tv friendly mp4's. Some people report issues but I haven't run into any 720p rips that haven't been playable on the appletv2, and it only takes a few minutes to repackage rather than several hour re-encode. You'll need to purchase mkvtools to get access to the batch function, but I think it's only $5. There's a trial version that you can grab to try out.
 
if this is for an appletv2, you likely don't even have to re-encode. You can use something like mkvtools to batch convert mkv to apple tv friendly mp4's. Some people report issues but I haven't run into any 720p rips that haven't been playable on the appletv2, and it only takes a few minutes to repackage rather than several hour re-encode. You'll need to purchase mkvtools to get access to the batch function, but I think it's only $5. There's a trial version that you can grab to try out.

Is MKVTools the correct program or is it MP4Tools since the end result desired are MP4 files?
 
Really...How?
Click source.
Click the folder with all your files in it.
choose that folder as your source.
then go up to "file" and click "add all titles to queue"

it will ask you if you are sure click yes and bam you got it sir!
 
Click source.
Click the folder with all your files in it.
choose that folder as your source.
then go up to "file" and click "add all titles to queue"

it will ask you if you are sure click yes and bam you got it sir!

Good thought but buggy. I tried it with 4 x mkv files in a folder.
Yes, it loaded them all, but
  • audio passthrough didn't work (ignored passthru instruction)
  • subtitles didn't work.

Might be OK for simple conversions when they really are required, but I still don't like the idea of re-encoding a video that really doesn't require re-encoding (with the inevitable loss of quality).

We need a tool that will simply put the files from one container into the other, subs and all, with an option to convert ac3 audio to aac.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.