Compare commits

...

2 commits

Author SHA1 Message Date
Alex Richards 9d146f7c9e
Merge e8bebe0b03 into 21792b88b7 2024-04-02 03:35:18 +02:00
Alex Richards e8bebe0b03 [postprocessor/ffmpeg] Allow options for mp3
Why?
Options like `preferredquality` are ignored when postprocessing mp3s.

What?
Remove `mp3` from the list of `filecodec` values to check for in the
"lossless" condition unless `preferredquality` is unspecified.
2023-08-17 07:48:20 -07:00

View file

@ -270,7 +270,10 @@ class FFmpegExtractAudioPP(FFmpegPostProcessor):
acodec = 'copy'
extension = 'm4a'
more_opts = ['-bsf:a', 'aac_adtstoasc']
elif filecodec in ['aac', 'flac', 'mp3', 'vorbis', 'opus']:
elif (
filecodec in ['aac', 'flac', 'vorbis', 'opus'] or
(filecodec == 'mp3' and self._preferredquality is None)
):
# Lossless if possible
acodec = 'copy'
extension = filecodec