Discussion:
[webm-discuss] WebM VP9 with RGB colorspace wrong everywhere?
k***@gmail.com
2018-09-13 06:40:51 UTC
Permalink
I encoded a WebM / VP9 file with the RGB colorspace with ffmpeg 4.0. If I
play it back on Google Chrome 71, MS Edge 17, Firefox 64 and Google Drive,
I get different results:

* Google Chrome displays the colors wrong - the color channels seem to be
in the wrong order.
* Microsoft Edge displays the colors wrong - it is hard to say what it is
trying to do.
* Firefox claims that the file is corrupt.
* I uploaded the video to Google Drive and it decodes and encodes the
video to something else (H.264?) and the resulting colors look correct in
its video preview. Google Drive may be using ffmpeg under the hood to do
the transcoding and that might be the reason why a video encoded with
ffmpeg looks correct.

My problem is that I don't know which one is correct: ffmpeg
encoding/decoding, Google Chrome or MS Edge? Which ones should receive bug
reports?

Are there any sample WebM RGB files, which I could use to test these
different platforms?

This is the command I used to create the WebM file with ffmpeg from 8-bit
RGB PNG files:

ffmpeg -framerate 10 -i frames/frame-%05d.png -c:v libvpx-vp9 -colorspace
rgb -pix_fmt bgr0 -lossless 1 output.webm

- Kari
--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss+***@webmproject.org.
To post to this group, send email to webm-***@webmproject.org.
Visit this group at https://groups.google.com/a/webmproject.org/group/webm-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.
Brion Vibber
2018-10-01 19:19:37 UTC
Permalink
Hi Kari --

As I recall VP9's RGB mode is under profile 1 (along with features like
4:2:2 and 4:4:4 YUV subsampling), which isn't supported by all players. If
it converts correctly from ffmpeg and plays ok with VLC it's probably ok,
but you'll have trouble playing it back in browsers because they mostly
only support profile 0.

-- brion
Post by k***@gmail.com
I encoded a WebM / VP9 file with the RGB colorspace with ffmpeg 4.0. If I
play it back on Google Chrome 71, MS Edge 17, Firefox 64 and Google Drive,
* Google Chrome displays the colors wrong - the color channels seem to be
in the wrong order.
* Microsoft Edge displays the colors wrong - it is hard to say what it is
trying to do.
* Firefox claims that the file is corrupt.
* I uploaded the video to Google Drive and it decodes and encodes the
video to something else (H.264?) and the resulting colors look correct in
its video preview. Google Drive may be using ffmpeg under the hood to do
the transcoding and that might be the reason why a video encoded with
ffmpeg looks correct.
My problem is that I don't know which one is correct: ffmpeg
encoding/decoding, Google Chrome or MS Edge? Which ones should receive bug
reports?
Are there any sample WebM RGB files, which I could use to test these
different platforms?
This is the command I used to create the WebM file with ffmpeg from 8-bit
ffmpeg -framerate 10 -i frames/frame-%05d.png -c:v libvpx-vp9 -colorspace
rgb -pix_fmt bgr0 -lossless 1 output.webm
- Kari
--
You received this message because you are subscribed to the Google Groups
"WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at
https://groups.google.com/a/webmproject.org/group/webm-discuss/.
For more options, visit
https://groups.google.com/a/webmproject.org/d/optout.
--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss+***@webmproject.org.
To post to this group, send email to webm-***@webmproject.org.
Visit this group at https://groups.google.com/a/webmproject.org/group/webm-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.
k***@gmail.com
2018-11-14 09:40:20 UTC
Permalink
Hi Brion,

Thanks for the answer.

I filed a bug for Chrome and it has been now fixed in Chrome 72.0.3610.0
Canary: https://bugs.chromium.org/p/chromium/issues/detail?id=901664
The bug page contains few WebM / VP9 videos with the RGB color space.

So, ffmpeg is encoding correctly. It seems that the color channels should
be mapped so that Y contains green, Cr contains red, and Cb contains blue,
just like ISO 23001-8:2016 defines.

Best,
Kari
Post by Brion Vibber
Hi Kari --
As I recall VP9's RGB mode is under profile 1 (along with features like
4:2:2 and 4:4:4 YUV subsampling), which isn't supported by all players. If
it converts correctly from ffmpeg and plays ok with VLC it's probably ok,
but you'll have trouble playing it back in browsers because they mostly
only support profile 0.
-- brion
Post by k***@gmail.com
I encoded a WebM / VP9 file with the RGB colorspace with ffmpeg 4.0. If I
play it back on Google Chrome 71, MS Edge 17, Firefox 64 and Google Drive,
* Google Chrome displays the colors wrong - the color channels seem to
be in the wrong order.
* Microsoft Edge displays the colors wrong - it is hard to say what it
is trying to do.
* Firefox claims that the file is corrupt.
* I uploaded the video to Google Drive and it decodes and encodes the
video to something else (H.264?) and the resulting colors look correct in
its video preview. Google Drive may be using ffmpeg under the hood to do
the transcoding and that might be the reason why a video encoded with
ffmpeg looks correct.
My problem is that I don't know which one is correct: ffmpeg
encoding/decoding, Google Chrome or MS Edge? Which ones should receive bug
reports?
Are there any sample WebM RGB files, which I could use to test these
different platforms?
This is the command I used to create the WebM file with ffmpeg from 8-bit
ffmpeg -framerate 10 -i frames/frame-%05d.png -c:v libvpx-vp9 -colorspace
rgb -pix_fmt bgr0 -lossless 1 output.webm
- Kari
--
You received this message because you are subscribed to the Google Groups
"WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at
https://groups.google.com/a/webmproject.org/group/webm-discuss/.
For more options, visit
https://groups.google.com/a/webmproject.org/d/optout.
--
You received this message because you are subscribed to the Google Groups "WebM Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to webm-discuss+***@webmproject.org.
To post to this group, send email to webm-***@webmproject.org.
Visit this group at https://groups.google.com/a/webmproject.org/group/webm-discuss/.
For more options, visit https://groups.google.com/a/webmproject.org/d/optout.
Loading...