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

Show more detailed profile info to properly identify HDR content. #11439

Open
ldmldmldm opened this issue Dec 14, 2016 · 3 comments
Open

Show more detailed profile info to properly identify HDR content. #11439

ldmldmldm opened this issue Dec 14, 2016 · 3 comments
Labels

Comments

@ldmldmldm
Copy link

@ldmldmldm ldmldmldm commented Dec 14, 2016

Make sure you are using the latest version:

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

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?

  • Feature request (request for a new functionality)

Feature Request: Display color space

Currently the profile being "vp9.2" indicates "vp9 profile2: color depth: 10–12 bit, chroma subsampling: 4:2:0".

However the VP9 format supports the following color spaces: Rec. 601, Rec. 709, Rec. 2020, SMPTE-170, SMPTE-240, and sRGB. Furthermore spaces that support HDR, like Rec. 2020, may or may not have HDR.

It would be nice if more detailed profile information could be shown:

  • One of the Dolby dynamic metadata profiles
  • HEVCProfileMain10HDR10
  • VP9Profile2HDR
  • VP9Profile3HDR

Or if videos could be flagged as having HDR metadata:

  • ST-2084 Transfer Function - Dynamic HDR Metadata (Dolby-Vision)
  • ST-2084 Transfer Function - Static HDR Metadata (HDR10)
  • ST-2084 Transfer Function - Static HDR Metadata (VP9-PQ)
  • HLG Transfer Function - No HDR Metadata (VP9-HLG)

Long-term goal would be a --prefer-hdr-formats type of flag.

I'm not sure if this is easy or possible without inspecting the video file. I took a look in the manifest using --write-pages but the 330-337 formats did not seem to be in the manifest so I don't know what other info youtube is currently providing.

Youtube HDR Video Upload Requirements Info Here
Android Developer Info: Dolby-Vision / HDR10 / VP9-HLG / VP9-PQ


Example The World in HDR from HDR Launch Playlist

$ youtube-dl -F tO01J-M3g0U   
[youtube] tO01J-M3g0U: Downloading webpage
[youtube] tO01J-M3g0U: Downloading video info webpage
[youtube] tO01J-M3g0U: Extracting video information
[youtube] tO01J-M3g0U: Downloading MPD manifest
[info] Available formats for tO01J-M3g0U:
format code  extension  resolution note
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)
@yan12125
Copy link
Collaborator

@yan12125 yan12125 commented Dec 20, 2016

Seems YouTube does provide interesting information in fields eotf and primaries. Take itag 330 as an example:

{
    "bitrate": [
        "156637"
    ],
    "clen": [
        "2498956"
    ],
    "eotf": [
        "smpte2084"
    ],
    "fps": [
        "60"
    ],
    "index": [
        "335-851"
    ],
    "init": [
        "0-334"
    ],
    "itag": [
        "330"
    ],
    "lmt": [
        "1479416851204180"
    ],
    "primaries": [
        "bt2020"
    ],
    "projection_type": [
        "1"
    ],
    "quality_label": [
        "144p60"
    ],
    "size": [
        "256x144"
    ],
    "type": [
        "video/webm; codecs=\"vp9.2\""
    ]
}
@yan12125 yan12125 added the request label Dec 20, 2016
@ldmldmldm
Copy link
Author

@ldmldmldm ldmldmldm commented Dec 21, 2016

That eotf+primaries+type information seems to be enough for determining HDR for VP9
according to Youtube HDR Video Upload Requirements Info:

  • smpte2084 = VP9-PQ = PQ10 HDR standard
  • bt2100 = VP9-HLG = HGL10 HDR standard

This should allow for differentiation of simply 10 bit or simply Rec. 2020 content, from HDR content.

From this and this the standards are:

  • HDR10 HDR = PQ, 10bit, Rec. 2020, HEVC?
  • HLG10 HDR = HLG, 10bit, Rec. 2020
  • PQ10 HDR = PQ, 10bit, Rec. 2020
  • Dolby Vision HDR = PQ, 10-12bit, Rec. 2020, AVC/HEVC, Dynamic metadata

It might be too hard to determine which standard is being used, so maybe anything that's 10bit, Rec. 2020, and has an eotf, should be marked as HDR for now?

@remitamine
Copy link
Collaborator

@remitamine remitamine commented Dec 21, 2016

these are the rules use by youtube code:
32 < fps -> HFR
primaries == bt2020 -> WCG
eotf == smpte2084 -> HDR (PQ)
eotf == arib-std-b67 -> HDR (HLG)

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
3 participants
You can’t perform that action at this time.