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

32
votes
3answers
42k 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 ...
30
votes
7answers
18k 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, ..., ...
28
votes
1answer
9k 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 ...
24
votes
3answers
38k views

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 ...
19
votes
1answer
7k 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?
19
votes
1answer
12k views

FFMPEG Splitting MP4 with Same Quality

I have one large MP4 file. I am attempting to split it into smaller files. ffmpeg -i largefile.mp4 -sameq -ss 00:00:00 -t 00:50:00 smallfile.mp4 I thought using -sameq would keep the same quality ...
18
votes
8answers
6k views

Program to convert flac to mp3?

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 . . . ...
17
votes
1answer
27k 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 ...
16
votes
3answers
6k 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 ...
16
votes
4answers
14k views

How can I make ffmpeg be quieter/less verbose?

By default ffmpeg sends a whole lotta messages to stderr: when built, how 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 ...
16
votes
1answer
14k 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 ...
16
votes
2answers
4k 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 ...
15
votes
3answers
8k views

Improve quality of ffmpeg created jpgs

I'm using ffmpeg to take a mjpeg feed from an IP camera and convert it into a series of still jpeg images. Here's the command I'm using: ffmpeg -i http://xxx:xxx@xx.xx.xx.xx/vid.mjpg -f image2 ...
14
votes
3answers
8k views

Resize videos with different widths to a fixed height preserving aspect ratio with ffmpeg

I'd like to convert a lot of video files to flash video for our company's website. I have a requirement that all of the videos must be in 360p format, so their size would be Nx360. FFMpeg uses -s ...
14
votes
4answers
5k views

Creating video with audio and still image for YouTube

I'm running the following command: ffmpeg -i audio.mp3 -ar 44100 -f image2 -i logo.jpg -r 15 -b 1800 -s 640x480 foo.mov Which successfully outputs a video with my recorded audio and an image on it. ...
13
votes
8answers
22k 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 ...
13
votes
4answers
8k views

FFMPEG convert flv to mp4 without losing quality

Currently I'm converting .flv flash files to .webm and .mp4 files to be used with an HTML5 video player. _ I use this ffmpeg command for WEBM: ffmpeg -i filename.flv -vcodec libvpx -acodec libvorbis ...
12
votes
2answers
19k views

libav vs ffmpeg - better to use libav (avconv) today? [closed]

From what I've seen it looks to me like libav 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 should I choose it ...
12
votes
4answers
14k 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?
11
votes
3answers
6k views

How to concatenate two flv files?

I want to concatenate two flv files(downloaded from Youtube.com) by linux command line tools. The ffmpeg tutorial is too complicated, so I tried the mencode tutorial. But I get a empty output. I don't ...
10
votes
2answers
7k 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 ...
10
votes
6answers
6k views

Get MP3 Length in Linux / FreeBSD

I have a bunch of mp3 files with various length. I want to cut it down to 50%-60% length. Says, from 1 minute down to 30 seconds. It should be trivial using ffmpeg. But, I don't know how to determine ...
10
votes
3answers
7k 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?
10
votes
1answer
9k 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 ...
10
votes
2answers
15k 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 ...
10
votes
4answers
26k views

How to convert an MKV to AVI with minimal loss

To convert an MKV to AVI, I do two things. The first thing I do is this: ffmpeg -i filename.mkv -vcodec copy -acodec copy output.avi or this: ffmpeg -i filename.mkv -sameq -acodec copy output.avi ...
9
votes
1answer
6k views

Convert audio file to FLAC with ffmpeg?

can I convert one of this format to compatible 16000.0 Sample Rate FLAC file? kAudioFormatLinearPCM = 'lpcm', kAudioFormatAppleIMA4 = 'ima4', kAudioFormatMPEG4AAC ...
9
votes
1answer
4k views

How to get length of video file from console?

