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

Vertically or horizontally stack (mosaic) several videos using ffmpeg?

I have two videos of the same exact length, and I would like to use ffmpeg to stack them into one video file. How can I do this?
Joseph Turian
  • 15,430
  • 14
  • 47
  • 62
76
votes
4 answers

GPU-accelerated video processing with ffmpeg

I want to use ffmpeg to accelerate video encode and decode with an NVIDIA GPU. From NVIDIA's website: NVIDIA GPUs contain one or more hardware-based decoder and encoder(s) (separate from the CUDA cores) which provides fully-accelerated…
Wang Hai
  • 791
  • 1
  • 6
  • 7
76
votes
5 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
  • 769
  • 1
  • 6
  • 4
74
votes
9 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
  • 915
  • 1
  • 6
  • 10
72
votes
10 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
  • 3,281
  • 5
  • 20
  • 12
72
votes
4 answers

How to remove one track from video file using ffmpeg?

How to remove only one track (not all) from video file container (.vob or .mkv) using ffmpeg? I know I can just copy video (-c:v copy -an) and specific audio track from container into two separated files and then join them. But is there an easier…
user25
  • 2,873
  • 2
  • 30
  • 66
71
votes
5 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,986
  • 5
  • 28
  • 35
70
votes
9 answers

Error: Unable to extract uploader id - Youtube, Discord.py

I have a veary powerfull bot in discord (discord.py, PYTHON) and it can play music in voice channels. It gets the music from youtube (youtube_dl). It worked perfectly before but now it dosn't wanna work with any video. I tried updataing youtube_dl…
nikita goncharov
  • 708
  • 1
  • 2
  • 13
69
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,909
  • 2
  • 22
  • 38
68
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,165
  • 7
  • 37
  • 56
67
votes
4 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
  • 873
  • 1
  • 8
  • 12
67
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,028
  • 4
  • 31
  • 52
66
votes
8 answers

Capture Windows screen with ffmpeg

The ffmpeg is cross-platform and very powerful software to handle video/audio or to stream it. On Linux ffmpeg can capture X11 screen with a command below: ffmpeg -f x11grab -r 25 -s cif -i :0.0 out.mpeg But is it possible to grab Windows Desktop…
kamae
  • 1,825
  • 1
  • 16
  • 21
66
votes
4 answers

How to determine video codec of a file with FFmpeg

I often have problems reading AVI files with my TV's DVD player if they are not DivX or Xvid (e.g., DX50 is not readable). I'd like to make a fast script to determine the video codec of these files before burning them to CD-ROM or DVD. The following…
GerryMulligan
  • 661
  • 1
  • 5
  • 3
65
votes
11 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
  • 4,679
  • 6
  • 28
  • 30