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

Youtube HDR & vp9.2 washed out video #11269

Closed
jalba69 opened this issue Nov 22, 2016 · 8 comments
Closed

Youtube HDR & vp9.2 washed out video #11269

jalba69 opened this issue Nov 22, 2016 · 8 comments

Comments

@jalba69
Copy link

@jalba69 jalba69 commented Nov 22, 2016

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2016.11.22. If it's not read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2016.11.22

Before submitting an issue make sure you have:

  • At least skimmed through README and most notably FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Description of your issue, suggested solution and other information

Hello,
Since a few Youtube supports HDR, for example here : https://www.youtube.com/watch?v=tO01J-M3g0U

When i try to grab one of those videos using the best format + best audio scheme it gives me a washed out video.

This is the list of formats available for this video in link :
Best audio + video :
337 - 3840x2160 (2160p60)+171 - audio only (DASH audio)

Formats available :
249 webm audio only DASH audio 50k , opus @ 50k (48000Hz), 912.10KiB
250 webm audio only DASH audio 65k , opus @ 70k (48000Hz), 1.15MiB
140 m4a audio only DASH audio 127k , m4a_dash container, mp4a.40.2@128k (44100Hz), 2.34MiB
251 webm audio only DASH audio 130k , opus @160k (48000Hz), 2.30MiB
171 webm audio only DASH audio 131k , vorbis@128k (44100Hz), 2.07MiB
160 mp4 256x144 DASH video 115k , avc1.4d400c, 30fps, video only, 2.05MiB
278 webm 256x144 DASH video 122k , webm container, vp9, 30fps, video only, 1.69MiB
133 mp4 426x240 DASH video 246k , avc1.4d4015, 30fps, video only, 4.52MiB
242 webm 426x240 DASH video 272k , vp9, 30fps, video only, 3.61MiB
243 webm 640x360 DASH video 513k , vp9, 30fps, video only, 6.92MiB
134 mp4 640x360 DASH video 636k , avc1.4d401e, 30fps, video only, 7.66MiB
244 webm 854x480 DASH video 988k , vp9, 30fps, video only, 12.66MiB
135 mp4 854x480 DASH video 1165k , avc1.4d401f, 30fps, video only, 15.27MiB
247 webm 1280x720 720p 2036k , vp9, 30fps, video only, 25.57MiB
136 mp4 1280x720 720p 2323k , avc1.4d401f, 30fps, video only, 29.77MiB
248 webm 1920x1080 1080p 3260k , vp9, 30fps, video only, 44.89MiB
302 webm 1280x720 DASH video 3261k , vp9, 60fps, video only, 41.13MiB
298 mp4 1280x720 DASH video 3497k , avc1.4d4020, 60fps, video only, 50.22MiB
137 mp4 1920x1080 1080p 4375k , avc1.640028, 30fps, video only, 54.71MiB
303 webm 1920x1080 DASH video 5108k , vp9, 60fps, video only, 71.01MiB
299 mp4 1920x1080 DASH video 5868k , avc1.64002a, 60fps, video only, 88.13MiB
271 webm 2560x1440 1440p 10248k , vp9, 30fps, video only, 134.26MiB
264 mp4 2560x1440 DASH video 10455k , avc1.640032, 30fps, video only, 126.69MiB
308 webm 2560x1440 DASH video 15387k , vp9, 60fps, video only, 203.80MiB
313 webm 3840x2160 2160p 21981k , vp9, 30fps, video only, 314.00MiB
266 mp4 3840x2160 DASH video 23320k , avc1.640033, 30fps, video only, 282.78MiB
315 webm 3840x2160 DASH video 29805k , vp9, 60fps, video only, 457.80MiB
330 webm 256x144 144p60 156k , vp9.2, 60fps, video only, 2.38MiB
331 webm 426x240 240p60 256k , vp9.2, 60fps, video only, 3.87MiB
332 webm 640x360 360p60 485k , vp9.2, 60fps, video only, 7.35MiB
333 webm 854x480 480p60 909k , vp9.2, 60fps, video only, 13.83MiB
334 webm 1280x720 720p60 1991k , vp9.2, 60fps, video only, 28.18MiB
335 webm 1920x1080 1080p60 3201k , vp9.2, 60fps, video only, 49.70MiB
336 webm 2560x1440 1440p60 11166k , vp9.2, 60fps, video only, 170.21MiB
337 webm 3840x2160 2160p60 21696k , vp9.2, 60fps, video only, 339.06MiB
17 3gp 176x144 small , mp4v.20.3, mp4a.40.2@ 24k
36 3gp 320x180 small , mp4v.20.3, mp4a.40.2
43 webm 640x360 medium , vp8.0, vorbis@128k
18 mp4 640x360 medium , avc1.42001E, mp4a.40.2@ 96k
22 mp4 1280x720 hd720 , avc1.64001F, mp4a.40.2@192k (best)

The best one is 315 and gives a non washed out video like here :
Nice one
That's also what the browser will display for me.

But when i use -f bestvideo+bestaudio/best I get the 337 video format that looks washed out :
Washed out

