Spaces:
Running
Running
fix: get m4r working
#1
by
sonphantrung
- opened
app.py
CHANGED
@@ -54,6 +54,8 @@ def convert_audio(audio_file, output_format, change_bitrate, bitrate):
|
|
54 |
|
55 |
# Create the ffmpeg command
|
56 |
command = ['ffmpeg', '-y', '-i', audio_file]
|
|
|
|
|
57 |
if change_bitrate:
|
58 |
command.extend(['-b:a', f'{bitrate}k'])
|
59 |
command.append(output_audio_file)
|
|
|
54 |
|
55 |
# Create the ffmpeg command
|
56 |
command = ['ffmpeg', '-y', '-i', audio_file]
|
57 |
+
if output_format == "m4r":
|
58 |
+
command.extend(['-f', 'mp4'])
|
59 |
if change_bitrate:
|
60 |
command.extend(['-b:a', f'{bitrate}k'])
|
61 |
command.append(output_audio_file)
|