mirror of
https://github.com/KevinMidboe/spotify-downloader.git
synced 2025-10-29 18:00:15 +00:00
Bugfix: -o m4a would fail [Fixes #720]
In FFmpeg, a given encoding may not always point to the same format string.
This commit is contained in:
@@ -138,6 +138,7 @@ class YouTubeStreams(StreamsBase):
|
||||
self.all = []
|
||||
|
||||
for stream in audiostreams:
|
||||
encoding = "m4a" if "mp4a" in stream.audio_codec else stream.audio_codec
|
||||
standard_stream = {
|
||||
# Store only the integer part for bitrate. For example
|
||||
# the given bitrate would be "192kbps", we store only
|
||||
@@ -145,7 +146,7 @@ class YouTubeStreams(StreamsBase):
|
||||
"bitrate": int(stream.abr[:-4]),
|
||||
"connection": None,
|
||||
"download_url": stream.url,
|
||||
"encoding": stream.audio_codec,
|
||||
"encoding": encoding,
|
||||
"filesize": None,
|
||||
}
|
||||
establish_connection = threading.Thread(
|
||||
|
||||
Reference in New Issue
Block a user