Activate VP9 codec in libav

Bug #1296378 reported by Mossroy
42
This bug affects 8 people
Affects Status Importance Assigned to Milestone
libav (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

"avconv -encoders | grep vp" gives only :
V... libvpx libvpx VP8 (codec vp8)

It does not give the encoder libvpx-vp9, which seems to be necessary to encode with VP9.
Or maybe I missed something?

Based on http://git.libav.org/?p=libav.git;a=commit;h=9aa053ceded5550b2e538578af383fd89d82364c , VP9 is available in libvpx since version 1.3.0 , which is the version libav is built with : http://packages.ubuntu.com/trusty/libvpx1
VP9 is also mentioned in the changelog of the libvpx1 package : http://changelogs.ubuntu.com/changelogs/pool/main/libv/libvpx/libvpx_1.3.0-2/changelog

Same issue when trying to read a file with VP9 codec. I tried with http://base-n.de/webm/out9.webm
"avplay out9.webm" gives :
[matroska,webm @ 0x7f1a80005be0] Unknown/unsupported AVCodecID V_VP9

Tags: trusty
Revision history for this message
Mossroy (mossroy) wrote :

It seems important to me because :
- VP9 is already supported on Trusty with Totem (gstreamer), Firefox (default version bundled with Trusty), VLC and probably other software
- VP9 will probably quickly replace VP8 as the best free/open-source video codec
- Trusty is an LTS version : I think that being able to transcode videos in VP9 with it is important
- The version of libvpx is already ok (but maybe I missed something and it's more difficult than I would hope?)

Revision history for this message
madbiologist (me-again) wrote :

I'm not completely sure of the relationship between libvpx and libav, but it seems that libvpx is a shared library and it has to be actually hooked up to a decoder, or possibly that libvpx is an encoding libraray only. Libav 10 was released on 23rd March 2014 and has added a VP9 decoder - see http://git.libav.org/?p=libav.git;a=blob;f=Changelog;hb=refs/tags/v10

Libav 10 is available for download from https://libav.org/download.html#release_10

tags: added: trusty
Revision history for this message
Reinhard Tartler (siretart) wrote : Re: [Bug 1296378] Re: Activate VP9 codec in libav

Libav10 will not make it into trusty, largely because we did not
manage to get all packages in trusty built against libav10 in time.
I've started staging this transition in
https://launchpad.net/~motumedia/+archive/libav10-trusty/+packages,
but did not receive enough help with that.

Currently, I'm trying to get this transition started in Debian.
Progress on that is tracked here:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=libav10;<email address hidden>

--
regards,
    Reinhard

Revision history for this message
Mossroy (mossroy) wrote :

Thanks Reinhard for this info.
It's bad news for Trusty, but I understand.

I'm thinking about switching from VP8 to VP9 for some videos I put on a blog (with the standard HTML5 tag), and I was hoping to be able to encode with VP9 codec on Trusty (like I'm currently encoding with VP8 codec on Precise, with libav command-line)
Would there be another way on Trusty? Even if it's a bit later?

(By the way, I said something wrong in my comment #1 : VLC does not support VP9 either in the version currently bundled in Trusty)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in libav (Ubuntu):
status: New → Confirmed
Revision history for this message
Oibaf (oibaf) wrote :

Fixed in utopic/14.10.

Changed in libav (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Mossroy (mossroy) wrote :

Thanks for the update in utopic.
I now can play videos with vp9 codec and avplay, but I still can't encode videos with vp9 codec inside a webm container (like in the sample) :

The following command-line :
avconv -i original-video.MOV -c:v libvpx-vp9 converted-video.webm
fails with the following error message :
Only VP8 video and Vorbis audio are supported for WebM.

It's "normal" because version 10.3 of libav does not seem to include the patch that allows vp9 (and opus) in WebM containers : http://git.libav.org/?p=libav.git;a=commitdiff;h=d2ef708c95ace2518deffe830a9c439aeb9edd5d

I suppose I should open another bug on Launchpad to track that issue? Or should I re-open this one?

Revision history for this message
Oibaf (oibaf) wrote :

It looks encoding support it is scheduled for libav11 (unless it get backported to 10.x). You may follow bug #1360026 which request libav11 for utopic.

Revision history for this message
Oibaf (oibaf) wrote :

@mossroy:
You should be able to also encode in vp9 now in utopic.

Revision history for this message
Mossroy (mossroy) wrote :

That's true : Utopic now ships with libav-tools version 6:11~beta1-2, that is able to encode with VP9 codec inside a WebM container.
Great!

For those using Trusty, there are a few ways to encode with VP9 anyway (without upgrading to Utopic or running it inside a virtual machine) :
- compile libav 11 beta 1 under Trusty
- use Utopic libraries inside a Docker container
I explained these 2 options in http://blog.mossroy.fr/2014/09/03/encoder-des-videos-avec-le-codec-vp9-sur-ubuntu-trusty-en-utilisant-libav-et-docker/ (in French) , with some generated videos and comparisons with VP8
- it's certainly also possible to upgrade libav with a PPA, but I did not want to "pollute" my OS (some programs that depend on libav might be broken)

Thanks for the upgrade in Utopic

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.