Another media codec on the way!

One of the thing we are working hard at currently is ensuring you have the codecs you need available in Fedora Workstation. Our main avenue for doing this is looking at the various codecs out there and trying to determine if the intellectual property situation allows us to start shipping all or parts of the technologies involved. This was how we were able to start shipping mp3 playback support for Fedora Workstation 25. Of course in cases where this is obviously not the case we have things like the agreement with our friends at Cisco allowing us to offer H264 support using their licensed codec, which is how OpenH264 started being available in Fedora Workstation 24.

As you might imagine clearing a codec for shipping is a slow and labour intensive process with lawyers and engineers spending a lot of time reviewing stuff to figure out what can be shipped when and how. I am hoping to have more announcements like this coming out during the course of the year.

So I am very happy to announce today that we are now working on packaging the codec known as AC3 (also known as A52) for Fedora Workstation 26. The name AC3 might not be very well known to you, but AC3 is part of a set of technologies developed by Dolby and marketed as Dolby Surround. This means that if you have video files with surround sound audio it is most likely something we can playback with an AC3 decoder. AC3/A52 is also used for surround sound TV broadcasts in the US and it is the audio format used by some Sony and Panasonic video cameras.

We will be offering AC3 playback in Fedora Workstation 26 and we are looking into options for offering an encoder. To be clear there are nothing stopping us from offering an encoder apart from finding an implementation that is possible to package and ship with Fedora with an reasonable amount of effort. The most well known open source implementation we know about is the one found in ffmpeg/libav, but extracting a single codec to ship from ffmpeg or libav is a lot of work and not something we currently have the resources to do. We found another implementation called aften, but that seems to be unmaintaned for years, but we will look at it to see if it could be used.
But if you are interested in AC3 encoding support we would love it if someone started working on a standalone AC3 encoder we could ship, be that by picking up maintership of Aften, splitting out AC3 encoding from libav or ffmpeg or writting something new.

If you want to learn more about AC3 the best place to look is probably the Wikipedia page for Dolby Digital or the a52 ATSC audio standard document for more of a technical deep dive.

9 thoughts on “Another media codec on the way!

  1. For ad-hoc (i.e. real-time) a52 encoding there is the alsa plugin. If you ship this with an appropriate drop-in config, PulseAudio will automatically detect it and offer it as a card configuration. Pretty handy when playing 5.1 movies via SPDIF!

    There is also an alsa DTS encoder plugin that works much the same, but that might be covered via different patents etc.

  2. You could just ship the whole ffmpeg/libavcodec, but only enabling codecs that are known to be safe to ship.

  3. The aften project got merged into ffmpeg, that’s why its unmaintained. The ffmpeg version is the only maintained one out there.
    Compiling libavcodec to only support 1 format is trivial: ./configure –disable-everything –enable-encoder=ac3

    Not sure why this is so difficult for people to understand.

  4. Personally, unless someone really has the time to maintain a new encoder proactively for AC-3, I would just build a barebones configuration of libavformat/-codec with just those formats enabled that are a-OK for Fedora. At least on the level I’ve poked, FFmpeg/Libav can let you enable/disable components rather nicely.

    If someone f.ex. forks the encoder off of libavcodec from either FFmpeg or Libav, there’s quite a large chance that it will stay pretty much as dead as aften or so after a certain amount of time.

    Not that I’m saying that the AC-3 encoder is getting any proactive love from any of the related developers in libavcodec, of course. It seems “good enough” and there are no real requirements for it to be much better (as far as I know and due to the age of the format), and it gets the usual set of “maintenance” work components of a larger project may get.

    But these are just my random few cents as someone who contributes to libav* every now and then.

    • The problem here is that Red Hat legal wants us not just to disable at compile time, but remove any offending code also from the source we distribute. So it becomes a bigger task doing and maintaining.

      • Mozilla maintains a cut down libavcodec from FFmpeg (https://github.com/mozilla/gecko-dev/tree/master/media/ffvpx) for Firefox playback of VP9, Vorbis and FLAC. You should just be able to copy the FFmpeg encoder/decoder files for AC3, edit the libavcodec/Makefile and ./configure scripts and make it work.
        The AC3 encoder/decoder should require just the bitstream reader and the (i)MDCT parts, both of which are already in that tree since Vorbis and FLAC use them, so I don’t see how it wouldn’t work.
        You could also contribute your changes to their tree but I doubt they’ll accept since you don’t see AC3 on the internet and they have all the right to keep it that way since they played a large part in the development of Opus (and AC3’s efficiency was pathetic for the 90’s and is even worse now).

Comments are closed.