TheStinger sonphantrung commited on
Commit
004f095
1 Parent(s): f81ff2a

fix: get m4r working (#1)

Browse files

- Update app.py (895544aceece25333368ffb824382e35eae0803a)


Co-authored-by: Son Phan Trung <[email protected]>

Files changed (1) hide show
  1. app.py +2 -0
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)