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
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
  • 10,402
  • 2
  • 24
  • 51
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,260
  • 2
  • 23
  • 34
58
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
  • 2,817
  • 5
  • 29
  • 45
57
votes
5 answers

ffmpeg usage to encode a video to H264 codec format

I have a *.mp4 video file(MPEG4 video codec) and I am trying to convert this to a H264 video codec format(raw h.264 format) using ffmpeg on Linux(Version - FFmpeg version SVN-r0.5.1-4:0.5.1-1ubuntu1, Copyright (c) 2000-2009 Fabrice Bellard,) using…
goldenmean
  • 16,908
  • 50
  • 144
  • 206
56
votes
1 answer

What is video timescale, timebase, or timestamp in ffmpeg?

There does not seem to be any explanation online as to what these are. People talk about them a lot. I just want to know what they are and why they are significant. Using -video_track_timescale, how would I determine a number for it? Is it random?…
Please Help
  • 659
  • 1
  • 7
  • 11
56
votes
3 answers

Remove sequentially duplicate frames when using FFmpeg

Is there any way to detect duplicate frames within the video using ffmpeg? I tried -vf flag with select=gt(scene\,0.xxx) for scene change. But, it did not work for my case.
metlira
  • 743
  • 1
  • 6
  • 11
55
votes
10 answers

ffmpeg: Combine/merge multiple mp4 videos not working, output only contains the first video

Here is the command I am using to combine multiple videos: ffmpeg -i 75_540_38HQ2.mp4 -i 76_70_20.mp4 -i 76_173_80.mp4 -i 81_186_35.mp4 -vcodec copy -acodec copy Mux1.mp4 The resulting Mux1.mp4 does not contain all videos. Only the first video…
dtbaker
  • 3,267
  • 4
  • 23
  • 29
55
votes
4 answers

adding silent audio in ffmpeg

I'm trying to use ffmpeg to add a silent audio track to a MOV file. I created a silent audio track longer than the video, and intend to use the -shortest option with ffmpeg. Using SoX v14.3.1, I run this to generate a wav file: sox -n -r 44100 -b…
jon
  • 5,300
  • 4
  • 24
  • 34
54
votes
9 answers

How to create a webm video file?

After looking over the web project I see no evidence of a 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…
Marneau
  • 549
  • 1
  • 4
  • 3
54
votes
4 answers

Using ffmpeg to get video info - why do I need to specify an output file?

I'm using ffmpeg to get info about a video file and I don't want to save the info into a file. ffmpeg is returning all the video info, but it's returning as an error because I'm not specifying an output file. The command I'm using is: ffmpeg -i…
Redtopia
  • 4,036
  • 6
  • 43
  • 65
53
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
  • 7,463
  • 9
  • 49
  • 101
53
votes
8 answers

Maintaining aspect ratio with FFmpeg

I need to convert a bunch of video files using FFmpeg. I run a Bash file that converts all the files nicely, however there is a problem if a file converted is not in 16:9 format. As I am fixing the size of the screen to -s 720x400, if the aspect…
0-alpha
  • 2,421
  • 4
  • 17
  • 12
53
votes
3 answers

FFMPEG- Convert video to images

how can i convert a video to images using ffmpeg? Example am having a video with total duration 60 seconds. I want images between different set of duration like between 2-6 seconds, then between 15-24 seconds and so on. Is that possible using…
hack
  • 923
  • 1
  • 8
  • 17
53
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
  • 60,067
  • 49
  • 172
  • 221
52
votes
2 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
  • 855
  • 1
  • 8
  • 17