Have you ever needed to convert a video file to compress its data, or convert a image for better quality?
FFmpeg is a free and open-source video conversion, extraction, and editing tool that serves as a solution to this question! The tasks that can be performed include converting audio files, video files, photos, extracting images from video files, and so much more.
In this post, we will be highlighting some of its basic functions. For this exercise, it would be best to use a Ubuntu or Debian based distribution.
To start, download the ffmpeg package.
sudo apt-get install ffmpeg
Now we can use ffmpeg to convert various mediums. The following commands can be used to convert the corresponding media.
Converting Audio
ffmpeg -i originial_file.mp3 converted_file.mp4
Converting Video
ffmpeg -i original_file.mp4 converted_file.webm
Converting Photos
ffmpeg -i original_file.jpg converted_file.png
We can also Extract Images from a video as well.
ffmpeg -i video.mp4 output_file%d.jpg
If you have any further questions or feedback, you can contact me on LinkedIn, Twitter, or Instagram.