Pytube: 1080p not showing?

Created on 11 Aug 2016  路  19Comments  路  Source: pytube/pytube

Hi. Thank you for this awesome library.

It appears that 1080p quality never shows up as an option even though it's available on YouTube. Is it a choice (I admit I haven't looked at the source) or an unwanted behavior?

Thanks!

bug

Most helpful comment

Basically, I am working on my own YouTube downloader. I am working on it two days now (yesterday I was doing some research) and I started programming today. I have my own signature function extractor + all video data. Now I am working on the UI. Higher quality videos will be downloaded from dash streams (adaptive_fmts) and video+audio merged using ffmpeg.

All 19 comments

thanks, let me take a look!

The maximum quality available is 720p... No higher than that (tested with 2160p videos). Also, no option for 720p 60fps or 1080p 60fps. I think it's some kind of limit? I am not sure if it was made by nficano on purpose. But still, I enjoy it. I'm newbie at Python and GitHub.. It keeps me kinda hooked :)

Videos of more than 720p only seem to be available from YouTube by using Media Source Extensions (so they are served as a stream from a javascript API instead of a link to a file). This may be related.

https://googlesystem.blogspot.com/2013/10/youtube-drops-support-for-1080p-streams.html

Interesting find, I looked into this the other day, I assumed the quality profiles needed to be updated:
https://github.com/nficano/pytube/commit/d625b83f2c2af9afde3fc1c3358662f232de0143

(fwiw these have historically been maintained here: https://en.wikipedia.org/wiki/YouTube#Quality_and_formats)

But this doesn't seem to fix it. I'm going to poke around similar projects see how they have addressed this, I'll try to have an update today.

Hi.
Is there any progress on getting 1080p to work yet? This is a great library, and I'd like to use it for a youtube downloader I'm working on, but it would be nice to be able to download 1080p videos.

Thanks.

@Cg-boy I am currently working on this issue :)

@jetbird Okay, thanks.

I have been hacking the code and I see the 1080p quality video link is not being included in the url_encoded_fmt_stream_map. There is a way to get the separate streams and then join them using ffmpeg. I am ready to implement this feature if @nficano agrees.

@nficano I pushed the code for solving this issue and also created a PR.

thanks will merge today

Related PR is #136

i think 1080p issue is still not solved. Any leads on this topic ?

1080 and 2160 are not showing. Your project is not complete

Is there anything about 1080p?

Video quality 720p+ (even 4k) are available using adaptive_fmts instead of url_encoded_fmt_stream_map, BUT, video is separated from audio.

@myelmer @svkboii I been working hard over the past 2 weeks to do a complete rewrite of pytube (available here: https://github.com/nficano/pytube/tree/7.0.0).

I'm in the burn down phase of getting it releasable, the outstanding tasks are:

  • [ ] comments and docstrings
  • [ ] unit tests
  • [ ] exceptions
  • [ ] update readme

This release finally exposes adaptive_fmts which includes the 1080p stream.

Basically, I am working on my own YouTube downloader. I am working on it two days now (yesterday I was doing some research) and I started programming today. I have my own signature function extractor + all video data. Now I am working on the UI. Higher quality videos will be downloaded from dash streams (adaptive_fmts) and video+audio merged using ffmpeg.

Is 60fps and 1080p working now properly?

$ pytube "http://youtube.com/watch?v=spDvpDGVNTA" -l
<Stream: itag="22" mime_type="video/mp4" res="720p" fps="30fps" vcodec="avc1.64001F" acodec="mp4a.40.2">
<Stream: itag="43" mime_type="video/webm" res="360p" fps="30fps" vcodec="vp8.0" acodec="vorbis">
<Stream: itag="18" mime_type="video/mp4" res="360p" fps="30fps" vcodec="avc1.42001E" acodec="mp4a.40.2">
<Stream: itag="36" mime_type="video/3gpp" res="240p" fps="30fps" vcodec="mp4v.20.3" acodec="mp4a.40.2">
<Stream: itag="17" mime_type="video/3gpp" res="144p" fps="30fps" vcodec="mp4v.20.3" acodec="mp4a.40.2">
$ pytube --version                                                 
pytube 9.1.1

But we can see, that video contains 720p60 and 1080p60

^ Can confirm that 1080p60fps videos aren't showing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ircama picture Ircama  路  32Comments

NeverAskWhy picture NeverAskWhy  路  62Comments

kpister picture kpister  路  23Comments

RONNCC picture RONNCC  路  20Comments

MrspiLLnyK picture MrspiLLnyK  路  20Comments