Not sure if this is intended or not , i don't have a HDR display either but the washed out color shouldn't be the one picked up when selecting bestvideo i think, ( i think, at least according to colors and video bitrate ) well i'm not sure so better ask if it's normal behavior or not.

Thanks in advance.

@MrBrax
Copy link

@MrBrax MrBrax commented Nov 23, 2016

Isn't this related to your system/media player? youtube-dl only downloads the "raw" video file as far as i know. Looks the same for me and i don't have a HDR monitor.

@jalba69
Copy link
Author

@jalba69 jalba69 commented Nov 23, 2016

Hello,

I had already tried different players and tried a few more after seeing your answer :
got the same results using MPC-HC (stock renderer), same using MPC-BE with madvr renderer, or sending files into virtualdub_x64 or virtualdub_x86 both of those using 2 different plugins to open this kind of files originally not supported by virtualdub.

Also the same results inside FFplay, and even tried a portable version of VLC too and the colors are the same as on the pictures, well colored for one and washed out for the other ( but this VLC version seems to have a hard time playing the videos and start to make some artefats after a bit, never using this player so i don't care much anyways)

Well, i don't know what could trigger this to happen on each player while they use different renderer's.
Tried others VP9-Profile 2 videos from the list and all come out washed out, don't know why those are picked as best by default by youtube-dl and if it's supposed to be like this.

Using
youtube-dl -f bestvideo
it downloads the 337 format in vp9.2 which is the washed out for me.

Using
youtube-dl -f 315
that is for me the best quality possible on the list gives me a non washed out video.

Searching a bit more on this and found this discussion but i'm not understanding all this fully for now :/ : http://forum.doom9.org/showthread.php?p=1785300#post1785300

Thanks.

@JamesTheAwesomeDude
Copy link

@JamesTheAwesomeDude JamesTheAwesomeDude commented Dec 5, 2016

tl;dr: this is a problem with your media player and/or OS configuration—not YouTube-DL.

YouTube-DL is functioning as expected and according to standards. The current behavior is well and good. It actually is downloading a copy of the video which looks better (in a proper media player) than the one which looks the best in your media player.

Basically, regular video vs HDR video is analagous to sRGB vs Adobe RGB. The HDR video has lower "saturation" values for each pixel (relative to "maximum saturation"), because the maximum saturation points are defined as more absolutely saturated. And so if a media player does not support the HDR tags, and is interpreting the HDR colorpoints as "normal" colorpoints, it's going to look bad.

I just downloaded a copy of the video with youtube-dl tO01J-M3g0U -f 337, and then played it, and it looked fine to me. The shadows are deep, the colors are plenty saturated (and while it doesn't quite show up right on this photograph of the monitor; in person, the video most definitely looks 👌👌👌.)

1205161614

My hardware nor software are anything special.

  • Media player: MPV 2:0.22.0~xenial1 (with vo_opengl)
    (FOSS, cross-platform media player with minimal UI)
  • OS: Mint 18 XFCE w/ Compton
    (Basic user-friendly FOSS operating system)
  • GPU: Radeon HD 7450 GHz Edition
    (AMD graphics card from 2012)
  • GPU driver: xserver-xorg-video-radeon
    (Mint XFCE's OOTB-included drivers for this GPU)
  • Monitor: Dell 1905FP over DVI, "sRGB" color setting
    (Basic SXGA resolution Dell office monitor)
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 6, 2016

@MrBrax and @JamesTheAwesomeDude are right. youtube-dl downloads files as-is. That is, what you see is exactly the same as what YouTube provides. If the video looks wrong, it's either YouTube misconfigured their encoders or your device didn't decode it correctly. Based on others' tests, you may want to check your device.

@yan12125 yan12125 closed this Dec 6, 2016
@MrBrax
Copy link

@MrBrax MrBrax commented Dec 6, 2016

I've tried all the media players on my system and it looks the same in all of them, and i actually bought a 4K HDR tv very recently too, but it can't seem to play files with the webm container, i suppose the software hasn't really catched up as of yet.

Not dismissing the non-issue here though.

@Kagami
Copy link
Contributor

@Kagami Kagami commented Dec 26, 2016

Try mpv, works fine for me out of the box. Seems like VP9 HDR is not well supported across players yet.

Note that you need to pass --postprocessor-args='-strict unofficial' option to youtube-dl if you download more than just vp9.2 format_id - ffmpeg will loose colorspace metadata by default, see ticket 6042.

mpv-hdr

@JamesTheAwesomeDude
Copy link

@JamesTheAwesomeDude JamesTheAwesomeDude commented Dec 27, 2016

@Kagami Thanks for linking that issue; that's a pretty serious concern! 😮

I wonder if youtube-dl ought to consider baking in some kind of workaround for this? It looks like the FFmpeg devs have just given up on it entirely:

Muxing color metadata is not enabled by default and it requires -strict unofficial for the time being.
Use "-strict unofficial" until the above changes.

@Kagami
Copy link
Contributor

@Kagami Kagami commented Jan 15, 2017

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

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.