ffmpeg


Increase volume in video using ffmpeg 2

A quick note on how to boost the audio stream in a video using the volume filter in ffmpeg

#;For newer versions of ffmpeg
ffmpeg -i input.mkv -filter:a "volume=4.0" output.mkv;
#For older versions of ffmpeg (we use multiples of 256)
ffmpeg -i input.mkv -vol 1024 -vcodec copy output.mkv;

Using the above command we were able to make the audio LOUDER!


How to create a video from thousands of images using ffmpeg

We have this simulation that creates several frames demonstrating the life-cycle of an ant colony.
Having thousands of pictures is not very useful most of the times so we decided to create a video out of those frames.
To do so, we decided to use ffmpeg. The names of the files that we generate are 5 digit zero-leading auto increment numbers (e.g 00001.png and 00002.png) so we ended up with the following command:


ffmpeg -framerate 60 -i %05d.png video.mp4;


How to create a video from an audio file and an image using ffmpeg 1

Recently, we had this audio file ( mp3) that we wanted to upload to youtube.com. As it is known, youtube does not allow uploading audio files. Taking that into consideration we had to create a video with a static image just to upload the audio file to youtube. To do that, we used ffmpeg and the following command:


ffmpeg -loop 1 -i Saturday.png -i 20181020.mp3 -shortest -acodec copy 20181020.mp4;


How we concatenate multiple mp3 files into one using ffmpeg

Recently, we needed to concatenate multiple mp3 files into one. We had at our disposal a machine that had ffmpeg installed.
To perform the merge, we created a list (separated by the character |) of the mp3 files, in the order we wanted them merged and executed the concat operation of ffmpeg to complete our task. Our resulting command was the following


ffmpeg -i "concat:20181021_080743.MP3|20181021_090745.MP3|20181021_100745.MP3" -acodec copy 20181021.mp3