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.

26084 questions
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
2 answers

Unknown encoder 'libfaac'

I'm using carrierwave-video to upload video with my ruby on rails app. But I have this problem when try encode the video: Unknown encoder 'libfaac' Errors: no output file created. I have tried with: sudo apt-get install libfaac-dev but I get the…
hyperrjas
  • 10,666
  • 25
  • 99
  • 198
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
  • 5,097
  • 4
  • 23
  • 30
48
votes
11 answers

Is there an elegant way to split a file by chapter using ffmpeg?

In this page, Albert Armea share a code to split videos by chapter using ffmpeg. The code is straight forward, but not quite good-looking. ffmpeg -i "$SOURCE.$EXT" 2>&1 | grep Chapter | sed -E "s/ *Chapter #([0-9]+\.[0-9]+): start ([0-9]+\.[0-9]+),…
Kattern
  • 2,949
  • 5
  • 20
  • 28
48
votes
5 answers

How to add album art with ffmpeg?

I've been stuck in adding album art to mp3 files. I've already researched and Googled this issue but haven't found a solution yet. The ffmpeg documentation recommends this script to add image (album art) to mp3: ffmpeg -i input.mp3 -i cover.png -c…
Adi Ricky k
  • 481
  • 1
  • 4
  • 3
48
votes
2 answers

Encoding a readable movie by QuickTime using FFMPEG

I'm trying to encode an image sequence using the following command: ffmpeg.exe -i %d.png -f mp4 -vcodec h264 test.mp4 However, QuickTime failed to open this file or sometimes play a black movie, while this movie plays great in VLC player. Any…
itamarb
  • 2,559
  • 3
  • 29
  • 35
47
votes
5 answers

FFmpeg not copying all audio streams

I'm having trouble getting ffmpeg to copy all audio streams from a .mp4 file. After hours of searching online, it appears this should copy all streams (as shown in example 4 here): ffmpeg -i in.mp4 -map 0 -c copy out.mp4 in.mp4 contains 3…
Dotl
  • 1,406
  • 1
  • 13
  • 16
47
votes
3 answers

Convert mp3 -> Video with static image ( ffmpeg/libav & BASH )

Some years ago I used the following bash script to get a video out of mp3's and one image (so the image in the video was freezed over the length of the mp3), which worked out fine. i=0; for file in *.mp3; do i=$((i+1)); ffmpeg -loop 1 -shortest -y…
Max
  • 1,011
  • 1
  • 13
  • 20
47
votes
3 answers

What is the difference between M4A and AAC Audio Files?

Is there any difference between M4A audio files and AAC audio files or are they exactly the same thing but with a different file extension?
alexandertr
  • 943
  • 1
  • 9
  • 18
46
votes
1 answer

Convert image sequence to lossless movie

I have a sequence of images in TIF format, and I would like to create a movie at a fixed FPS (say 10 images per second) and that is lossless. Is there an easy way to do that? I've been trying with convert from Imagemagick, and ffmpeg, but I just…
astrofrog
  • 32,883
  • 32
  • 90
  • 131
46
votes
3 answers

How can I limit FFMpeg CPU usage?

I am calling FFMpeg inside a C# Windows Forms application. Since it uses so much CPU (always above 90%), none of my threads can continue working. Is there a way to limit this CPU usage? I've tried to set Process.PriorityClass to…
Mert Sevinc
  • 929
  • 1
  • 8
  • 25
46
votes
3 answers

How to convert stereo sound to mono with FFmpeg?

I use the FFmpeg library for a personnal project and I need help about one thing. I have a music file in stereo sound and I want to convert this stereo sound to mono sound ? Is it possible with this library ? Is there a function inside to do this…
Meugiwara
  • 599
  • 1
  • 7
  • 13
46
votes
14 answers

Screenshot of the Nexus One from adb?

My goal is to be able to type a one word command and get a screenshot from a rooted Nexus One attached by USB. So far, I can get the framebuffer which I believe is a 32bit xRGB888 raw image by pulling it like this: adb pull /dev/graphics/fb0…
Marcus
  • 2,021
  • 2
  • 21
  • 20
46
votes
1 answer

MAC's "say" command to MP3

I want to read a very long text with the SAY mac's command (say -f file.txt), and to record the output to file.mp3. I thought about using ffmpeg to record all of it, but then i'll need to wait for all the reading process to complete.. I don't really…
Oussama L.
  • 1,842
  • 6
  • 25
  • 31
45
votes
3 answers

How can you only extract 30 seconds of audio using ffmpeg

I am using ffmpeg for audio conversion. I am using this command: ffmpeg -i file.mp3 file.wav This works fine. However I only want to my output file to contain maximum 1 minute of audio. How can I do that using ffmpeg?
Jaggu
  • 6,298
  • 16
  • 58
  • 96