Before I say anything else, this particular process requires a Windows pc. Sorry linux/mac users. If you examine my script you might be able to recreate what it is doing and make something even better than I have. MSDOS is very limited...
Anyways, a week or so ago I wanted to load a softsubbed file onto my T-Mobile G1 to watch while riding in someone's car. I quickly discovered that softsub support on the plethora of video conversion apps is lacking for matroska files. Some apps can do it, but they require the subtitle file to first be extracted from the MKV. Annoying.
I was also kind of annoyed at the fact that pretty much all of the converters felt bloated and slow. Some of them were chalk full of ads, even the one I found on sourceforge... I just wanted something quick and simple without any other crap. So I created a batch file that will encode any video file I drag on top of it and packaged it into a self-contained zip archive.
Convert MP4 Portable 1.1.2
Before you begin you must obtain a copy of neroAacEnc.exe and MP4Box.exe and plug them into their respective folders in the "tools" directory. It is a pain in the ass, but distributing binary versions of these files is legally dubious so I'm covering myself by keeping them out of the zip. NeroAacEnc can be found at the Nero website which is linked below. If you have ZarxGUI then you probably already have MP4Box somewhere on your computer... if not search the internet for mp4box builds. Aside from GPAC source code, I will not be linking to mp4box binaries here.
neroAacEnc download link
MP4Box source code
To convert files you have two options:
- You can drag a single video onto the batch file or...
- You can fill the "files_to_process" folder with videos and then double click on the batch file. In this case, once the original video files are processed they will be moved to the "processed_files" folder.
There are some pros and cons to this approach, most of the cons are a result of MS DOS limitations.
PROS
- Simple (drag file onto batch, wait for process to finish, load file onto your ipod/android device)
- Batch processing
- Can handle softsubs
- Supports a lot of files types and codecs. (Will encode pretty much anything mplayer can play. I've tested it with avi, mp4, mkv, mov, asx, wmv, mpeg, divx, and ogm files as well.)
- I can't detect fps so I'm converting every video to 29.97 fps. However, I have not noticed any audio sync issues in my testing...
You can change the bitrate of the audio and video, width of the resulting encodes, which language subtitle to use, and whether or not to run 2 pass encoding by editing some variables in the batch file. Just right click the file and choose edit.
I might be forgetting some things but that is pretty much it. Hope people find this useful.