HLS-23: On recent Ubuntu install AAC codec is marked as experimental

Issue Information

Issue Type: Bug
Priority: Major
Status: Closed

Reported By:
Ben Tasker
Assigned To:
Ben Tasker
Project: HLS Stream Creator (HLS)
Resolution: Won't Fix (2021-05-26 17:14:22)
Affects Version: 1.0,
Target version: VNEXT,
Components: Transcoding ,

Created: 2017-04-29 10:18:06
Time Spent Working
60 minutes
60 minutes
0 minutes

Commit 0796feb changed the default audio codec from libfdk_aac to aac

However on Ubuntu Xenial, the repo supplied ffmpeg reports
[aac @ 0xa40a60] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.

This can easily be bypassed by doing
FFMPEG_FLAGS='-strict -2'

Before running the script, but in an ideal world you shouldn't have to.

Version of ffmpeg is
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 5.4.0 (Ubuntu 5.4.0-6ubuntu1~16.04.4) 20160609

Need to implement a check so that libfdk_aac can be used by default if needed.

Toggle State Changes


Looking at the ffmpeg wiki, it seems libfdk_aac is considered better quality. However, it is non-free, so may not be included in some versions (though this probably doesn't affect most repo packages) - https://trac.ffmpeg.org/wiki/Encode/AAC

So, I guess we probably want to test for the availability of either and go with FDK if it's there. I'm not sure though whether ffmpeg will actually tell you a codec is present but experimental.

It might be just as simple to update the README to contain information on that specific error :)

Repo: HLS-Stream-Creator
Commit: ee8d39f4ee27c190ab4a08db9e8badb683e5603b
Author: B Tasker <github@<Domain Hidden>>

Date: Sat Apr 29 11:53:45 2017 +0100
Commit Message: Updated README to note the issue with aac being marked as experimental in some ffmpeg builds. See HLS-23

Modified (-)(+)

Webhook User-Agent


View Commit

Will look into this in more depth later, but for now it's at least noted in the README.

If it wasn't for the fact libfdk_aac simply won't be in some builds (and it seems that includes the repo provided Ubuntu packages) I'd revert the commit, but aac does have a higher chance of actually being there.

I think the best route forward will probably be to figure out a way to check if the codec is present but experimental, print a warning and then set the experimental flag. As part of that, if libfdk_aac is present, we should use it.
btasker added 'VNEXT' to Fix Version
btasker removed '1.0' from Fix Version
Closing this as Won't Fix - aac hasn't been experimental in quite a while, so there's no real need to do anything extra for this.
btasker changed status from 'Open' to 'Resolved'
btasker added 'Won't Fix' to resolution
btasker changed status from 'Resolved' to 'Closed'