Suppose we have video file some_video. How to get length of it from a shell script (with mplayer/transcode/gstreamer/vlc/ffmpeg/whatever)? VIDEO_LENGTH_IN_SECONDS=`ffmpeg .... -i some_video ... | ...
9
votes
1answer
790 views

converting a static file to a h264/mp4 stream produces sped up video

I'm building a NodeJS application that converts a static videofile to a streamable video which is being sent to a client (iPad or browser) on the fly (using the fluent-ffmpeg module). Everything is ...
8
votes
4answers
12k 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
8
votes
4answers
4k views

How to convert 1080@50i -> 720@50p using ffmpeg?

I really like 50fps video, but I cannot make ffmpeg convert it to 50fps for me. 720p resolution is absolutely fine with me, just need more FPS. 50i just looks much smoother in proper players (for ...
7
votes
1answer
11k 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 ...
7
votes
1answer
5k views

Explanation of x264 tune

Running this command ffmpeg -i a.mp4 -tune b c.mp4 reveals the possible tune values for x264 and in turn FFmpeg [libx264 @ 0000000002167100] Possible tunes: film animation grain stillimage ...
7
votes
3answers
14k 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?
7
votes
3answers
589 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
478 views

Compiling FFMPEG for ARM

I have a Linux ARM computer (BeagleBone Black). I am trying to do some camera streaming and need FFMPEG to do it. I have tried everything that I can think of (including following guides for compiling ...
7
votes
2answers
7k views

FFmpeg extract clip - stream frame rate differs from container frame rate (x264, aac)

Summary H.264 video seems to have a really high frame rate that requires a scaling factor to the applied to the duration of video that I'm trying to extract (900x lower). Body I'm trying to extract a ...
7
votes
1answer
2k views

FFMPEG - Non-monotonous DTS

When I use FFMPEG to convert a video from MP4 to M3U8, using the following command, ffmpeg -i op.mp4 -b:v 128k -flags -global_header -map 0:0 -map 0:1 -f segment -segment_time 4 -segment_list_size 0 ...
7
votes
1answer
267 views

How to convert .avi video that has 1 static image in the video (with sound) to mp4 video with ffmpeg to least possible size?

I've an .avi video (divx) that's at 25fps and it has mp3 audio at 64kbit/s. This video has just one image throughout the entire video. I'm trying to convert this video to mp4 but to make it as small ...
6
votes
3answers
28k views

How to install libmp3lame for ffmpeg

I already have ffMpeg running on my test server. I would want to convert all possible audio files to mp3. I get the error 'codec not found'. here's what i typed: /var/www/i/uploads$ sudo ...
6
votes
2answers
6k views

ffpmeg remove audio from video

How can I remove audio from a video using ffmpeg ?
6
votes
2answers
6k 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 ...
6
votes
1answer
4k 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 ...
6
votes
5answers
4k views

Join Audio and Image -> Output as Video using FFmpeg

I have 1 image (jpg) and 1 audio file (MP3) and I would like to output this as a video file (say AVI for example). Does anyone know how to use FFMPEG to join the two? I'd like to show the image for ...
6
votes
1answer
16k 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 ...
6
votes
2answers
2k views

How to encode audio with Opus codec?

The Opus audio codec looks like the best thing ever for compressing audio. It has recently become supported in the latest ffmpeg and VLC players. However, there is no documentation I can find on how ...
6
votes
3answers
9k views

How to use ffmpeg to add metadata to an AAC file without reencoding?

I'm using ffmpeg to extract just the audio stream from a video file: ffmpeg -i video.mp4 -vn -acodec copy audio.aac This produces a clean audio file but without any metadata. To add metadata, ...
6
votes
1answer
2k 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 ...
6
votes
3answers
12k views

How to strip audio streams from an MKV file?

I've been trying to remove unneeded audio streams from an MKV (Matroska) file. The reason why I want to do this is to avoid having to manually select the wanted stream in Windows Media Player. The ...
6
votes
2answers
6k views

Can FFMPEG capture from the screen in Windows?

I am trying to capture a certain region of the screen (actually its specifically a number of visible windows) on Windows XP with FFMPEG but I can only find options to capture from X11: ...