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.

learn more… | top users | synonyms

23
votes
1answer
12k views

What is the “sameq” or “same_quant” option in FFmpeg? Does it mean “same quality”?

Often, I've seen FFmpeg commands using the sameq option, for example ffmpeg -i input.mp4 -sameq output.avi What does this mean? Does it mean "same quality"? If not, what should I use instead?
104
votes
6answers
64k views

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

I'm converting .flv movie 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 ...
25
votes
2answers
25k views

Resizing videos with ffmpeg/avconv to fit into static sized player

I have a html 5 video player which is 700px wide, 400px high. I'm trying to use avconv to use ffmpeg to resize (while retaining the aspect ratio) and making sure it fits into my player. Input can be ...
9
votes
2answers
9k views

What parameters should I be looking at to reduce the size of a .MOV file?

My Canon 60D creates .MOV files when recording video and I've found out that the .MOV container has an H264 video stream and a PCM audio stream. I've used ffmpeg and GSpot to look at some of my ...
32
votes
5answers
35k views

How to rotate a video 180° with FFmpeg?

I have a video that was rotated 180° when recorded. Is it possible to correct this with FFmpeg?
10
votes
1answer
3k views

What bunch of ffmpeg scripts do I need to get HTML5-compatible “Video for everybody”?

What list of commands should I do in ffmpeg/mencoder/some_other_CLI_app to get a video in all the right formats to use Video for Everybody? i.e. Is there a subtlety that prevents there being a ...
16
votes
4answers
9k views

How can I remove multiple segments from a video using FFmpeg?

I am trying to delete a few sections of a video using FFmpeg. For example, imagine if you recorded a show on television and wanted to cut out the commercials. This is simple with a GUI video-editor; ...
14
votes
3answers
30k views

Strip metadata from all formats with FFmpeg

How can I remove all metadata from all formats via FFmpeg? I can just set special metadata for each format per man ffmpeg. Any option or method to clear all metadata and strip media from all metadata ...
2
votes
2answers
4k views

Create video with 5 images with fadeIn/out effect in ffmpeg

With 5 images I have to create a video of 60 seconds in ffmpeg, each image has to display for 15 seconds. after 15 seconds, first image has to fade out and 2nd image has to fade in, after that 2nd ...
4
votes
1answer
4k views

Tool to bulk speed up/convert an audio file

