pko.ch

Reflections about reflection

Building ffmpeg on a Leopard

This is a tribute to those who want to, on their own, extract the mp3 out of flv files, or other similar operations, but encountered build issues or problems.

I’m an avid listener of MacBreak Weekly and other TWiT network podcasts. However, the bandwidth provider for most of the shows, CacheFly, has grown a little feud with my connections to their port 80. And I still wanted to listen to my regular entertainment. Someone posted an alternate source for the mp3 files. However, they were distributed in a YouTube-ish fashion, flvs containing the mp3. I downloaded the flv file and felt a relieved to know I, with some help from Perian, could again hear my shows. But not on some players (iPod, for example). My next quest then became to extract the mp3 out of the flv. Some googling pointed me to ffmpeg.

From where I stand, ffmpeg is a very complete codec suite. I’m no fan of multimedia, so I’ll leave my understandings there. First step: aquire the source. That was easy. Just svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg and off we go. However, ./configure && make stopped in the middle of the build.


ppc/dsputil_altivec.c: In function 'sad8_altivec':
ppc/dsputil_altivec.c:292: warning: left-hand operand of comma expression has no effect
......
ppc/dsputil_altivec.c:292: warning: left-hand operand of comma expression has no effect
ppc/dsputil_altivec.c:292: error: can't convert between vector values of different size
ppc/dsputil_altivec.c:292: error: can't convert between vector values of different size

Pain. It’s not my code, it’s not simple C and it’s AltiVec specific. I have a last generation PowerBook G4 with Leopard on it. That’s all I can tell. I tried to figure out what was going on, but the code had too many exotic reserved words for my taste (it was the first time I saw AltiVec’s vector as a reserved word in C). Pain.

So, can we sidestep the need to build something AltiVec specific? Yes, we can! Just build it with ./configure --disable-altivec && make. It ran smoothly from there! =)

The next step was to run ffmpeg -i mbw81.flv -acodec copy mbw81.mp3 and it produced the desired mp3 file, just as seen on TV!

3 Responses to “Building ffmpeg on a Leopard”

  1. Vale Says:

    MPlayer ( http://www.mplayerhq.hu ) also works very well for such things, and they have binary packages for OSX. ;p

  2. pkoch Says:

    VLC should do the job, too. But I never found out how to use the player’s transcoding abilities. I’m just too dumb. Must use a CLI. =P

  3. Vale Says:

    I think mplayer -only- has CLI for transcoding stuff.

Leave a Reply