Media tool with support for multiple codecs, filters, and containers. Include the full, uncut console output if you have problems with an FFmpeg command.

learn more… | top users | synonyms

19
votes
1answer
9k 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?
8
votes
1answer
6k 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 ...
9
votes
3answers
3k 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; ...
7
votes
2answers
12k 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 ...
34
votes
2answers
14k 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 ...
7
votes
1answer
2k 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 ...
18
votes
8answers
33k 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 ...
12
votes
2answers
25k 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 a open-source utility to achieve this. I want to merge these file to new .mp4 video file. An ...
13
votes
2answers
12k 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 ...
15
votes
4answers
16k views

How to flip a video 180° (vertical/upside down) with FFmpeg?

I have a video that was recorded upside down. Is it possible to correct this with FFmpeg?
2
votes
1answer
2k 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 ...
0
votes
1answer
433 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
5answers
62k 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 ...
9
votes
1answer
16k 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 ...
36
votes
4answers
18k 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 ...
21
votes
1answer
22k 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 ...
25
votes
3answers
9k 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 ...
10
votes
2answers
31k 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 ...
7
votes
3answers
2k 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
3answers
16k 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 ...
3
votes
1answer
73 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. ...
3
votes
1answer
900 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 ...
2
votes
1answer
1k 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 ...
17
votes
4answers
24k 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?
18
votes
8answers
7k 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
2answers
10k 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
8answers
35k 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, ..., ...
1
vote
2answers
8k views

Concat two mp4 files with ffmpeg without losing quality

i have now a problem with concatenating of 2 videos using ffmpeg. So, i am encoding the source mp4 files to ts with ffmpeg -i output1.mp4 -scodec copy -vbsf h264_mp4toannexb i0.ts but the file ...
13
votes
1answer
18k 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 ...
6
votes
1answer
3k views

Resources To Use FFMPEG Effectively [closed]

Lately i've posted a lot of questions about how to use ffmpeg. It's pretty clear to me that I am missing some sort background in video encoding and was wondering if any of my fellow superusers had ...
3
votes
1answer
3k 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

how do I convert .iso to .mp4 without mounting with ffmpeg

The problem is - I want to convert .iso with dvd to .mp4 (h264/ac3), but I cannot mount it via mount -o loop, because I'm on a virtual machine that doesn't allow to do that. Googling doesn't help. ...
10
votes
4answers
17k 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
3
votes
3answers
2k views

Convert video from .mp4 to .ogg

I am using ffmpeg version 0.11.1 Copyright (c) 2000-2012 the FFmpeg developers . I need to convert a file .mp4, to .ogg format. I am on Mac OS X, and I have tried this so far: ffmpeg -i ...
3
votes
3answers
11k views

Extracting “one of every 10 frames” in a video using VLC or FFmpeg

I am trying to extract "exactly 1 frame of every 10" frames of a video (i.e. extract 1 , leave 9 then repeat) for scientific purposes. The video is 105 frames, 3.5 seconds, 29.97fps (h.264, .mov, ...
3
votes
4answers
3k views

FFmpeg tweaks for converting from WMV to FLV?

When using ffmpeg to convert from .wmv files to .flv files, I find that either the quality is too low or the bps is too high. I am working on a Ubuntu Linux installation. Any suggestions? The bps ...
1
vote
1answer
280 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 ...
4
votes
3answers
8k 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 ...
4
votes
1answer
5k views

Use DivX settings to encode to mp4 with ffmpeg

I'm used to use VirtualDub to encode a video to AVI container with DivX-codec (and MP3 for audio). Now I'm planning to use ffmpeg to encode videos to MP4 container with h264-codec. What I've figured ...
3
votes
1answer
2k views

Can FFMPEG convert mp3 files into m4a in full, i.e. with both audio and video streams (jpeg cover) copied?

I use Zeranoe build of ffmpeg. It converts mp3 files into m4a files just fine, as far as the audio stream is concerned, but I can't figure out a way to keep the songs album cover jpeg, which ffmpeg ...
4
votes
1answer
640 views

ffmpeg's select-filter generates unwanted black frames

I want to cut a video by frames with ffmpeg. What I came up with so far is ffmpeg -i P2.mp4 -vf "fps,setpts='PTS-STARTPTS',select='gte(n\,20)*lte(n\,30)',crop='600:430:100:650',scale='280:-1'" ...
4
votes
2answers
2k views

How do you splice out a part of an xvid encoded avi file, with ffmpeg? (no problems with other files)

Im using the following command, which works for most files, except what seems to be xvid encoded ones /usr/bin/ffmpeg -sameq -i file.avi -ss 00:01:00 -t 00:00:30 -ac 2 -r 25 -copyts output.avi So ...
3
votes
0answers
349 views

Ffmpeg sync error, first image showing really fast

I want to converting my images with mp3 to videos... but first slide is showing up really fast. I want to each slide duration 5-7 seconds or so RAW material MP3 Files My list Images FFmpeg ...
3
votes
1answer
1k views

FFmpeg command converting M4V to FLV; video streaming is very slow

I am using this command to convert videos from M4V and AVI to FLV: ffmpeg -i 'video_1355440448.m4v' -s '640x360' -ab '64k' -ar '44100' -q:v '1' -f 'flv' -y video_1355440448.flv I have two servers: ...
3
votes
0answers
562 views

ffmpeg to resize and concatenate multiple videos

I need to perform 3 operations on a source video (in sequence) 1 resize the source video from 320X 240 to 640X480 (200%) 2 add another video file before 3 add a 3rd video after In addition I ...
2
votes
2answers
7k 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 ...
2
votes
0answers
287 views

Shoud I use ffmpeg to have videoCodecId = 2 or 7?

I am using ffmpeg to convert my video files to flv. My issue is that I want the converted flv files to have videoCodecId and audioCodecId = 2, because, I am injecting keyframes in the converted file ...
1
vote
0answers
84 views

Concatenation of two avi files using ffmpeg in windows 7 [closed]

I have two avi files namely test.avi and SUNP.avi . I need to concatenate these two files into a single avi file I tried with this code ffmpeg -i concat:test.avi|SUNP.avi -c copy new1.avi It is ...
1
vote
1answer
905 views

ffmpeg - joining 2 videos to play one after another

I'm trying to join two video files together - I'm piping the commands through PHP exec() as these videos are selected by the user. I can get it working, in that it does output a video of the correct ...
1
vote
1answer
1k views

What file extensions does ffmpeg support?

I'm trying to extract a subtitle from a Blu-ray disc and it is an hdmv_pgs_subtitle. So I try ffmpeg -i file.m2ts -map 0:3 -scodec copy rip3/test.sub and get Could not write header for output ...