Category Archives: Programming

(FFmpeg) How to Trim ‘x’ Seconds From the End of a Video?

Trimming a couple of seconds, minutes or hours off the end of a video is easy but again requires a different understanding of time in FFmpeg. Trimming from the end of an MP4 uses the argument -t or duration with … Continue reading

Posted in Programming, Tutorial | Tagged | 1 Comment

(FFmpeg) How to Trim ‘x’ Seconds From the Start of a Video?

Trimming a few seconds, minutes or hours from a video is simple but requires an understanding of the seeking and duration options. In this example, the input file is 5 minutes long with a 15 second introduction that needs to … Continue reading

Posted in Programming, Tutorial | Tagged | 2 Comments

(FFmpeg) How to Compress MP4 and Reduce File Size?

Although not a conversion to another format, compression is one of the most asked questions about MP4 files with FFmpeg. People are constantly looking for ways to reduce file size while keeping quality generally the same. This is easily done … Continue reading

Posted in Programming, Tutorial | Tagged | Comments Off on (FFmpeg) How to Compress MP4 and Reduce File Size?

(FFmpeg) How to Convert MP4 to GIF?

In the previous video format conversions the formats supported audio without any additional encoding. A Graphic Interchange Format or GIF is a bitmap image format without an audio component.  GIFs have been around since the late 80s and are still … Continue reading

Posted in Programming, Tutorial | Tagged | Comments Off on (FFmpeg) How to Convert MP4 to GIF?

(FFmpeg) How to Convert WebM to MP4?

As an open source alternative to HTML5 video (the successor of FLV), WebM is another multimedia container format that is currently being maintained by Google. WebM files are native to android devices but not iOS (or Safari), thus converting to … Continue reading

Posted in Programming, Tutorial | Tagged | Comments Off on (FFmpeg) How to Convert WebM to MP4?

(FFmpeg) How to Convert FLV to MP4?

FLV or Flash Video is a multimedia container format maintained by Adobe Systems. It was once the staple of how most media was delivered on the internet in the early 2000s.  Although replaced in the modern streaming world, FLV files … Continue reading

Posted in Programming, Tutorial | Tagged | Comments Off on (FFmpeg) How to Convert FLV to MP4?

(FFmpeg) How to Convert AVI to MP4?

The AVI format is a multimedia container format developed and maintained by Microsoft. AVI has support for multiple video codecs including MPEG-4. This makes the conversion to MP4 simple: If the input.avi codec is not MPEG-4, setting the libx264 codec … Continue reading

Posted in Programming, Tutorial | Tagged | Comments Off on (FFmpeg) How to Convert AVI to MP4?

(FFmpeg) How to Convert MKV to MP4?

The Matroska Multimedia Container or MKV is a free open container format that differs from formats like MOV or MP4. MKV files can store an unlimited amount of video, audio, pictures or subtitle tracks in one file. This stacking of … Continue reading

Posted in Programming, Tutorial | Tagged | Comments Off on (FFmpeg) How to Convert MKV to MP4?

(FFmpeg) How to Convert MOV to MP4?

MOV is a video format developed by Apple but compatible with most software and players. MOV uses the MPEG-4 codec for compression making the conversion between MOV to MP4 very simple, as seen below: Tip: MOV files are usually larger … Continue reading

Posted in Programming, Tutorial | Tagged | Comments Off on (FFmpeg) How to Convert MOV to MP4?

(FFmpeg) How to Replace the Audio on a Video?

There are times when the audio on a video needs to be replaced. Here filters are not even needed to replace audio but the use of ​-map becomes important to understand: Here the video from the first input and the audio from … Continue reading

Posted in Programming, Tutorial | Tagged | Comments Off on (FFmpeg) How to Replace the Audio on a Video?