FFmpeg DIY warning

dinkypumpkin dinkypumpkin at gmail.com
Sat Sep 10 15:22:24 EDT 2011


Esoterica alert: This message is only relevant for users who create 
their own builds of FFmpeg for use with get_iplayer.  If you use the 
Windows installer, or a pre-built version of FFmpeg on any platform, 
avoid potentially dangerous eye-glazing and hit delete now.

The ever-vigilant Bat Guano has alerted me to a recent change in the git 
HEAD version of FFmpeg that will affect anyone doing their own builds 
for use with get_iplayer.  This is probably most relevant to Linux 
users, but would apply on all platforms.

Current Status: get_iplayer internally uses "-absf aac_adtstoasc" in an 
FFmpeg command line in order to strip out ADTS frame headers when 
creating a M4A file from AAC audio.  This is done primarily for the 
benefit of iTunes, Winamp, WMP, and other media players that otherwise 
couldn't play the AAC audio in the downloaded FLV file or the 
intermediate AAC file created by get_iplayer+FFmpeg.  VLC, Banshee, 
Totem, etc., can usually play the FLV and AAC files without problem.

What Changed: A commit to the main FFmpeg repository 
(http://git.videolan.org/?p=ffmpeg.git) on 5 Sep replaced the 
-{a,v,s}bsf command line options (for audio, video, subtitle bitstream 
filters) with a single -bsf option (for all types of bitstream filters 
in a comma-separated list), and removed the old options.  So, if you 
build  FFmpeg from HEAD using code pulled on or after 5 Sep, it will 
choke on the old command-line option used by get_iplayer.  This only 
applies to flashaac-mode radio programmes, of course.

While it wouldn't be difficult to add new options to get_iplayer to 
compensate for this (anybody who wants to, please feel free), but it 
might be a good idea to wait a bit to see if the FFmpeg developers make 
any nod towards backwards compatibility.  Señor Guano has queried the 
FFmpeg list on the matter.

In the meantime, some other possibilities:

1. If you really need a post-5 Sep HEAD build of FFmpeg for some reason, 
and you're not picky about formats, use --aactomp3 to create MP3 files 
instead of M4A.  If you're not bothered about having tagged files, you 
can just use --raw and play the downloaded FLV file with VLC or similar. 
[h/t Bat Guano]

2. You may not need to build your own FFmpeg at all.  If your software 
repositories offer any version of FFmpeg from the 0.7 or 0.8 lines, that 
should work.  Even some 0.6 versions will work if they were merged with 
later code before 0.7 was released.

3. Build FFmpeg from the 0.8 line.  There are various recipes around for 
building FFmpeg from a clone of its git repository, such as these for 
Ubuntu:

http://ubuntuforums.org/showthread.php?t=786095

The only additional step necessary for a get_iplayer-compatible build is 
to check out code from the 0.8 line before configure and build.  The 
basic steps would look like:

Clone the FFmpeg repo:

$ git clone git://git.videolan.org/ffmpeg

Go to cloned repo:

$ cd ffmpeg

Checkout the latest tag from the 0.8 line:

$ git checkout n0.8.3

n0.8.3 is the latest as of this writing.  You'll see a warning about 
being in detached head state since you're checking out a tag

Instead of checking out a tag, you could create a remote tracking branch 
to build the very latest revision in the 0.8 line:

$ git checkout release/0.8

To keep things simple, I'd suggest sticking with a known tag.

Now configure, make, install, etc., as usual.




More information about the get_iplayer mailing list