pythonaudioffmpegogg

How do I transform python AudioSegment extraction to an ffmpeg command?


I have a python script which loads an MP4 file and saves the audio to an OGG file like so:

movie = AudioSegment.from_file(f"movie.mp4", format="mp4")
movie.export(f"audio.ogg", format="ogg")

I want to extract that to a bash script which will run once at the we create our Debian packages. To do so, I prefer bash and no python. Is the following command equivalent?

ffmpeg -i movie.mp4 -vn audio.ogg

It seems to work (the audio sounds the same), but I wanted to make sure that it was as close as possible to the original conversion. The resulting files can't just be compared apparently.


Solution

  • ffmpeg -i movie.mp4 -vn audio.ogg