Closed TyrelCB closed 1 week ago
try without the mp3
same results in audio quality with or without mp3
same results in audio quality with or without mp3
To have better control on what you are downloading, you have to download specifying the itag. For example: itag = 140 download in 128 kbps.
yt = YouTube('http://youtube.com/watch?v=mZkHwI7cX4Y')
print(yt.streams.filter(only_audio=True))
stream = yt.streams.get_by_itag(140)
stream.download(filename='mZkHwI7cX4Y.m4a')
Also, be aware that there are no MP3 audio files available at Youtube. If you want in MP3, you have to convert it.
The mp3=True
option of pytubefix does not provide in real MP3 codec, but only rename the file extension to MP3.
guys the fix is specifying an audio codec, this provides 128kbps AAC, which is the most versitile:
yt.streams.filter(only_audio=True, audio_codec="mp4a.40.2").order_by('abr')[-1].download()
I'll submit a PR to modify the .get_audio_only() method
:exclamation: DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE :exclamation:
lack of information will lead to closure of the issue
Describe the bug
Instead of the expected 128kbps file, all .get_audio_only() streams are 48kbps
code that was used that resulted in the bug
Expected behavior
128kbps AAC
Screenshots
Not needed
Desktop (please complete the following information):
Additional context
This will pull pull the highest quality audio stream