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
65
votes
3 answers

How to dump raw RTSP stream to file?

Is it possible to dump a raw RTSP stream to file and then later decode the file to something playable? Currently I'm using FFmpeg to receive and decode the stream, saving it to an mp4 file. This works perfectly, but is CPU intensive, and will…
Felix
  • 3,783
  • 5
  • 34
  • 53
62
votes
3 answers

Can you "stream" images to ffmpeg to construct a video, instead of saving them to disk?

My work recently involves programmatically making videos. In python, the typical workflow looks something like this: import subprocess, Image, ImageDraw for i in range(frames_per_second * video_duration_seconds): img = createFrame(i) …
Brandon
  • 975
  • 1
  • 8
  • 19
61
votes
9 answers

How to create a WebM video file?

After looking around the web, I found no way to generate a WebM video. I see drivers for Windows and QuickTime, but no evidence that the most common utility FFmpeg is being supported. Is there any open source converter that produces WebM?
Marneau
  • 619
  • 1
  • 5
  • 3
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
  • 13,431
  • 9
  • 38
  • 55
61
votes
3 answers

ffmpeg video editing command in milliseconds timestamp

I am editing a video with ffmpeg where I have to keep in view the timestamp further deep from seconds to milliseconds. I know such command : ffmpeg -i a.ogg -ss 00:01:02 -to 00:01:03 -c copy x2.ogg. This uses seconds, but I want down to…
Harjit Singh
  • 905
  • 1
  • 8
  • 17
59
votes
2 answers

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,584
  • 10
  • 45
  • 70
59
votes
4 answers

How to output fragmented mp4 with ffmpeg?

ffmpeg -i infile.avi out.mp4 outputs non-fragmented MP4. How do I obtain fragmented mp4? Update A fragmented mp4 file is internally divided into several back-to-back chunks or MPEG-4 movie fragments. Each chunk has its own moof atom - so there are…
S B
  • 8,134
  • 10
  • 54
  • 108
59
votes
2 answers

Playing a custom avi data stream using QtMultimedia

I need to play back a custom AVI file that contains a classic video stream, an audio stream but also a custom data stream. The custom stream contains data that is visualized by some custom widgets; those widgets only need that each custom frame is…
sbabbi
  • 11,070
  • 2
  • 29
  • 57
59
votes
5 answers

How to minimize the delay in a live streaming with ffmpeg

i have a problem. I would to do a live streaming with ffmpeg from my webcam. I launch the ffserver and it works. From another terminal I launch ffmpeg to stream with this command and it works: sudo ffmpeg -re -f video4linux2 -i /dev/video0 -fflags…
Pasquale C.
  • 619
  • 1
  • 9
  • 7
59
votes
6 answers

How to split a video using FFMPEG so that each chunk starts with a key frame?

We need to split a large live WMV video feed in small chunks all of the same size. We made a script that works fine doing this, except for one thing: the video chunks don't start with a key frame, so when playing most video chunks they don't display…
sboisse
  • 4,860
  • 3
  • 37
  • 48
59
votes
5 answers

Can I dynamically call a LGPL/GPL software in my closed-source application?

I want to use a tool (ffmpeg) that is under GNU Lesser General Public License, version 2.1 GNU General Public License (GPL) version 2 for some components. To do so, I only call it in my software as such: System.Diagnostics.Process p = new…
marcgg
  • 65,020
  • 52
  • 178
  • 231
58
votes
1 answer

Transcoding fMP4 to HLS while writing on iOS using FFmpeg

TL;DR I want to convert fMP4 fragments to TS segments (for HLS) as the fragments are being written using FFmpeg on an iOS device. Why? I'm trying to achieve live uploading on iOS while maintaining a seamless, HD copy locally. What I've…
bclymer
  • 6,679
  • 2
  • 27
  • 36
56
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
  • 563
  • 1
  • 5
  • 4
56
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 are stored in Amazon SQS, but it's irrelevant to my question) I'm facing a choice,…
Beier
  • 3,127
  • 10
  • 28
  • 24
55
votes
6 answers

ffmpeg - whatsapp: video format not supported

I have two videos (.mp4) files. One uploads to whatsapp and another does not. Using ffmpeg I checked their properties: a) Properties of video which uploads: Duration: 00:00:56.45, start: 0.148000, bitrate: 1404 kb/s Stream #0:0(und): Video:…
Santhosh
  • 9,965
  • 20
  • 103
  • 243