I want to listen to certain podcasts on my phone but I have two common problems: The audio is in some weird format (some don't play on my phone). The audio is slow. I want to use something like ...
1
vote
1answer
1k views

Ffmpeg add new audio in video (mixing 2 audio)

I want to add an audio to video at specific duration. Now before/after that intended duration, original audio of the video should be playing; and at the intended duration only inserted audio should ...
52
votes
3answers
27k views

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 ...
53
votes
10answers
73k views

ffmpeg: create a video from images

Is it possible to use ffmpeg 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, ..., ...
8
votes
2answers
7k views

crossfade between 2 videos using ffmpeg

I've been trying to achieve a crossfade transition between 2 video clips using ffmpeg but have failed so far. I'm new to ffmpeg and am mostly relying on tweaking what I can find in the documentation ...
36
votes
2answers
45k views

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 ...
35
votes
5answers
65k views

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 ...
35
votes
8answers
61k views

How to convert video to images?

How can I convert a video file to a sequence of images, for example one frame every N seconds. Can mplayer or ffmpeg do this? I have used MPlayer to grab screenshots manually but I would like to ...
7
votes
4answers
4k views

Automatically split large .mov video files into smaller files at black frames (scene changes)?

I have 65 .mov video files named tape_01.mov, tape_02.mov, ..., tape_65.mov. Each is about 2.5 hours long and takes up many gigabytes. They are digital copies of what were VHS tapes (my family's ...
7
votes
1answer
2k views

FFmpeg - Apply blur over face

I'm trying to blur a portion of a video using FFmpeg (specifically to blur a face). I have been trying to use a combination of timeline editing and the various bluring filters, but I cannot find a ...
6
votes
3answers
12k views

Which codecs are most suitable for playback with Windows Media Player on Windows XP?

I need to encode a short video in a format that can be played with windows media player on windows xp without installing any additional codecs. For the recoding process I'm using ffmpeg. I've already ...
113
votes
5answers
135k views

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 ...
40
votes
5answers
25k views

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 ...
20
votes
2answers
69k views

Convert AVI to MP4 keeping the same quality

I want to compress an AVI file to MP4 using an h.264 codec. I could not get the same quality. How can I compress it? Original Video: Original Video Screen: FFmpeg console output (ffmpeg -i ...
11
votes
1answer
8k views

How to replace an audio stream in a video file with multiple audio streams?

I want to replace the second audio stream (0:2) in a video file that has two audio streams and give it a label if possible. How would I go about this? All the ffmpeg commands I found won't let me keep ...
13
votes
1answer
27k views

FFmpeg command to convert MP3 to AAC

I can issue this command: ffmpeg -i input.mp3 -acodec alac -ab 128k -ar 48000 -ac 2 -y output.m4a to create a m4a file. But when I issue this command ffmpeg -i input.mp3 -acodec alac -ab 128k ...
3
votes
1answer
5k views

How do I extract the timestamps associated with frames ffmpeg extracts from a video with the -r option?

ffmpeg -i myvid.mp4 -r 25 -t 100 image-%d.jpeg Is the command I'm using to extract frames and it's working just like I expected. However I'd also like to look at the timestamps of the frames. ...
2
votes
1answer
312 views

Upscaling video with different filter on each side

I need scale up video from one DOS game using FFmpeg. But with Nearest-neighbor interpolation on left side and xBR filter on the other one. Input (320x200) Output (1280x800) Here is a command, ...
2
votes
2answers
10k views

How do I tell ffmpeg to transcode to a video codec supported by Windows Media player?

The command below executed without error. ffmpeg -i thevideo.mkv outvideo.avi Subsequent attempts to play outvideo.avi in Windows Media player threw this error You may need an additional video ...
51
votes
6answers
69k views

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?
17
votes
3answers
19k views

How to create an uncompressed AVI from a series of 1000's of PNG images using FFMPEG

How can I create an uncompressed AVI from a series of 1000's of PNG images using FFMPEG? I used this command to convert an input.avi file to a series of PNG frames: ffmpeg -y -i input.avi -an ...
34
votes
3answers
46k views

Why would I choose Libav over FFmpeg, or is there even a difference?

From what I've seen it looks to me like Libav's avconv is thought to become a successor of ffmpeg — is that correct? If that's true, why is that so? What exactly is libav doing better and why would ...
21
votes
1answer
46k views

Converting FLV to MP4 Using FFMPEG and Preserving the Quality

Im trying to use ffmpeg to convert my flv files to mp4 to play them on iOS devices but the converted video has a much worse quality than the original one. Here is the command i use: ffmpeg -i ...
12
votes
3answers
33k views

How can I re-encode H.264 video with minimal quality loss?

I have a lot of MPEG-TS files (.TS container but H.264 video) and playback is fine except that when you skip forward/backward or fast forward it's very sluggish and gets pixelated, etc. I've been ...
6
votes
2answers
16k views

Converting images to video using FFMPEG on Windows

I'm trying to convert a series of JPEG images into a time lapse video. They're in the format IMGP0001.JPG, IMGP0002.JPG, etc. From the looks of things, this should match the pattern IMGP%04.JPG. I've ...
4
votes
1answer
828 views

FFMPEG filter to boxblur and greyscale a video using alpha mask

Can someone show me how to enhance the example found here: FFmpeg - Apply blur over face To do the following: Use an input alpha mask PNG instead of a declared rectangular region both blur and ...
4
votes
1answer
2k views

Wrong audio duration with ffmpeg

I tried to convert a m4a file to mp3 with ffmpeg, with the following simplest command: ffmpeg -i in.m4a out.mp3 After conversion, the duration seems weird. The original m4a was 4:06. But for the ...
3
votes
2answers
2k views

ffmpeg placing audio at specific location [closed]

got few input sources and i want to place the audio at specific location in the output Currently the complex filter expression is cutting the original audio and placing it at same location I want ...
3
votes
1answer
1k views

iPhone recorded videos getting rotated on Windows systems

I am recording videos on iPhone and uploading them to my Linux server. Users can see these videos on website. If users are seeing videos on mac or iDevices the video is looking fine but when users are ...
3
votes
1answer
2k views

Encode HD video to a good format for editing

I have a video that I would like to edit, but it's currently a mov (H.264) file, which makes frame by frame editing impossible. So, I'd like to re-encode it to a better format. I read that DV is a ...
0
votes
1answer
96 views

No such input format: MJPEG

I want to convert my camera pixels format from YUYV to MJPEG. I tried to use v4l-utils but when i used this commend in terminal: ffmpeg -f video4linux2 -pixel_format MJPEG -i /dev/video0 but when I ...
14
votes
3answers
38k views

Creating MP4 videos ready for HTTP streaming

How can I convert some.flv or some.avi or some.wmv with FFmpeg to be sure that this video will be playable and seekable in JW Player?
32
votes
1answer
44k views

How to resize a video to make it smaller with FFmpeg

Is it possible to resize my videos to make them smaller with FFmpeg? I have an original video dimensions of 1024x576, now I want to resize the video to 720x480 to meet the requirement. How can I do ...
9
votes
2answers
21k views

Concat two mp4 files with ffmpeg without losing quality

I want to concatenate 2 videos using ffmpeg. I am using: ffmpeg -i output1.mp4 -scodec copy -vbsf h264_mp4toannexb i0.ts But the mp4 file I get looks much worse then the source file. Here is the ...
20
votes
5answers
48k views

How to install FFmpeg on Debian?

I would like to know how to install FFmpeg on Debian.
18
votes
8answers
8k views

Program to convert flac to mp3? [closed]

I'm looking for a program to convert flac files to mp3, while preserving the embedded metadata (including album art). I'm pretty sure this is possible with ffmpeg, but I don't know the command . . . ...
11
votes
1answer
11k views

Install FFmpeg on OS X

Is there a good place or bash script I can use (or at least a version I can build myself) for FFmpeg on OS X? I have Xcode installed as well as the CLI for Xcode (gcc etc). I have a version of ...
12
votes
4answers
33k views

How can I pipe output of ffmpeg to ffplay?

How can I pipe the output of ffmpeg to ffplay? At the moment I use a workaround in bash : mkfifo spam (ffplay spam 2> /dev/null &) ; capture /dev/stdout | ffmpeg -i - spam
9
votes
1answer
21k views

How to cut at exact frames using ffmpeg?

I'm trying to use ffmpeg to cut video files at precise times. The ffmpeg help shows an option -timecode_frame_start to specify the starting frame but I am unable to get this command to work. The ...
5
votes
1answer
7k views

How to get time stamp of closest keyframe before a given timestamp with FFmpeg?

I want a FFmpeg seeking command that fast and accurate. I found this. The solution is that we apply -ss for both input (fast seeking) and output (accurate seeking). But: If the input seeking is not ...
3
votes
1answer
7k views

What H.264/H.265 video compression parameters provide DVD-equivalent quality with better compression?

I have got a box of DVD video disks that I seek to get rid of while I'd like to keep the videos by converting them into MP4 files to store them on a hard drive. Considering superiority of the modern ...