Questions tagged [ffmpeg]

Media tool with support for multiple codecs, filters, and containers. Include your actual command and the complete console output when asking questions involving FFmpeg tools. An easy way to do this is by adding -report to your command and pasting the contents of the logfile generated.

For help with CLI use only of ff* binaries - ffmpeg, ffprobe, ffplay. For help with API usage, post on Stack Overflow.

FFmpeg is a suite of media encoders and decoders with support for multiple codecs and containers. It is typically used in library form by a graphical tool, or via the command-line interface which offers scriptability and portability. FFmpeg includes the libavcodec and libavformat libraries, and the ffmpeg, ffprobe, and ffplay command-line tools.

More info

Installation

FFmpeg source code can be downloaded from the official homepage.

How to write a question for FFmpeg

  • Always install the latest version if possible.
  • Include the full command line input and output, not truncating anything.
  • Provide a sample input video if possible.

The ffmpeg-user mailing list and #ffmpeg IRC channel are also good places to ask for help.

Related Tags

7010 questions
534
votes
6 answers

Remove audio from video file with FFmpeg

How can I strip the audio track out of a video file with FFmpeg?
TeAmEr
  • 5,587
433
votes
8 answers

How to merge audio and video file in ffmpeg

I want to merge an audio file (.wav or .au format) with a video file (.mp4 format). Please suggest me how to achieve this. I want to merge these file to new .mp4 video file. An ffmpeg command would be very welcome.
Sandy
  • 4,889
291
votes
11 answers

How can I make ffmpeg be quieter/less verbose?

By default ffmpeg sends a whole lot of messages to stderr: when built, how it was built, codecs, etc, etc, etc. How can I make it quieter? I've tried -v 0 (and -v 10 since the documentation just coyly says Set the logging verbosity level. with no…
blahdiblah
  • 5,113
281
votes
3 answers

How to resize a video to make it smaller with FFmpeg

How do I resize a video to make it smaller with FFmpeg? (e.g. from 1024x576 to 720x480.)
Alan
  • 2,911
  • 2
  • 11
  • 6
234
votes
4 answers

How can I convert MP4 video to MP3 audio with FFmpeg?

I need to extract an MP3 audio track from an MP4 video with ffmpeg. I can do this for .flv -> mp3, but I don't know the command line parameters for mp4->mp3. For example, flv -> mp3: ffmpeg -i video.flv -acodec copy audio.mp3 What parameters should…
user916350
102
votes
8 answers

How can I rotate a video 180° with FFmpeg?

I have a video that was rotated 180° when recorded. Is it possible to correct this with FFmpeg?
Louis Waweru
  • 24,631
  • 40
  • 135
  • 202
97
votes
6 answers

How many threads does ffmpeg use by default?

I see that there's a -threads command line option in ffmpeg. What is the default value of this option?
Edward Dale
  • 1,249
61
votes
3 answers

What is -crf used for in FFmpeg?

When converting an array of JPEGs to a video file (Ogg format) I have been using the -crf option. What are the valid ranges for -crf? Currently I am using 23. I cannot find the bookmark I read to know what this flag does and I have spent some time…
60
votes
3 answers

Extracting wav from mp4 while preserving the highest possible quality

I went through the documentation and I can extract a wav file from an mp4 file with the command: ffmpeg -i my_video.mp4 output_audio.wav However, how can I control the quality of the wav file? (e.g. say I want to preserve the quality of the…
56
votes
4 answers

Would like to change audio codec, but keep video settings with ffmpeg

I have a video for which I'd like to convert the audio codec to AAC 320 kbps / 44.100 kHz. What would I use for ffmpeg switches such that all the video settings and codec remain the same, but only the audio codec and settings change? Here's my…
55
votes
6 answers

Correct aspect ratio without re-encoding video file

I have a video stream with the following properties: Stream #0:0: Video: mpeg4 (Advanced Simple Profile) (XVID / 0x44495658), yuv420p, 720x416 [SAR 1:1 DAR 45:26], 1908 kb/s, 25 fps, 25 tbr, 25 tbn, 25 tbc When I run it in VLC, I have to press "A"…
forthrin
  • 2,047
54
votes
4 answers

Clarification for ffmpeg input option with image files as input

I have some images and I'd like to make an animated gif with ffmpeg. The images have names as: 837_1.png 838_1.png ... I'm trying to unserstand the -i command line option of ffmpeg but I am crashing against some problems. If I don't specify…
nkint
  • 779
47
votes
2 answers

deprecated pixel format used, make sure you did set range correctly

Why am I getting this warning and how to fix it? Essentially, I want to convert a video to a jpg every 4th frame with the same resolution as original video. [jalal@goku vid2]$ ffmpeg -i debate_vid2.mov -r 0.25 images_%08d.jpg ffmpeg version 2.6.8…
37
votes
3 answers

Any downsides to always using the -movflags faststart parameter?

It seems many sites like YouTube suggest moov atom at the front of the file (Fast Start). ffmpeg does not make this a default behavior, but you can specify it with the -movflags faststart option. I'm wondering if there is any downside to always…
Sun
  • 6,318
36
votes
5 answers

Improve quality of ffmpeg created jpgs

I'm using ffmpeg to take a mjpeg feed from an IP camera and convert it into a series of still jpeg images. Here's the command I'm using: ffmpeg -i http://xxx:xxx@xx.xx.xx.xx/vid.mjpg -f image2 -vcodec mjpeg %05d.jpg Does anyone know a way to…
weotch
  • 1,003
1
2 3
79 80