Questions tagged [ffmpeg]

Only questions about programmatic use of the FFmpeg libraries, API, or tools are on topic. Questions about interactive use of the command line tool should be asked on Super User or Video Production. FFmpeg is a free, open source project that produces libraries and programs for handling multimedia data.

Questions about interactive use of the ffmpeg command line tool are off-topic. Please ask them on the Super User or Video Production sites.

Questions here should relate to automating or integrating FFmpeg, or usage of the libav* libraries or API. See also: , , .

FFmpeg is a free, open source project that produces libraries and programs for handling multimedia data. The most notable components are:

  • libavcodec – an audio/video/subtitle codec library used by many other projects.
  • libavformat – an audio/video/subtitle container (de)muxing library.
  • ffmpeg – a command line program for transcoding multimedia files.
  • ffprobe – a command line program for viewing detailed information about multimedia files.
  • ffplay - a command line program for playing media files. It is mostly used as a testbed for the various FFmpeg APIs.

FFmpeg is published under the GNU Lesser General Public License 2.1+ or GNU General Public License 2+ (depending on which options are enabled).

See the FFmpeg documentation and FFmpeg Wiki for additional information.

22667 questions
52
votes
3 answers

ffmpeg unable to find encoder libvpx

when i run ffmpeg -y -i test.mov -threads 8 -f webm -aspect 16:9 -vcodec libvpx -deinterlace -g 120 -level 216 -profile 0 -qmax 42 -qmin 10 -rc_buf_aggressivity 0.95 -vb 2M -acodec libvorbis -aq 90 -ac 2 OUTPUT_FILE.webm it returns an error saying…
Wiz
  • 4,165
  • 7
  • 27
  • 50
51
votes
8 answers

Capture Windows screen with ffmpeg

The ffmpeg is cross-platform and very powerful software to handle video/audio or to stream it. On Linux ffmpeg can capture X11 screen with a command below: ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpeg But is it possible to grab Windows Desktop…
kamae
  • 1,576
  • 1
  • 12
  • 19
51
votes
1 answer

How to use hardware acceleration with ffmpeg

I need to have ffmpeg decode my video(e.g. h264) using hardware acceleration. I'm using the usual way of decoding frames: read packet -> decode frame. And I'd like to have ffmpeg speed up decoding. So I've built it with --enable-vaapi and…
ixSci
  • 10,620
  • 5
  • 35
  • 66
51
votes
1 answer

Fastest way to extract a specific frame from a video (PHP/ffmpeg/anything)

I have a web page, which (among other things) needs to extract a specific frame from a user-uploaded video. The user seeks to a particular part of a .mp4 in the player, then clicks a button, and an ajax call gets fired off to a php script which…
DanM
  • 6,727
  • 11
  • 48
  • 83
50
votes
2 answers

How to generate gif from avi using ffmpeg?

I'm trying to extract a part of a video into an animated gif using the following command: ffmpeg -i video.avi -t 5 out.gif It generates an animated gif but the quality is insane. However when I generate gif image using: ffmpeg -i video.avi -t 10…
Marconi
  • 3,381
  • 2
  • 42
  • 70
49
votes
4 answers

Android: How to configure FFMPEG latest version in android studio?

I want to configure FFMPEG in android studio but i cant get any document or link for that. Github on many FFMPEG lib available for android but that all are with old version. And how to run command in android? and i want to know after configure…
Ravi Vaghela
  • 3,316
  • 2
  • 19
  • 44
49
votes
4 answers

Use ffmpeg to resize image

Is it possible to resize an image using FFMPEG? I have this so far: ffmpeg. -i 1.jpg -vf scale=360:240 > 2.jpg I get the error message that 'At least one output file must be specified' Is it possible?
Andrew Simpson
  • 6,145
  • 9
  • 59
  • 153
49
votes
4 answers

ffmpeg for a android (using tutorial: "ffmpeg and Android.mk")

I am trying to compile ffmpeg for a android. I have found several posts on this theme but non of these seems to work. If tried to build ffmpeg like it is posted on [1]. Did anybody successfully compile ffmpeg using theses tutorial? I am not sure how…
Matthias
  • 491
  • 1
  • 5
  • 3
49
votes
4 answers

How can we transcode live rtmp stream to live hls stream using ffmpeg?

I am trying to convert a live rtmp stream to hls stream on real time. I got some idea after reading http://sonnati.wordpress.com/2011/08/30/ffmpeg-%E2%80%93-the-swiss-army-knife-of-internet-streaming-%E2%80%93-part-iv/ i am able to convert the live…
Kiran
  • 803
  • 1
  • 10
  • 21
49
votes
6 answers

ffmpeg convert mov file to mp4 for HTML5 video tag IE9

I looked everywhere here and on google - there is no valid command that works for IE9. some how IE9 is missing something. All that I tried worked everywhere else: chrome,safari,mobile device etc... I want one command that will convert it and I can…
Adidi
  • 4,821
  • 3
  • 19
  • 28
49
votes
8 answers

use java-ffmpeg wrapper, or simply use java runtime to execute ffmpeg?

I'm pretty new to Java, need to write a program that listen to video conversion instructions and convert the video once an new instruction arrives (instructions is stored in Amazon SQS, but it's irrelevant to my question) I'm facing a choice, either…
Beier
  • 2,967
  • 10
  • 25
  • 23
48
votes
4 answers

How to get video duration, dimension and size in PHP?

I want to know how to get the duration, dimension and size of uploaded video file in PHP. The file can be in any video format.
Chandan
  • 483
  • 1
  • 5
  • 4
48
votes
4 answers

How to extract the 1st frame and restore as an image with ffmpeg?

Anyone knows the trick? And how to install ffmpeg ? yum install mpeg only returns this: ======================================================================================== Matched: mpeg…
lex
  • 711
  • 2
  • 8
  • 13
48
votes
2 answers

How to crop a mp3 from x to x+n using ffmpeg?

Following this question I decided to use ffmpeg to crop MP3s. On another question I found this way of doing it: ffmpeg -t 30 -acodec copy -i inputfile.mp3 outputfile.mp3 The problem is that I don't want to crop the first 30 seconds, I want to crop…
marcgg
  • 60,067
  • 49
  • 172
  • 221
47
votes
1 answer

FFmpeg output file format with no extension

I'm developing a system which needs to store videos in the form: /path/to/video/ So I do not have an output extension. I'm using ffmpeg to convert those videos, but it seems that it uses output file extension to determine the…
Simone Margaritelli
  • 4,234
  • 8
  • 43
  • 69