Ubuntu – How to encode and playback video with the AV1 codec on Bionic Beaver (18.04)

18.04av1codecs

Apparently, Chrome 69 beta includes support for the Alliance for Open Media AV1 codec. The feature seems pointless without the ability to encode video with the new codec.

  1. How can video be encoded with this new codec on Ubuntu 18.04?
  2. What is the status of playback support in other media players, such as mpv?

Best Answer

At the moment a stock standard installation of Bionic Beaver 18.04 will offer little support for either encoding or playback of AOMedia Video 1 (AV1) files. For the sake of testing this assertion I have created a test AV1 file here:

wget http://www.andrews-corner.org/samples/askubuntu_test_aom.mp4

Support for AV1 files in Bionic Beaver at this time (August 5th 2018) was tested with this sample file in the following packages and versions:

  1. mediainfo: Downloaded from the Bionic Beaver Repository offers 'out of the box' support for AV1 files.
  2. vlc: Downloaded from the Bionic Beaver Repository does not support AV1 files. This support could be compiled in from vlc version 3.0 and greater. See screenshot below...
  3. SMPlayer: Bionic Beaver version offers no support for AV1.
  4. mpv: Bionic Beaver version offers no AV1 support.
  5. FFmpeg: Two points here:
    1. The Bionic Beaver version with extra codecs offers no support for AV1.
    2. Full support can be gained by following the FFmpeg Trac Compile Guide and has been possible since version 4.0. Files can be created and then played back with FFplay.
  6. Chrome: Again 2 points here:
    1. Chrome is not available from the Bionic Beaver Repositories.
    2. The -dev version of Chrome had no problems with playing the sample file. I tested Version 70.0.3510.0 (Official Build) dev (64-bit). Available as a direct download from Google, see screenshot below!
  7. Firefox: The Bionic Beaver Firefox cannot play AV1 files but support for AV1 should come with Firefox 63 when it is released...
  8. MKVToolNix: Two points:
    1. The Bionic Repository version does not deal adequately with AV1. It is version 19 while version 22 adds the required support.
    2. The developer has instructions to install the latest MKVToolNix under Bionic Beaver but I believe that most of the AV1 functionality even in this version is still waiting for the codec to mature. This caveat applies to versions 23 and 24 of MKVToolNix.

So that is the current state of play, a little dismal but things will improve as AV1 matures...

And the winner is:

enter image description here

Chrome!! For doing it all with the least fuss :)

Runner up:

enter image description here

Vlc!! For getting it all done, just waiting for the packagers to catch up :).

References:

  • Slackware Build for libaom: How the Slackware people build and package libaom. A few techniques there that would translate easily to the Ubuntu ways...
Related Question