fix audio codec
This commit is contained in:
parent
31e81432e3
commit
16f267052d
@ -892,6 +892,7 @@ class MenuTrack:
|
||||
|
||||
|
||||
class Tracks:
|
||||
AUDIO_CODEC_MAP = {"EC3": "ec-3", "AAC": "mp4a"}
|
||||
"""
|
||||
Tracks.
|
||||
Stores video, audio, and subtitle tracks. It also stores chapter/menu entries.
|
||||
@ -1190,7 +1191,7 @@ class Tracks:
|
||||
if not with_descriptive:
|
||||
self.audios = [x for x in self.audios if not x.descriptive]
|
||||
if by_codec:
|
||||
codec_audio = list(filter(lambda x: any(y for y in self.AUDIO_CODEC_MAP[by_codec] if y in x.codec), self.audio))
|
||||
codec_audio = list(filter(lambda x: any(y for y in self.AUDIO_CODEC_MAP[by_codec] if y in x.codec), self.audios))
|
||||
if not codec_audio and not should_fallback:
|
||||
raise ValueError(f"There's no {by_codec} audio tracks. Aborting.")
|
||||
else:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user