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

38
votes
4answers
49k 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 ...
32
votes
8answers
25k 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, ..., ...
31
votes
1answer
11k 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 ...
29
votes
3answers
45k 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 ...
23
votes
4answers
10k 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 ...
22
votes
1answer
14k 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 ...
22
votes
2answers
6k 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 ...
19
votes
1answer
8k 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
17k 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 ...
18
votes
8answers
6k 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
4answers
17k 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 ...
17
votes
1answer
30k 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
5answers
11k 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 ...
16
votes
4answers
6k 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. ...
15
votes
2answers
23k 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
8answers
26k 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 ...
15
votes
4answers
18k 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?
15
votes
3answers
9k 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 ...
15
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 ...
11
votes
7answers
7k 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
8k 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 ...
11
votes
1answer
13k 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 ...
11
votes
2answers
18k 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
4answers
28k 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 ...
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 ...
10
votes
2answers
8k 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
3answers
10k 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?
9
votes
2answers
10k views

Remove audio from video file with FFmpeg

How can I strip the audio track out of a video file with FFmpeg?
9
votes
4answers
14k 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
2answers
5k 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
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
918 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
1answer
7k 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% ...
8
votes
1answer
13k 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 ...
8
votes
1answer
6k 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
3answers
17k 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
4answers
5k 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
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: ...
8
votes
1answer
645 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
1answer
152 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
0answers
3k 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 ...
8
votes
1answer
4k 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, ...
8
votes
3answers
342 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 ...
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 ...
7
votes
3answers
12k 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 ...
7
votes
3answers
1k 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
1k views

When spliting MP4s with ffmpeg how do I include metadata?

I have a few MP4s that i want to upload to my flickr account but they have a maximum size of 500mb as mine is only about 550 i was planing to simply split them in half then upload them, but i want to ...
7
votes
2answers
8k 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 ...
6
votes
3answers
30k 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
1answer
21k 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 ...