A fanatic, says George Santayana, is somebody who redoubles their efforts when they have forgotten their aim.
Fingerpointing, today, is left as an exercise to the reader.
From the FFmpeg Download and CVS page:
In short, if you want to work with FFmpeg, you are advised to go along with CVS development rather than relying on formal releases. CVS snapshots work really well 99% of the time so people are not afraid to use them.
I’m special; I’m that one percent. I’m willing to pretend that it’s the top one percent! Special like a fox!.
FFMpeg is a swiss-army-knife media converter. It’s really useful; it’s also total attention-deficit-teenware, but hey, if you’re comfortable butchering other people’s source code, it’s good enough! It’s only got about a hundred different compiled-time options, and the version that comes packaged for Ubuntu doesn’t “do” stuff like, well, basically anything you’d ever want to use it for, and if you don’t like that you can, apparently, choke on it.
But I want to convert my video files, so that I can watch them on my new toy.
The extended entry contains all the gore about how I got the whole thing to actually work, but really, I just want to say that when more than two people use your software, especially when more than two people incorporate your sofware into other projects, running a project with no version numbering or point releases, on CVS access alone is about two parts mind-bending idiocy and one part gibbering insanity. It’s some sort of Heisenberg usability principle; it may or may not work reliably or at all depending on the exact moment your users checked out their code.
Which is why, of course, you’ll need to make some changes to the ffmpeg code, for this to work. I’m sure I’m making this more difficult for myself than I had to, but it’s Linux, so you already knew that. Read on; the funny bit is right at the end!
When you’re done with this, ffmpeg will have a lot more things compiled into it than you strictly need for the iPod video conversion. I’ve gone that route because I’m a big fan of pulling the bandaid off quickly, and I really didn’t want to have to do this more than once.
Here we go:
- You need a CVS checkout of the FFMpeg source, which you can get by doing this:
cvs -z9 -d:pserver:firstname.lastname@example.org:/cvsroot/ffmpeg co ffmpeg
Leave it alone for the time being, we’ll get back to it.
- You’ll need the x264 source from Videolan. I downloaded the latest daily snapshot in convenient tarball form. If you don’t have nasm you’ll need that too, but “apt-get install nasm” will take care of that. Then it’s gunzip, untar, configure, make, make install. If you’ve made it this far, you know the drill.
- The lame-dev packages provide by Ubuntu just wouldn’t work for me for some reason, and you need ones that will. What did work for me was the latest LAME source tarball. Again, gunzip, untar, configure, make, make install.
- FFMpeg needs a bunch of dev packages to compile with all its bells and whistles, so:
sudo apt-get install libmpcdec-dev libmpeg3-dev libtheora-dev libfaad2-dev libfaad2-dev libfaac0-dev libdts-dev libxvidcore4-dev
There might be some in there you don’t need, and you might be missing some I already had, and didn’t explicitly ask for. My notes on this consist of “history > grep apt-get” and I’d be glad for any feedback.
- The ugly bit. In your ffmpeg/libavcodec directory, pthread.c and add this up at the top:
#define HAVE_THREADS 1
Then, in utils.c, replace “#if !defined(HAVE_THREADS)” near the bottom with “#ifndef HAVE_THREADS”, save and exit. I’ll have diffs up for this shortly, for those of you diff-inclined.
- Going back to our FFMpeg directory, I used the command line options detailed in this shell script, which you can copy and chmod +x if you like. I wrote that while I was playing dependency whackamole. Now, with a little luck and another chmod +x, you should be able to do the ./myconf, make and make install that will give you a does-everything version of ffmpeg. Halleluja.
Once all that’s done, I’ve got a present for you: a cute little shell script that does the messy bits for you, takes in your videos of (I believe) whatever kind and dumps out your ipod-friendly movies out the other side. You can even ask it if ffmpeg already has the stuff you need installed. Dirt simple, and dirt simple to use, and I hope you like it.
If you have a Linux box to run the conversion on and and a Windows or Mac box to plug your iPod into, it’ll probably work great.
I hope you find this useful. I hope you can, and do, use it.
Because, here’s the punchline, after all of that effort, I can’t use it..
Because gtkpod doesn’t sync videos, only music.