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

7391 questions
691
votes
18 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…
620
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
  • 6,329
  • 3
  • 18
  • 3
565
votes
6 answers

Remove audio from video file with FFmpeg

How can I strip the audio track out of a video file with FFmpeg?
TeAmEr
  • 5,897
464
votes
8 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
  • 5,199
325
votes
17 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,559
323
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
  • 5,501
321
votes
3 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
  • 3,311
  • 2
  • 12
  • 6
264
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
  • 3,061
264
votes
5 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
227
votes
8 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?
186
votes
3 answers

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
  • 9,394
162
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…
158
votes
13 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,967
145
votes
7 answers

FFmpeg: Convert m4a to mp3 without significant loss

I have a load of audio files (about 1000) which I want to convert from m4a to mp3 so I can use play them on a CD player which has a USB port. I tried doing something simple like: ffmpeg -i FILE.m4a FILE.mp3 but this seems to reduce the bitrate to a…
user3728501
  • 3,404
  • 9
  • 39
  • 54
133
votes
7 answers

In ffmpeg, how to delay only the audio of a .mp4 video without converting the audio?

In my .mp4 file the audio delay is -3840 ms. I synced it in KMplayer, and I don't want to use MKVGUI to make a .mkv file. I just need to delay the audio by 3840 ms, everything else should be left intact. What would be the right command to accomplish…
Alireza
  • 1,331
1
2 3
99 100