I saw that ffmpeg 0.5 was released the other day (I don’t have any link here) and since my Msys/MingW environment was already ready to go I decided to compile my own ffmpeg executable.
I expected it to be ‘an exercise of eating your own hat out of frustation’, however, there are a couple of things you should do to prepare yourself:
- Evacuate your wife, kids, dogs and cats.
- Move your coffee brewer next to your computer.
- Have Kleenex ready for all the spit you probably have to remove from your computer screen.
On a serious note, compiling and finding the sources is not overly hard: The hardest part is to get Msys and Mingw to work right and find the right set of gnu compilers/binaries. If you’ve got that all working, the fun part is compiling the needed packages one by one.
If I can make time, I’ll add an entry how to compile ffmpeg yourself.
Note to self: the source version of ffmpeg comes with h264 presets. Earlier, I mentioned where to get the ffmpeg binary from (note, as far as I can see, the last build was done in 2008), so there may (indeed) other recent versions hanging around somewhere. The presets are in ‘ffpresets’ directory: Most of them seem related to x264 encoding.
I also noticed that the commandline parameters seem to change at the whim of the developers. I already ‘compensated’ for most of these issues, but was rather surprised to find that my ‘latest’ SVN build wasn’t so ‘recent’. Alright, at least we took care of that during the initial design stage.
For more details on specific iPod based command-line arguments, Robert Swain’s ‘iPod video guide’ got me past most of the initial encoding issues.
Added screenshot (see above): Lets see how good the commandline arguments are…
I have been making small progress on my own front-end for FFMPeg (earlier on xsamplex). Earlier I was rounding up the serializers (data persistence, data schmersistence): the threading code was finished months ago. I just have to connect the last dots, which is basically user interface stuff. Most likely I’ll end up redoing some of the serialization but it’s, like I said, pretty much done.
This reminds me of a couple of things: The FFMPeg developers maintain a list of software venders that violate the software’s license (GPL). Their list (“Hall Of Shame”) can be found at the FFMPEG website. Just a couple of seconds ago, I saw a google ad (see picture above) and I thought the name in that ad rang a bell. Oh noes, they’re in the issues trackerz!
I also noticed that a lot of people ask for ‘how to track progress FFMPEG’ and they end up at the very first post I wrote on interfacing with FFMPEG’s command-line. This is not too difficult and requires parsing of the error output (you probably need a state machine too). At one time, a programming board linked here with pointers how to track the frames and translated that to time, which they basically extracted from the bare information that I put in my sample code. I can’t find the link though, so will add that at a later stage.
Between all the ripping of my (legally) purchased DVDs and transcoding them to the proper format for my iPod I found out that most of the applications that I used have something in common (from Videora [free] to Mediacoder (open source). All these applications actually use FFMPEG under the hood: FFMPEG literally accepts many fileformats, open-sourced and runs on too many platforms (it’s highly portable, I guess). Trouble is, since it’s part of the other multi-platform media player (MPlayer) and, particularly, thanks to the legal minefield that is called transcoding, the binaries for FFMPEG are hard to find (well, you can’t miss it now!) (you can also fetch the sources and compile a binary yourself: you’d probably need to get the MingW compiler/environment).
Anyway, all videoconverter applications that I found had either crappy interfaces or they came with that ‘build-in’ Internet browser that allows the developer to push unneeded and unwanted ads to your desktop. So yeah, it shouldn’t be too hard to build your own fricking video converter. You only need to know and study FFMPEG’s commandline options after reading this (boring code after the fold).