Questions tagged [ffmpeg]

Media tool with support for multiple codecs, filters, and containers. Include your actual command and the complete console output when asking questions involving FFmpeg tools. An easy way to do this is by adding `-report` to your command and pasting the contents of the logfile generated. For help with CLI use only of ff* binaries - ffmpeg, ffprobe, ffplay. For help with API usage, post on Stack Overflow.

FFmpeg is a suite of media encoders and decoders with support for multiple codecs and containers. It is typically used in library form by a graphical tool, or via the command-line interface which offers scriptability and portability. FFmpeg includes the libavcodec and libavformat libraries, and the ffmpeg, ffprobe, and ffplay command-line tools.

More info

Installation

FFmpeg source code can be downloaded from the official homepage.

How to write a question for FFmpeg

  • Always install the latest version if possible.
  • Include the full command line input and output, not truncating anything.
  • Provide a sample input video if possible.

The ffmpeg-user mailing list and #ffmpeg IRC channel are also good places to ask for help.

Related Tags

6713 questions
630
votes
15 answers

How do I convert a video to GIF using ffmpeg, with reasonable quality?

I'm converting a video to GIF file with ffmpeg: ffmpeg \ -i input.flv \ -ss 00:00:00.000 \ -pix_fmt rgb24 \ -r 10 \ -s 320x240 \ -t 00:00:10.000 \ output.gif It works great, but output gif file has a very low quality. Any ideas how…
Kamil Hismatullin
  • 6,410
  • 3
  • 13
  • 7
573
votes
9 answers

Using ffmpeg to cut up video

I am using ffmpeg to cut out a section of a large file like this: ffmpeg -i input.wmv -ss 60 -t 60 -acodec copy -vcodec copy output.wmv The -ss part works fine but the -t is ignored. It correctly removes the initial specified seconds specified with…
Neil
  • 5,859
  • 3
  • 16
  • 3
505
votes
5 answers

Remove audio from video file with FFmpeg

How can I strip the audio track out of a video file with FFmpeg?
Rami Dabain
  • 5,297
  • 4
  • 17
  • 10
407
votes
7 answers

How to merge audio and video file in ffmpeg

I want to merge an audio file (.wav or .au format) with a video file (.mp4 format). Please suggest me how to achieve this. I want to merge these file to new .mp4 video file. An ffmpeg command would be very welcome.
Sandy
  • 4,629
  • 9
  • 27
  • 27
294
votes
15 answers

Combine one image + one audio file to make one video using FFmpeg

This should be pretty trivial, but I can't find a way to get it to work. I want FFmpeg to take one JPEG image and an audio file as input and generate a video file of the same duration as the audio file (by stretching the still image for the whole…
matteo
  • 4,199
  • 6
  • 20
  • 22
268
votes
11 answers

How can I make ffmpeg be quieter/less verbose?

By default ffmpeg sends a whole lot of messages to stderr: when built, how it was built, codecs, etc, etc, etc. How can I make it quieter? I've tried -v 0 (and -v 10 since the documentation just coyly says Set the logging verbosity level. with no…
blahdiblah
  • 4,873
  • 2
  • 22
  • 30
263
votes
2 answers

How to resize a video to make it smaller with FFmpeg

How do I resize a video to make it smaller with FFmpeg? (e.g. from 1024x576 to 720x480.)
Alan
  • 2,731
  • 2
  • 11
  • 6
241
votes
6 answers

Cut part from video file from start position to end position with FFmpeg

I have a video file of 30 minutes, but I want to extract a video from 00:09:23 to 00:25:33. I can define the startposition with -ss, but I couldn't find one for the end position. Any help please?
x74x61
  • 2,801
  • 4
  • 16
  • 7
221
votes
4 answers

How can I convert MP4 video to MP3 audio with FFmpeg?

I need to extract an MP3 audio track from an MP4 video with ffmpeg. I can do this for .flv -> mp3, but I don't know the command line parameters for mp4->mp3. For example, flv -> mp3: ffmpeg -i video.flv -acodec copy audio.mp3 What parameters should…
user916350
202
votes
6 answers

How can I normalize audio using ffmpeg?

I want the loudest peak sound in a movie clip to be as loud as the codec allows, then have every other sound amplified accordingly. What's a practical example in order to accomplish this using ffmpeg?
Jon Skarpeteig
  • 2,141
  • 3
  • 13
  • 8
161
votes
1 answer

ffmpeg - replace audio in video

How to replace the audio in a video file using an audio file using ffmpeg? I imagine the command looks like: ffmpeg -i v.mp4 -i a.wav -MAGIC video-new.mp4 This is very similar to How to replace an audio stream in a video file with multiple audio…
qubodup
  • 8,365
  • 7
  • 36
  • 49
157
votes
5 answers

How can I get ffmpeg to convert a .mov to a .gif?

I'm trying to convert a .mov to a .gif and I'm not having success. Here's the error: ffmpeg -pix_fmt rgb24 -i yesbuddy.mov output.gif ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers built on Jun 12 2012 17:47:34 with clang 2.1…
Daniel Fischer
  • 1,931
  • 3
  • 13
  • 12
141
votes
11 answers

How to get video duration in seconds?

How can I get video duration in seconds? What I've tried: ffmpeg -i file.flv 2>&1 | grep "Duration" Duration: 00:39:43.08, start: 0.040000, bitrate: 386 kb/s mediainfo file.flv | grep Duration Duration : 39mn 43s This what close, but it's not…
user2783132
  • 1,797
  • 3
  • 16
  • 22
115
votes
13 answers

How to create a video from images using FFmpeg?

Is it possible to use ffmpeg to create a video from a set of sequences, where the number does not start from zero? For example, I have some images [test_100.jpg, test_101.jpg, test_102.jpg, ..., test_200.jpg], and I want to convert them to a video.…
vailen
111
votes
7 answers

Meaningful thumbnails for a Video using FFmpeg

FFmpeg can capture images from videos that can be used as thumbnails to represent the video. Most common ways of doing that are captured in the FFmpeg Wiki. But, I don't want to pick random frames at some intervals. I found some options using…
d33pika
  • 1,851
  • 4
  • 15
  • 14
1
2 3
99 100