fix: use acodec for audio streams instead of vcodec
should fix some issues with more strict DASH players
This commit is contained in:
@@ -564,8 +564,8 @@ def parseAdaptiveStreams(wdata_astream: dict, ydata_stream: dict) -> dict:
|
||||
"clen": wdata_astream["contentLength"],
|
||||
"lmt": wdata_astream["lastModified"],
|
||||
"projectionType": wdata_astream["projectionType"],
|
||||
"container": safeTraverse(FORMATS.get(wdata_astream["itag"]), [ "ext"], default="mp4"), # invidious_formats,
|
||||
"encoding": safeTraverse(FORMATS.get(wdata_astream["itag"]), ["vcodec"], default="mp4") # invidious_formats,
|
||||
"container": safeTraverse(FORMATS.get(wdata_astream["itag"]), [ "ext"], default="mp4"), # invidious_formats
|
||||
"encoding": safeTraverse(FORMATS.get(wdata_astream["itag"]), ["vcodec"], default="mp4") # invidious_formats
|
||||
}
|
||||
|
||||
isVideo = True
|
||||
@@ -583,10 +583,10 @@ def parseAdaptiveStreams(wdata_astream: dict, ydata_stream: dict) -> dict:
|
||||
else:
|
||||
astream = astream_common
|
||||
# audio-specific metadata
|
||||
astream["encoding"] = safeTraverse(FORMATS.get(wdata_astream["itag"]), ["acodec"], default="mp4")
|
||||
astream["audioQuality"] = wdata_astream["audioQuality"],
|
||||
astream["audioSampleRate"] = int(wdata_astream["audioSampleRate"]),
|
||||
astream["audioChannels"] = wdata_astream["audioChannels"]
|
||||
|
||||
# breakpoint()
|
||||
return astream
|
||||
|
||||
|
||||
Reference in New Issue
Block a user