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

Not highest quality video is played #143

Open
mzso opened this issue Mar 25, 2019 · 4 comments
Open

Not highest quality video is played #143

mzso opened this issue Mar 25, 2019 · 4 comments

Comments

@mzso
Copy link

mzso commented Mar 25, 2019

Hi!

I noticed that I don't get the highest res/quality video during playback. If I play an 1600 * 1200 video only the 1440 * 1080 video play even though the former resolution is available. I checked with youtube-dl.

Example video: https://www.youtube.com/watch?v=KCoQKtjiWJw

@YePpHa
Copy link
Owner

YePpHa commented Mar 26, 2019

Seems kind of strange. The 1440x1080 and 1600x1200 both has the 1080p label. If this need to be properly fixed I need to make it go through ytplayer.config.args.adaptive_fmts and group by quality_label, type and fps. The only concern I have is that it could break some stuff.

[
  {
    "itag": "264",
    "type": "video/mp4;+codecs=\"avc1.640028\"",
    "url": "...",
    "index": "712-2663",
    "fps": "25",
    "bitrate": "6249083",
    "init": "0-711",
    "size": "1600x1200",
    "lmt": "1425159597508534",
    "xtags": "",
    "quality_label": "1080p",
    "clen": "479377626",
    "projection_type": "1"
  },
  {
    "itag": "271",
    "type": "video/webm;+codecs=\"vp9\"",
    "url": "...",
    "index": "243-3736",
    "fps": "25",
    "bitrate": "5692015",
    "init": "0-242",
    "size": "1600x1200",
    "lmt": "1426684285446537",
    "xtags": "",
    "quality_label": "1080p",
    "clen": "260669701",
    "projection_type": "1"
  },
  {
    "itag": "137",
    "type": "video/mp4;+codecs=\"avc1.640028\"",
    "url": "...",
    "index": "713-2664",
    "fps": "25",
    "bitrate": "2108560",
    "init": "0-712",
    "size": "1440x1080",
    "lmt": "1425159402141455",
    "xtags": "",
    "quality_label": "1080p",
    "clen": "185388404",
    "projection_type": "1"
  },
  {
    "itag": "248",
    "type": "video/webm;+codecs=\"vp9\"",
    "url": "...",
    "index": "243-3725",
    "fps": "25",
    "bitrate": "2522451",
    "init": "0-242",
    "size": "1440x1080",
    "lmt": "1426683962891669",
    "xtags": "",
    "quality_label": "1080p",
    "clen": "122773726",
    "projection_type": "1"
  },
  {
    "itag": "299",
    "type": "video/mp4;+codecs=\"avc1.64002a\"",
    "url": "...",
    "index": "713-2664",
    "fps": "50",
    "bitrate": "3603607",
    "init": "0-712",
    "size": "1440x1080",
    "lmt": "1425159769582482",
    "xtags": "",
    "quality_label": "1080p50",
    "clen": "306078051",
    "projection_type": "1"
  },
  {
    "itag": "303",
    "type": "video/webm;+codecs=\"vp9\"",
    "url": "...",
    "index": "243-3100",
    "fps": "50",
    "bitrate": "2694340",
    "init": "0-242",
    "size": "1440x1080",
    "lmt": "1426684515995568",
    "xtags": "",
    "quality_label": "1080p50",
    "clen": "178548915",
    "projection_type": "1"
  },
  {
    "itag": "136",
    "type": "video/mp4;+codecs=\"avc1.4d401f\"",
    "url": "...",
    "index": "710-2661",
    "fps": "25",
    "bitrate": "1151865",
    "init": "0-709",
    "size": "960x720",
    "lmt": "1425158905067022",
    "xtags": "",
    "quality_label": "720p",
    "clen": "99680458",
    "projection_type": "1"
  },
  {
    "itag": "247",
    "type": "video/webm;+codecs=\"vp9\"",
    "url": "...",
    "index": "243-3712",
    "fps": "25",
    "bitrate": "1474981",
    "init": "0-242",
    "size": "960x720",
    "lmt": "1426683820191352",
    "xtags": "",
    "quality_label": "720p",
    "clen": "71088677",
    "projection_type": "1"
  },
  {
    "itag": "298",
    "type": "video/mp4;+codecs=\"avc1.4d4020\"",
    "url": "...",
    "index": "710-2661",
    "fps": "50",
    "bitrate": "2060133",
    "init": "0-709",
    "size": "960x720",
    "lmt": "1425159055214864",
    "xtags": "",
    "quality_label": "720p50",
    "clen": "181409739",
    "projection_type": "1"
  },
  {
    "itag": "302",
    "type": "video/webm;+codecs=\"vp9\"",
    "url": "...",
    "index": "243-3090",
    "fps": "50",
    "bitrate": "1542401",
    "init": "0-242",
    "size": "960x720",
    "lmt": "1426683811627312",
    "xtags": "",
    "quality_label": "720p50",
    "clen": "101827610",
    "projection_type": "1"
  },
  {
    "itag": "135",
    "type": "video/mp4;+codecs=\"avc1.4d401e\"",
    "url": "...",
    "index": "709-2660",
    "fps": "25",
    "bitrate": "636450",
    "init": "0-708",
    "size": "640x480",
    "lmt": "1425158792483133",
    "xtags": "",
    "quality_label": "480p",
    "clen": "51124696",
    "projection_type": "1"
  },
  {
    "itag": "244",
    "type": "video/webm;+codecs=\"vp9\"",
    "url": "...",
    "index": "243-3680",
    "fps": "25",
    "bitrate": "791504",
    "init": "0-242",
    "size": "640x480",
    "lmt": "1426683603643335",
    "xtags": "",
    "quality_label": "480p",
    "clen": "38790227",
    "projection_type": "1"
  },
  {
    "itag": "134",
    "type": "video/mp4;+codecs=\"avc1.4d4015\"",
    "url": "...",
    "index": "711-2662",
    "fps": "25",
    "bitrate": "331708",
    "init": "0-710",
    "size": "480x360",
    "lmt": "1425158661541805",
    "xtags": "",
    "quality_label": "360p",
    "clen": "24607505",
    "projection_type": "1"
  },
  {
    "itag": "243",
    "type": "video/webm;+codecs=\"vp9\"",
    "url": "...",
    "index": "243-3631",
    "fps": "25",
    "bitrate": "474090",
    "init": "0-242",
    "size": "480x360",
    "lmt": "1426683565193592",
    "xtags": "",
    "quality_label": "360p",
    "clen": "23508844",
    "projection_type": "1"
  },
  {
    "itag": "133",
    "type": "video/mp4;+codecs=\"avc1.4d400d\"",
    "url": "...",
    "index": "674-2625",
    "fps": "25",
    "bitrate": "265521",
    "init": "0-673",
    "size": "320x240",
    "lmt": "1425158616607091",
    "xtags": "",
    "quality_label": "240p",
    "clen": "25177546",
    "projection_type": "1"
  },
  {
    "itag": "242",
    "type": "video/webm;+codecs=\"vp9\"",
    "url": "...",
    "index": "242-3583",
    "fps": "25",
    "bitrate": "247456",
    "init": "0-241",
    "size": "320x240",
    "lmt": "1426683450862599",
    "xtags": "",
    "quality_label": "240p",
    "clen": "12899425",
    "projection_type": "1"
  },
  {
    "itag": "160",
    "type": "video/mp4;+codecs=\"avc1.4d400c\"",
    "url": "...",
    "index": "673-2624",
    "fps": "13",
    "bitrate": "114934",
    "init": "0-672",
    "size": "192x144",
    "lmt": "1425158595858391",
    "xtags": "",
    "quality_label": "144p",
    "clen": "11287331",
    "projection_type": "1"
  },
  {
    "itag": "278",
    "type": "video/webm;+codecs=\"vp9\"",
    "url": "...",
    "index": "241-3586",
    "fps": "13",
    "bitrate": "147164",
    "init": "0-240",
    "size": "192x144",
    "lmt": "1426683519559854",
    "xtags": "",
    "quality_label": "144p",
    "clen": "8000299",
    "projection_type": "1"
  },
  {
    "itag": "140",
    "type": "audio/mp4;+codecs=\"mp4a.40.2\"",
    "url": "...",
    "index": "592-1607",
    "bitrate": "129703",
    "init": "0-591",
    "audio_sample_rate": "44100",
    "lmt": "1425158507813561",
    "xtags": "",
    "clen": "13097944",
    "projection_type": "1"
  },
  {
    "itag": "171",
    "type": "audio/webm;+codecs=\"vorbis\"",
    "url": "...",
    "index": "4452-5842",
    "bitrate": "111526",
    "init": "0-4451",
    "audio_sample_rate": "44100",
    "lmt": "1426683428210850",
    "xtags": "",
    "clen": "9994182",
    "projection_type": "1"
  },
  {
    "itag": "249",
    "type": "audio/webm;+codecs=\"opus\"",
    "url": "...",
    "index": "272-1661",
    "bitrate": "57116",
    "init": "0-271",
    "audio_sample_rate": "48000",
    "lmt": "1426683431891547",
    "xtags": "",
    "clen": "4998058",
    "projection_type": "1"
  },
  {
    "itag": "250",
    "type": "audio/webm;+codecs=\"opus\"",
    "url": "...",
    "index": "272-1662",
    "bitrate": "73775",
    "init": "0-271",
    "audio_sample_rate": "48000",
    "lmt": "1426683423653621",
    "xtags": "",
    "clen": "6129038",
    "projection_type": "1"
  },
  {
    "itag": "251",
    "type": "audio/webm;+codecs=\"opus\"",
    "url": "...",
    "index": "272-1662",
    "bitrate": "161398",
    "init": "0-271",
    "audio_sample_rate": "48000",
    "lmt": "1426683426459600",
    "xtags": "",
    "clen": "13952548",
    "projection_type": "1"
  }
]

@mzso
Copy link
Author

mzso commented Mar 26, 2019

@YePpHa commented on 2019. márc. 26. 21:25 CET:

Seems kind of strange. The 1440x1080 and 1600x1200 both has the 1080p label.

That's been like that for several years. Though previously it would play the 1920 * 1200 and 1600 * 1200 steams when they were available (if I remember correctly). Now only 1920 * 1200 plays (example).
Interestingly they're the very same format code 271/264. 1600 * 1200 is just neglected for some reason.

@YePpHa
Copy link
Owner

YePpHa commented Mar 26, 2019

I wonder what would happen if the quality_label is changed to 1200p for 1920x1200 and 1600x1200 respectively. It might be possible that it will become a quality option if they didn't hard code the qualities in the player.

@mzso
Copy link
Author

mzso commented Mar 26, 2019

@YePpHa commented on 2019. márc. 26. 22:50 CET:

I wonder what would happen if the quality_label is changed to 1200p for 1920x1200 and 1600x1200 respectively. It might be possible that it will become a quality option if they didn't hard code the qualities in the player.

It might be that once it was. I'm not sure. It might work.

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