Skip to content

Commit 804c8af

Browse files
temporary fix for flac -> opus not getting cover art well
1 parent d046352 commit 804c8af

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

bulktranscode_core.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@ def process_file(input_file, output_file, mode, target_codec):
4949
Process a single file by transcoding it or copying it.
5050
"""
5151
if mode == "transcode":
52-
subprocess.run([
53-
'ffmpeg', '-i', input_file,
54-
'-acodec', CODEC_NAME[target_codec],
55-
output_file
56-
], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
52+
if target_codec == "opus":
53+
subprocess.run(["opusenc",input_file,output_file])
54+
else:
55+
subprocess.run([
56+
'ffmpeg', '-i', input_file,
57+
'-acodec', CODEC_NAME[target_codec],
58+
output_file
59+
], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
5760
elif mode == "copy":
5861
shutil.copy2(input_file, output_file)

0 commit comments

Comments
 (0)