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

51
votes
5answers
60k 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 ...
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 ...
34
votes
8answers
34k 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, ..., ...
33
votes
4answers
17k 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 ...
33
votes
2answers
55k 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 ...
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 ...
24
votes
1answer
2k views

Why are my MP3 files the same size, even when I change the bitrate with ffmpeg?

I converted an audio stream into 3 different settings using essentially the same format. They ended up being exactly the same size. Why is this? ffmpeg -i "Likoonl-Q1-All.mp4" -c:v copy -c:a ...
23
votes
4answers
20k 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 ...
23
votes
1answer
15k 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 ...
20
votes
1answer
21k 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 ...
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?
18
votes
8answers
32k 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 ...
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 . . . ...
18
votes
5answers
15k 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 ...
18
votes
4answers
7k 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. ...
17
votes
4answers
23k 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
11k 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 ...
17
votes
1answer
33k 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
2answers
27k 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 ...
15
votes
3answers
9k 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
3answers
16k views

Remove audio from video file with FFmpeg

How can I strip the audio track out of a video file with FFmpeg?
14
votes
4answers
15k 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?
13
votes
2answers
11k 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 ...
13
votes
4answers
31k 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 ...
12
votes
1answer
10k views

Converting video to WebM with ffmpeg/avconv

While trying to optimize the size of my home videos I converted some of them to WebM as a test, using Pitivi on Xubuntu. The size difference is significant. The resulting webm-file is only around 10% ...
12
votes
1answer
17k 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 ...
12
votes
2answers
24k 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 ...
11
votes
7answers
8k 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 ...
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 ...
11
votes
3answers
7k 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 ...
11
votes
1answer
4k 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 ...
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
10
votes
2answers
6k 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
2answers
29k 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 ...
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 ...
9
votes
2answers
7k 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
542 views

Why can't Quicktime play a movie file encoded by FFmpeg? [duplicate]

When I try to open a movie I just created with the command: ffmpeg -pattern_type glob -i '*.JPG' -s 640x480 movie.mp4 I get an error from QuickTime: The document “movie.mp4” could not be opened. ...
9
votes
2answers
7k 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: ...
9
votes
2answers
1k 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
3answers
9k views

How to generate an MP4 with H.265 codec using FFmpeg?

I want to encode a video file to H.265. The last version of ffmpeg should be support H.265 (Source). However, I could not find any information about the exact command. I do not know, which library I ...
8
votes
1answer
9k 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 ...
8
votes
2answers
8k views

FFmpeg drops frames when encoding a png image sequence into an x264 mp4 video

I'm trying to encode an image-sequence (frame0001.png, frame0002.png, ... , frame0160.png) into an x264 video using the following command: ffmpeg -i frame%04d.png -sameq -r 24 out.mp4 After ...
8
votes
3answers
21k 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?
8
votes
3answers
2k 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; ...
8
votes
4answers
6k 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 ...
8
votes
2answers
255 views

Cannot concatenate videos ffmpeg

I have a bitmap that I would like to concatenate to the front of many videos as a sort of title screen or disclaimer screen. I try to turn it into a video with the same attributes as the rest of the ...
8
votes
1answer
881 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 ...
8
votes
3answers
424 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 ...
8
votes
0answers
5k views

Streaming mp4 with ffmpeg

I need to create a feed that has two streams - webm and mp4 - so that it can be compatible on all HTML5 video players. The webm stream works perfectly. However, when trying to access the mp4 stream, ...
7
votes
4answers
33k 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 ...