Replace libfaac with aac in get_iplayer.cgi?

dinkypumpkin dinkypumpkin at gmail.com
Sat Dec 22 20:14:21 EST 2012


On 23/12/2012 00:52, bat guano wrote:
>>> In the latest ffmpeg, libfaac is no longer supported. Should references
>>> to it be replaced with the experimental aac, which is?
>>
> Hi
> I didn't realize that get_iplayer converted anything into aac.
> Just de-muxed and re-muxed.
>
> I've found the relevant section in file get_iplayer.cgi.
>
> What is this used for?
> Or is it redundant code?
>
>
> *************************************************************************************
> sub build_ffmpeg_args {
>          my ( $filename, $mimetype, $ext, $abitrate, $vsize, $vfr ) = ( @_ );
>          my @cmd_aopts;
>          if ( $abitrate =~ m{^\d+$} ) {
>              # if this is flv stream output then use the AAC codec
>              if ( lc( $ext ) =~ m{^(flv|aac|m4a)$} ) {
>                  # Tweak: ffmpeg cannot understand aac or m4a as audio output formats - force flash audio
>                  $ext = 'flv' if lc( $ext ) =~ m{^(aac|m4a)$} && $mimetype =~ m{^audio};
>                  push @cmd_aopts, ( '-acodec', 'libfaac', '-ab', "${abitrate}k" );
>              # else just copy  the codec?
>              } else {
>                  push @cmd_aopts, ( '-ab', "${abitrate}k" );
>              }
>          } else {
>              if ( lc( $ext ) eq 'flv' ) {
>                  # 160k is the max for libfaac!
>                  push @cmd_aopts, ( '-acodec', 'libfaac', '-ab', '160k' );
>              }
>              # cannot copy code if for example we have an aac stream output as WAV (e.g. squeezebox liveradio flashaac)
>              #push @cmd_aopts, ( '-acodec', 'copy' );
> *************************************************************************************

get_iplayer itself only re-muxes for the most part, but the web pvr may 
need to transcode for streaming.  The above section has been changed a 
bit in Git HEAD. Although not obvious from that snippet, it's not 
converting to AAC, but rather to MP3 for FLV streaming.





More information about the get_iplayer mailing list