sonphantrung commited on
Commit
895544a
1 Parent(s): f81ff2a

Update app.py

Browse files
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)