Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot set colorspace bt709 #173

Open
mrp1no opened this issue Apr 6, 2024 · 2 comments
Open

Cannot set colorspace bt709 #173

mrp1no opened this issue Apr 6, 2024 · 2 comments

Comments

@mrp1no
Copy link

mrp1no commented Apr 6, 2024

I'm trying to convert a video to VP9 with libsvt_vp9 by using the following command:

$ sudo ffmpeg -i /home/amedeo/Scrivania/Bear.mp4 \
-ss 00:00:01 \
-t 00:00:20 \
-map_metadata -1 \
-map_chapters -1 \
-sn \
-c:v libsvt_vp9 \
-rc vbr \
-tune vmaf \
-preset 4 \
-b:v 6M \
-maxrate:v 7M \
-minrate:v 4M \
-bufsize:v 12M \
-r 30000/1001 \
-g 60 \
-keyint_min 30 \
-c:a libvorbis \
-ar 48000 \
-b:a 320k \
-ac 2 \
-pix_fmt yuv420p \
-colorspace:v 'bt709' \
-color_primaries:v 'bt709' \
-color_trc:v 'bt709' \
-color_range:v 'tv' \
1080.webm

The issue here is -colorspace is not being recognized - Codec AVOption colorspace (color space) has not been used for any stream. - and is leading to this:

$ ffprobe -v error -select_streams v:0 -show_entries stream=color_range,color_space,color_primaries,color_transfer -of default=noprint_wrappers=1:nokey=1 1080.webm
tv
unknown
bt709
bt709

Also when I run Shaka Packager I get some warnings:

$ shaka in=1080.webm,stream=audio,output=audio.webm in=1080.webm,stream=video,output=vp9_1080p.webm --mpd_output master.mpd
I0406 23:23:04.020563    8801 demuxer.cc:94] Demuxer::Run() on file '1080.webm'.
I0406 23:23:04.020594    8801 demuxer.cc:160] Initialize Demuxer for file '1080.webm'.
W0406 23:23:04.031989    8801 vp_codec_configuration_record.cc:46] VPx video full range flag is inconsistent, 1 vs 0
W0406 23:23:04.032006    8801 vp_codec_configuration_record.cc:46] VPx color primaries is inconsistent, 1 vs 2
W0406 23:23:04.032009    8801 vp_codec_configuration_record.cc:46] VPx transfer characteristics is inconsistent, 1 vs 2
W0406 23:23:04.032011    8801 vp_codec_configuration_record.cc:46] VPx matrix coefficients is inconsistent, 1 vs 2
I0406 23:23:04.067046    8801 webm_muxer.cc:61] WEBM file 'audio.webm' finalized.
I0406 23:23:04.076172    8801 webm_muxer.cc:61] WEBM file 'vp9_1080p.webm' finalized.
Packaging completed successfully.

And when casting to Chromecast HD (with Google TV) this is the result:
IMG_20240405_235542

The same video re-encoded with libvpx-vp9 using the same settings outputs this and plays fine on Chromecast HD:

$ ffprobe -v error -select_streams v:0 -show_entries stream=color_range,color_space,color_primaries,color_transfer -of default=noprint_wrappers=1:nokey=1 1080.webm
tv
bt709
bt709
bt709

Even Shaka Packager gives less warnings on the file:

$ shaka in=1080.webm,stream=audio,output=audio.webm in=1080.webm,stream=video,output=vp9_1080p.webm --mpd_output master.mpd
I0406 23:24:40.562933    9608 demuxer.cc:94] Demuxer::Run() on file '1080.webm'.
I0406 23:24:40.562975    9608 demuxer.cc:160] Initialize Demuxer for file '1080.webm'.
W0406 23:24:40.573458    9608 vp_codec_configuration_record.cc:46] VPx video full range flag is inconsistent, 1 vs 0
I0406 23:24:40.606545    9608 webm_muxer.cc:61] WEBM file 'audio.webm' finalized.
I0406 23:24:40.616666    9608 webm_muxer.cc:61] WEBM file 'vp9_1080p.webm' finalized.
Packaging completed successfully.

(I still don't get what that "VPx video full range flag is inconsistent, 1 vs 0" should mean, but the libvpx-vp9 video plays fine).

Here's a zip file with the original file and the two converted files

@mathix420
Copy link

@mrp1no I have a similar issue on my end, did your find any solution to remove the warnings even from shaka packager ?

@mrp1no
Copy link
Author

mrp1no commented Aug 17, 2024

@mrp1no I have a similar issue on my end, did your find any solution to remove the warnings even from shaka packager ?

No solutions at all. I moved back to libvpx-vp9 which is more stable and reliable, even though it's slow af.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants