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
74
votes
6 answers

Generating movie from python without saving individual frames to files

I would like to create an h264 or divx movie from frames that I generate in a python script in matplotlib. There are about 100k frames in this movie. In examples on the web [eg. 1], I have only seen the method of saving each frame as a png and then…
Paul
  • 1,610
  • 2
  • 14
  • 20
72
votes
2 answers

Can ffmpeg convert audio to raw PCM? If so, how?

I'm currently using ffmpeg to convert FLV/Speex to WAV/pcm_s16le, successfully. However, I now need the output format to be RAW, that is, PCM signed 16-bit little endian, without the WAV header. I tried the following: ffmpeg -y -i input.flv -vn…
David van Geest
  • 1,769
  • 1
  • 18
  • 18
72
votes
5 answers

webm to mp4 conversion using ffmpeg

When I try to convert a webm file to mp4 the output is very very choppy and it appears as if many frames have been dropped by ffmpeg I used the following commands to convert ffmpeg -i movie.webm movie.mp4 ffmpeg -i movie.webm -vcodec libx264…
Pavan K
  • 3,068
  • 5
  • 31
  • 62
71
votes
7 answers

How to overlay/downmix two audio files using ffmpeg

Can I overlay/downmix two audio mp3 files into one mp3 output file using ffmpeg?
Faisal
  • 1,039
  • 1
  • 9
  • 15
70
votes
9 answers

How can I get the resolution (width and height) for a video file from a linux command line?

I've been digging through the mplayer/mencoder and ffmpeg documentation and I can't seem to come up with anything. I'm not especially picky as to the output format as I can use a regular expression to pull it out, I just can't seem to get the data…
Jeremy Logan
  • 45,614
  • 37
  • 119
  • 143
69
votes
2 answers

ffmpeg.c what are pts and dts ? what does this code block do in ffmpeg.c?

In simple terms what are pts and dts values? Why are they important while transcoding [decode-encode] videos ? What does this code bit do in ffmpeg.c , what is its purpose? 01562 ist->next_pts = ist->pts = picture.best_effort_timestamp; 01563 …
Aditya P
  • 1,664
  • 4
  • 26
  • 38
69
votes
6 answers

Using FFmpeg in .net?

So I know its a fairly big challenge but I want to write a basic movie player/converter in c# using the FFmpeg library. However, the first obstacle I need to overcome is wrapping the FFmpeg library in c#. I've downloaded ffmpeg but couldn't compile…
daniel
  • 699
  • 1
  • 6
  • 4
68
votes
7 answers

How to recompile with -fPIC

I was trying to reinstall my ffmpeg, following this guide, on my ARM Ubuntu machine. Unfortunately, when I compile a program which uses this lib I get the following failure: /usr/bin/ld: /usr/local/lib/libavcodec.a(amrnbdec.o): relocation…
user1455085
  • 855
  • 1
  • 6
  • 10
67
votes
6 answers

Using ffmpeg to change framerate

I am trying to convert a video clip (MP4, yuv420p) from 30 fps to 24 fps. The number of frames is correct so my output should change from 20 minutes at 30fps to 25 minutes at 24fps. Everything else should remain the same. Try as I might everything I…
J Brand
  • 671
  • 1
  • 5
  • 4
66
votes
6 answers

Is /usr/local/lib searched for shared libraries?

Is /usr/local/lib searched for shared libraries ? I have this error: [Leo@chessman ~]$ whereis ffmpeg ffmpeg: /usr/local/bin/ffmpeg [Leo@chessman ~]$ ffmpeg ffmpeg: error while loading shared libraries: libavcore.so.0: cannot open shared object…
Leo Izen
  • 4,031
  • 7
  • 32
  • 54
62
votes
7 answers

Image sequence to video stream?

Like many people already seem to have (there are several threads on this subject here) I am looking for ways to create video from a sequence of images. I want to implement my functionality in C#! Here is what I wan't to do: /*Pseudo code*/ void…
Hauns TM
  • 1,688
  • 1
  • 20
  • 35
62
votes
2 answers

Applying multiple filters at once with FFMPEG

I have the need to apply fadein and overlay filters to a video. Is it possible to apply 2 filters at once? I got: ffmpeg -i input.mpg -vf "movie=watermark.png [logo]; [in][logo] overlay=W-w-10:H-h-10 [out]" output.mpg I'm trying to add…
Parziphal
  • 4,604
  • 3
  • 28
  • 29
62
votes
6 answers

FFMPEG: Too many packets buffered for output stream 0:1

I want to add a logo to a video using FFMPEG. I encountered this error: "Too many packets buffered for output stream 0:1.", "Conversion Failed.". I tried with diffent pictures and videos, always got the same error. Google didn't help much either. I…
Der Micha
  • 663
  • 1
  • 5
  • 8
62
votes
3 answers

ffmpeg clip audio interval with starting and end time

I am trying to clip an MP3 between two starting points, like starting at 10 seconds and ending at 16 seconds (time interval of 6 seconds). I am using this command: ffmpeg -ss 10 -i input.mp3 -t 6 output.mp3 The resulting output.mp3 contains the 6…
gruuuvy
  • 2,118
  • 4
  • 26
  • 41
61
votes
1 answer

ffmpeg settings for converting to mp4 and ogg for HTML5 video

Despite all the hype, in reality the HTML5 video tag has a bit of a problem. In order to use it and for it to be cross browser compatible, you have to include more than one format of the video. To target all supported browsers these formats are mp4…
betamax
  • 11,591
  • 9
  • 34
  • 55