Category Archives: Tools

Short FFmpeg Guide – Part 2

This is the second part of short ffmpeg guide which I would like to share with you. If you missed part 1 you can read it here.

I would like to show you some useful commands that you may use.

  • Extract only audio from video
  • Add subtitles to video file
  • Extract thumbnail from video

Extract audio from video file

  •  -i indicates the input
  • -ab indicates the bit rate
  • -vn means no video ouput
  • ac 2 means 2 channels
  • ar 44100 indicates the sampling frequency

Add or import subtitles (.srt) to .mp4 file. For this example you need to have 2 files (subtitle file and video file).

I used the following .srt file

And I got the fantastic result that everybody wants to see.

Capture Capture1 Capture4

Extract thumbnail from video

As you see I extract .jpg thumbnail from .mp4 video file. -ss parameter defines the exact time in the video which I want to visualize in the thumbnail. If you want to take your favorite screenshot from a video this is the way.

You can find the full Gist at GitHub.


Short FFmpeg Guide – Part 1

I would like to share with you a few FFmpeg sample commands that you may find useful in order to achieve something great with program like FFmpeg.

First of all, command line will be your best friend while you’re using FFmpeg. You don’t have to be master of using command line under any OS in order to use FFmpeg.

So, let’s start with downloading ffmpeg. This tool is widely used and that’s why you can install it on variety of operating systems Windows, Mac OS and different Linux distributions.

Let me describe the main options that you need to use in order to use properly FFmpeg:

  • -i filename  (input)  – input file name
  • -y (global) – overwrite output files without asking
  • -n (global) – do not overwrite output files, and exit immediately if a specified output file already exists
  • -t duration (input/output) – when used as an input option (before -i), limit the duration of data read from the input file
  • -fs limit_size (input) – set the file size limit, expressed in bytes
  • -metadata[:metadata_specifier] key=value (output,per-metadata)
  • -an (output) – disable audio recording

Hello FFmpeg

Video to audio file

Add title to video file

FFmpegForce the frame rate of the output file

There is one very common problem with people who have problems with FFmpeg, nobody says which version of FFmpeg is using. So when you have a problem with FFmpeg post your current version and complete error log that you receive from the program. In this way people who want to help you will know if your version has a bug or can advise you how to solve the problem. It looks in the following way.

ffmpeg output

Do not forget to visit web site in order get latest commands and information about FFmpeg.

Here you can find the full Gist with commands

Continue reading part 2