Blog Archives

Extract Audio and Adjust Volume

The following are two common usages of FFMPEG. The first command extracts an audio track from a video file in the exact format that it was multiplexed info the video file. The second example shows how you can adjust the

Posted in Tips & Tricks

Converting MP4 Videos to MPEG

The following command converts an MP4 video to an MPEG video with high quality: ffmpeg -i input.mp4 -c:v mpeg2video -q:v 5 -c:a mp2 -f vob output.mpg

Posted in Tips & Tricks

Converting a Video without Re-encoding

FFMPEG can be used to convert a video from one format to another. Very often, the video itself to be converted is already encoded in an appropriate format. You just want to convert the container format. In the following example,

Posted in Tips & Tricks

Router AC68U Having 100% CPU Problem

If the router runs into a problem of 100% CPU affecting the internet connection, normal courses of actions include re-booting the router, power recycle the router and applying the latest firmware. If none of the above works, check the computers

Posted in Tips & Tricks

Extracting a Portion of Video using FFMPEG

If you would like to extract a portion of a video without re-encoding, consider using FFMPEG. The following example illustrates a command to extract a video from the 24th minute line and for 4 minutes 8 seconds, keeping all audio

Posted in Tips & Tricks

Setting the default audio stream using FFMPEG

Here is another use case for FFMPEG. In some projects, after you mixed and matched video and audio streams from different files, the resultant file may not have the default audio stream as desired. You can use the following command

Posted in Tips & Tricks

Changing resolution of a video using FFMPEG

Very often you would like to change the not-so-standard resolution of a video to some more common formats, e.g. 4:3 or 16:9. You can try using the following FFMPEG command to achieve this. ffmpeg -i video_1920.mp4 -vf scale=640:480,setdar=4:3 video_640x480.mp4 -hide_banner

Posted in Tips & Tricks

Replacing an Audio Stream using FFMPEG

This is another example of using FFMPEG to manipulate video and audio files. In this case, one would like to replace the second audio stream in a video file by another audio file. Here is the command you may want

Posted in Tips & Tricks

Add a new audio track to an existing file

There is yet another common use of FFMPEG, i.e. adding a new audio track to an existing file which can be a video-only file or a video file already with an audio track. A use case will be adding a

Posted in Tips & Tricks

Correcting for audio/video sync issues

Due to various reasons, the audio and video tracks sometimes may become out-of-sync in a video clip, i.e. there are some delay between the tracks affecting the overall viewing experience. Use the following as examples to fix the issue. CASE

Posted in Tips & Tricks