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
100
votes
8 answers

Convert .flac to .mp3 with ffmpeg, keeping all metadata

How can I convert .flac to .mp3 with ffmpeg, keeping all metadata (that is converting Vorbis comment in .flac files to ID3v2 metadata of .mp3)?
Vito Gentile
  • 11,015
  • 8
  • 52
  • 81
94
votes
4 answers

Using ffmpeg to encode a high quality video

I have a set of video frames saved as images in a directory, and I'm trying to encode these to a good quality video, however every setting and every format I try produces very noticeable artifacts. The basic command is this: ffmpeg -r 25 -i %4d.png…
CakeMaster
  • 1,627
  • 3
  • 15
  • 15
92
votes
12 answers

Solid FFmpeg wrapper for C#/.NET

I have been searching the web for some time for a solid FFmpeg wrapper for C#/.NET. But I have yet to come up with something useful. I have found the following three projects, but all of them apears to be dead in early alpha…
Jacob Poul Richardt
  • 3,085
  • 1
  • 24
  • 29
91
votes
3 answers

FFMPEG mux video and audio (from another video) - mapping issue

I would like to place the audio from a video to another video without an audio (in one command): ffmpeg.exe -i video1_noAudio.mov -i video2_wAudio.mov -vcodec copy -acodec copy video1_audioFromVideo2.mov I guess "-map" is the correct way to do it…
Mark
  • 1,350
  • 1
  • 11
  • 20
90
votes
11 answers

OCI runtime exec failed: exec failed: (...) executable file not found in $PATH": unknown

I have dockerized an app which has ffmpeg installed in it via libav-tools. The app launches without problem, yet the problem occured when fluent-ffmpeg npm module tried to execute ffmpeg command, which was not found. When I wanted to check the…
Uğur Kaya
  • 1,207
  • 1
  • 9
  • 22
89
votes
2 answers

FFMPEG mp4 from http live streaming m3u8 file?

How Can I extract mp4 from http live streaming m3u8 file? I Tried this command below: ffmpeg -i {input file} -f rawvideo -bsf h264_mp4toannexb -vcodec copy out.mp4 I took this error: [NULL @ 0000000002f07060] Packet header is not contained in…
thiago.adriano26
  • 1,243
  • 1
  • 13
  • 17
83
votes
5 answers

Rotate mp4 videos without re-encoding

I'm looking for a way to rotate videos shot with my Nexus 4 on my Debian Wheezy sytem. The videos are shot in portrait mode and I would like to rotate them to landscape mode. Preferably the rotation is command-line driven. I have found several…
stedes
  • 1,221
  • 2
  • 12
  • 16
81
votes
13 answers

How to extract duration time from ffmpeg output?

To get a lot of information about a media file one can do ffmpeg -i where it will output a lot of lines, one in particular Duration: 00:08:07.98, start: 0.000000, bitrate: 2080 kb/s I would like to output only 00:08:07.98, so I…
Louise
  • 5,275
  • 12
  • 33
  • 34
81
votes
1 answer

Text on video ffmpeg

How can I add text overlay on my video in ffmpeg? i.e. given a video "video1.flv", how can I add "StackOverflow" text during the whole video, positioned in the middle of the screen, with white text and a border?
Jesper Madsen
  • 821
  • 1
  • 8
  • 5
79
votes
6 answers

Retrieving and Saving media metadata using FFmpeg

I want to read the metadata in media files and then save that metadata in a text/xml file, so that I can later insert that data in my database. I would prefer to use ffmpeg. Also is the same thing possible with MediaInfo?? I know I can get the…
Rahul Patwa
  • 1,829
  • 3
  • 16
  • 17
78
votes
1 answer

How to add transparent watermark in center of a video with ffmpeg?

I am currently using these commands: Top left corner ffmpeg –i inputvideo.avi -vf "movie=watermarklogo.png [watermark]; [in][watermark] overlay=10:10 [out]" outputvideo.flv Top right corner ffmpeg –i inputvideo.avi -vf "movie=watermarklogo.png…
mirza
  • 4,970
  • 7
  • 39
  • 70
76
votes
3 answers

Unknown encoder 'libx264'

I installed ffmpeg 0.8.9 on ubuntu11 by ./configure --enable-gpl --enable-nonfree --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libx264 When I run it ffmpeg -y -i test.mp4 -f mpegts -acodec libmp3lame -ar 48000 -ab 64k -vcodec…
why
  • 21,267
  • 27
  • 91
  • 134
76
votes
14 answers

Download TS files from video stream

Videos on most sites make use of progressive downloading, which means that the video is downloaded to my computer, and easy to trace. There are lots of extensions out there to do this, and even in the dev-tools this is easily done. On certain…
Nicky Smits
  • 2,406
  • 3
  • 17
  • 23
75
votes
5 answers

"The encoder 'aac' is experimental but experimental codecs are not enabled"

While converting flv to mp4 conversion using FFMPEG it's showing following error [aac @ 0x2b4b640] The encoder 'aac' is experimental but experimental codecs are not enabled, add '-strict -2' if you want to use it.
Sandeep Nambiar
  • 1,500
  • 2
  • 17
  • 34
74
votes
12 answers

Can ffmpeg show a progress bar?

I am converting a .avi file to .flv file using ffmpeg. As it takes a long time to convert a file I would like to display a progress bar. Can someone please guide me on how to go about the same. I know that ffmpeg somehow has to output the progress…
Pawan Rao
  • 1,055
  • 2
  • 10
  • 11