Crop a Video

The following example shows how you can use FFMPEG to crop a video without re-encoding.

ffmpeg -i input.mp4 -filter:v “crop=1280:200:0:500” -c:a copy output.mp4

where 1280 and 200 are the output size (width and height) of the cropped video, 0 and 500 are positions where the cropping will start.

DVD Ripper – SmartRipper

If you would like to rip a DVD with multiple audio tracks (e.g. karaoke discs) into individual files for each chapter, you can consider using an old and primitive program called SmartRipper (but it works, even in Windows 10). Change the settings to split files by chapter and you will get a VOB file for each chapter in the DVD title. Rename file extension from VOB to MPG. All audio tracks will be preserved. Download the program from this link. There is no installation; just run the application after unzipping the downloaded file.

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 volume of an audio file with re-encoding.

ffmpeg -i input.mpg -map 0:1 -acodec copy -vn output.ac3
ffmpeg -i input.ac3 -filter:a “volume=10dB” output2.ac3

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, the source video is encoded in MPEG-2 in an MKV container. It will be converted to an MPG video. No re-encoding is required since the source video is already in the target format. You can also select one or more audio tracks during conversion if this is part of the requirements.

ffmpeg -i input.mkv -map 0:a:1 -map 0:v -c:v copy -c:a copy output.mpg

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 that have a wired connection to the router. The problem may be caused by one of those computers that require a restart after Windows update. If that is the case, simply restart the computer to finish the update process and the router problem should go away.

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 tracks.

ffmpeg -i input.mp4 -c copy -ss 00:24:00.000 -t 00:04:08.000 -map 0:v -map 0:a output.mp4

The example above may result in blank video in the beginning. If it is more important to have the video than audio, the following can be used (which may cause blank audio in the beginning).

ffmpeg -ss 00:24:00.000 -i input.mp4 -c copy -t 00:04:08.000 -map 0:v -map 0:a output.mp4

The most accurate way to extract part of a video is to re-encode (without -c copy), which may result in loss of quality and takes longer to process. This article describes the topic in details.

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 to set the default audio stream while you are mixing the video/audio streams.

ffmpeg -i movie.mkv -i audio.dts -map 0:v:0 -map 1:a:0 -map 0:a:0 -c copy -disposition:a:0 default -disposition:a:1 none movie_combined.mkv