ahmedghani commited on
Commit
c6e19d0
β€’
1 Parent(s): c1945ab
Files changed (1) hide show
  1. video_convertor.py +1 -2
video_convertor.py CHANGED
@@ -41,8 +41,7 @@ class VideoConverter:
41
  raise Exception("No audio stream found in the input file")
42
 
43
  try:
44
- audio_segment = AudioSegment.from_file(self.input_file, format=self.audio.extension)
45
- audio_segment.export(output_file, format=format.lower())
46
  print(f"Audio converted to {format} format successfully!")
47
  return output_file
48
  except Exception as e:
 
41
  raise Exception("No audio stream found in the input file")
42
 
43
  try:
44
+ self.audio.write_audiofile(output_file)
 
45
  print(f"Audio converted to {format} format successfully!")
46
  return output_file
47
  except Exception as e: