1

So, I am a beginner in Pyhton and recently I have covered what would be the basics of the language.

And now I have this little project in mind which is basically to create a script that can convert files in a massive way. Specifically convert .ogg files into .mp4 or .mkv files. The intention of this is to convert whatsapp audio files that come in .ogg format to make them more manipulable.

I would like hints suggestions and guidance on how I could do this. Which lib could I use to help me and where can I learn more about this and file conversion using python

Murilo MSA
  • 29
  • 4
  • Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. – Community Jun 25 '22 at 02:27

1 Answers1

0

Not a python user, but will try to give you some direction.

There is a software called ffmpeg. It can be used as a command line tool to convert any audio/video files to almost any format. If you decide to use it manually then you need to download binaries here, put your .ogg file in the /bin directory next to ffmpeg.exe file and execute (here is the screenshot for better understanding):

./ffmpeg.exe -i input.ogg output.mp4
or:
./ffmpeg.exe -i input.ogg -c copy output.mp4

These are only basic commands, for more examples check this answer.

But I would suggest to simply use a python wrapper of this tool that is already implemented, check this quick start guide with lots of examples in python. For more details this answer can be also helpful.

Andrey Kotov
  • 1,344
  • 2
  • 14
  • 26