Closed lucasprds closed 8 months ago
Currently, the exported MP3/MP4 file uses the highest bitrate available. If you want to specify a certain bitrate, you might be able to do so with pytube if you change what you filter/order by in the website/views.py
file on lines 256
and 258
.
Hi. I checked what you told me, in the code it's effectively supposed to download the highest quality. However, when I try to download a video, it's always in 720p for video, or 128kb/s for audio (Tried again a few minutes ago with this video https://www.youtube.com/watch?v=LXb3EKWsInQ and still can't get the best quality). Trying to fix that, but if you have any idea please let me know! Many thanks
Hmmm, that's weird. The code currently filters by resolution in descending order and outputs the first result, which should be the highest resolution video. Also, get_audio_only
should output the highest bitrate audio according to the pytube
documentation.
Regarding video, you can try this suggestion from StackOverflow (highresvid = video.streams.get_highest_resolution()
), but I think the issue is related to how pytube
gets its streams from YouTube.
If I get the time, I'll try to look into it further. Thanks for letting me know by the way!
You're welcome ! :) If i find something that can help, I'll let you know
Can't find how to increase mp3 bitrate / mp4 format ! Could you tell me if there is a way already?