How-to decode VP9 using libvpx ?

693 views
Skip to first unread message

Alexey Eromenko

unread,
Jul 15, 2016, 9:45:22 AM7/15/16
to Codec Developers
Hello,

Using the decoder yields me a strange result: 

VP9 decoder: (using v1.5.0)

./vpxdec --progress --verbose --summary --rawvideo  -o /media/sf_C_DRIVE/video-test/3DMark03-f01-vp9-1024k-bits.avi /media/sf_C_DRIVE/video-test/3DMark03-f01-vp9-1024k-bits.webm

raw-video output (AVI) is not playable in VLC, but the source (VP9) is playable !
What am I doing wrong ?

Link to source WebM: (it could be that I have encoded my VP9 poorly, but still it works in VLC...)

My goal is to compare codecs VP8 / VP9 / VP10 (AV1), and help with AV1 testing.

And no, ffmpeg is a non-solution, because it doesn't support VP10 (AV1). I will need to learn and use the reference codec somehow.

Thanks in advance,
-Alexey "Technologov"

Tom Finegan

unread,
Jul 15, 2016, 10:02:52 AM7/15/16
to codec...@webmproject.org
On Fri, Jul 15, 2016 at 6:45 AM, Alexey Eromenko <al4...@gmail.com> wrote:
Hello,

Using the decoder yields me a strange result: 

VP9 decoder: (using v1.5.0)

./vpxdec --progress --verbose --summary --rawvideo  -o /media/sf_C_DRIVE/video-test/3DMark03-f01-vp9-1024k-bits.avi /media/sf_C_DRIVE/video-test/3DMark03-f01-vp9-1024k-bits.webm

raw-video output (AVI) is not playable in VLC, but the source (VP9) is playable !
What am I doing wrong ?


The above command line outputs raw video frames to the file named by the -o parameter. Not AVI. That's why it's not playable. This is not surprising. Given your WebM file settings, 3DMark03-f01-vp9-1024k-bits.avi contains 1024x768 I420 video frames.
 
Link to source WebM: (it could be that I have encoded my VP9 poorly, but still it works in VLC...)

My goal is to compare codecs VP8 / VP9 / VP10 (AV1), and help with AV1 testing.

And no, ffmpeg is a non-solution, because it doesn't support VP10 (AV1). I will need to learn and use the reference codec somehow.

Thanks in advance,
-Alexey "Technologov"

--
You received this message because you are subscribed to the Google Groups "Codec Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to codec-devel...@webmproject.org.
To post to this group, send email to codec...@webmproject.org.
Visit this group at https://groups.google.com/a/webmproject.org/group/codec-devel/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.

Alexey Eromenko

unread,
Jul 15, 2016, 10:10:00 AM7/15/16
to codec...@webmproject.org
>
> The above command line outputs raw video frames to the file named by the -o
> parameter. Not AVI. That's why it's not playable. This is not surprising.
> Given your WebM file settings, 3DMark03-f01-vp9-1024k-bits.avi contains
> 1024x768 I420 video frames.
>
Okay, but how to make it work?
How to make it playable in VLC ? (any uncompressed format will do)

--
-Alexey Eromenko "Technologov"

Tom Finegan

unread,
Jul 15, 2016, 10:21:48 AM7/15/16
to codec...@webmproject.org
Use FFmpeg to store the frames in a container that VLC is able to play:

ffmpeg -f rawvideo -vcodec rawvideo -s 1024x768 -pix_fmt yuv420p -i 3DMark03-f01-vp9-1024k-bits.avi raw.avi
 
--
-Alexey Eromenko "Technologov"

Alexey Eromenko

unread,
Jul 15, 2016, 10:36:54 AM7/15/16
to codec...@webmproject.org
>> > The above command line outputs raw video frames to the file named by the
>> > -o
>> > parameter. Not AVI. That's why it's not playable. This is not
>> > surprising.
>> > Given your WebM file settings, 3DMark03-f01-vp9-1024k-bits.avi contains
>> > 1024x768 I420 video frames.
>> >
>> Okay, but how to make it work?
>> How to make it playable in VLC ? (any uncompressed format will do)
>>
>
> Use FFmpeg to store the frames in a container that VLC is able to play:
>
> ffmpeg -f rawvideo -vcodec rawvideo -s 1024x768 -pix_fmt yuv420p -i
> 3DMark03-f01-vp9-1024k-bits.avi raw.avi
>

Thanks, it works ! So you say that rawvideo is not AVI; so to prevent
self-confusion I have change the extension of libvpx decoder output
from *.avi to *.yuv;

If I understand you correctly VLC doesn't support "rawvideo" output of
libvpx ? This is sad. But okay, 2-stage decoder also good. (libvpx
then ffmpeg)

I mean it's really strange: in the world of still pictures we *do have
an uncompressed format* that is supported by everyone, the 24-bit
Windows Bitmap, of course. (*.bmp)
I'd expect that raw video have something similar, uncompressed, 100%
quality, and supported by everyone.
Is there any ?

Pieter Kapsenberg

unread,
Jul 15, 2016, 10:41:31 AM7/15/16
to codec...@webmproject.org
The reason VLC can't play rawvideo is because that format can't be identified from looking at the file. VLC has no way of knowing that it's rawvideo, and even if it did it would not know things like width, height, framerate etc. Rawvideo files contain *only* pixel data. There is a format called y4m, which is raw YUV + required metadata. VLC should play that. But it isn't any better or worse than using AVI as a raw YUV wrapper to store the metadata.

Reply all
Reply to author
Forward
0 new messages