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.

Filter by
Sorted by
Tagged with
15 votes
1 answer
52k views

ffmpeg: yuv420p pixel format missing?

Often when I search online for ffmpeg advice, I find the answer involves using the -pix_fmt yuv420p (or I think also yuv720p) argument. Example: What ffmpeg command line produces video more compatible ...
Jimi-James's user avatar
15 votes
2 answers
37k views

Slicing video file into several segments

I am currently using ffmpeg to slice video files. I automated the process through a script called ffmpeg_split.sh. Although this very slow it is efficient in splitting videos into equivalent settings. ...
Code_Ed_Student's user avatar
15 votes
2 answers
7k views

What is an efficient way to do a video crossfade with FFmpeg?

Doing a crossfade between two pieces of video content is actually quite complicated in FFmpeg. There is no “crossfade” filter like there is for audio. What’s an efficient way to do it?
Mark Gerolimatos's user avatar
15 votes
5 answers
58k views

Convert MKV with DTS sound to MP4 video with AAC or AC3 audio

I've got a 4.3 GB 720p movie and want to convert this MKV with DTS sound to MP4 video with AAC or AC3 audio. I sometimes get: ffmpeg: unrecognized option '-c:v' …and: aac unrecognized ¬and other ...
dale's user avatar
  • 259
15 votes
1 answer
3k views

Why isn't ffmpeg making this video shorter?

I'm trying to double the speed of a video. I use the commands: ffmpeg -i output.mp4 -filter:v "setpts=0.5*PTS" output2.mp4 and ffmpeg -i output.mp4 -vf "setpts=0.5*PTS" output3....
Joe's user avatar
  • 3,450
15 votes
2 answers
23k views

Can ImageMagick make thumbnails from video?

I'm trying to extract thumbnails from video via ImageMagick. I found some samples from their official site, but it makes GIF, not PNG. I want a solid thumbnail though. Can it create the same output ...
Juneyoung Oh's user avatar
15 votes
10 answers
118k views

No such file or directory in FFmpeg

I am attempting to use FFmpeg to extract audio from a mp4 and I keep running into this error: CFileffmpegvideo.mp4: No such file or directory exist. I am in command prompt (in Windows 7) and have ...
L84's user avatar
  • 3,871
15 votes
2 answers
29k views

Import FFmpeg into Audacity

I'm trying to import FFmpeg into Audacity (so I can encode AAC audio) But the latest FFmpeg Windows build doesn't include the avformat-55.dll file I need. Where can I find this file, or is it not ...
Ketho's user avatar
  • 440
15 votes
1 answer
10k views

ffmpeg: isolate one audio channel

How can I use ffmpeg to isolate one channel from an audio file? I have a stereo audio file, and I need the output to be the contents of the right channel in a mono audio file.
stephenwade's user avatar
15 votes
3 answers
24k views

Lossless VOB conversion with ffmpeg

Is there a way to convert a VOB to another video format using ffmpeg without sacrificing audio or video quality?
tony_sid's user avatar
  • 14.3k
15 votes
1 answer
56k views

Variable bit rates with "-vb" and "minrate"/"maxrate" settings in FFmpeg

For rendering, the time it takes is very different. -b 3500K -minrate 0K -maxrate 8000K takes 1hr 17min vb=3000k takes 2.5 hours What is vb 3000k and how is it different from -b 3500K -minrate 0K -...
Scott Downey's user avatar
15 votes
2 answers
98k views

Using ffmpeg to encode a raw video to H.264 format

On a Ubuntu 10.04, I am trying to encode a raw video (YUV format) to a H.264 encoded video using below ffmpeg commands: ffmpeg -i input.mp4 output.h264 but I get an error saying Unsupported ...
goldenmean's user avatar
  • 2,487
15 votes
3 answers
17k views

How to concatenate two flv files?

I want to concatenate two flv files(downloaded from Youtube.com) by Linux command line tools. The ffmpeg tutorial is too complicated, so I tried the mencode tutorial. But I get a empty output. I don't ...
kev's user avatar
  • 12.7k
15 votes
1 answer
11k views

FFmpeg -ss -t (seeking) output is not accurate, any workarounds? [duplicate]

My mission is to make small video segments from a larger one, then join them together into one file. After a lot of search and reading I decided to use the next command ffmpeg -y -ss 03:00 -i myvideo....
user2132188's user avatar
14 votes
6 answers
28k views

Split MKV based on Chapters

I have a long MKV file which I want to split into its individual chapters. Running ffmpeg -i long.mkv gives me all the information about the chapters embedded in the file: Duration: 01:23:45.80, ...
Terence Eden's user avatar
14 votes
4 answers
44k views

Using ffmpeg on how do I copy the video and multiple subtitle streams in an MKV and reencode multiple audio streams into AC3?

I have a video file in MKV format. I like the quality of the video, but I dislike having the audio in FLAC format since I decided it takes up too much space. It is a dual audio file—it’s an anime ...
Jason Murray's user avatar
14 votes
4 answers
40k views

Information about ffmpeg command line options

I have seen the use of ffmpeg in the command line, with the option -strict -2, or -strict experimental. I went to the command line documentation of ffmpeg, but I could not find information about this ...
Amelio Vazquez-Reina's user avatar
14 votes
3 answers
61k views

How can I pipe data losslessly to and from FFmpeg?

I piped a stream from one instance of FFmpeg to another, but because compression was used on the intermediate stream the final result was ugly. I need a lossless pipe to prevent this, and I want it to ...
Wutaz's user avatar
  • 533
14 votes
1 answer
18k views

ffmpeg: Add a New audio track to existing file

I've manually created a stereo mixdown oft some 5.1 DTS tracks. Now I would like to add the new audio track to the original movie file, without dropping the old audio tracks. My problem appears to be ...
Aarkon's user avatar
  • 143
14 votes
2 answers
28k views

Why is converting WMV to MP4 so slow?

I am trying to convert a video from WMV to MP4 with FFmpeg but it takes couple of hours. If I try to convert it to AVI it only takes about 10-15 minutes. ffmpeg version ffmpeg version N-43206-...
Giorgi's user avatar
  • 641
14 votes
1 answer
16k views

FFmpeg filter to rotate image through arbitrary angle

I need to produce timelapse video from a webcam that was mounted at a slightly off-vertical angle, and I need to rotate the image about 3 degrees counter-clockwise. (The webcam is in a virtually ...
Tom's user avatar
  • 243
14 votes
6 answers
29k views

How to create a thumbnail from the middle of a video with FFmpeg

Is there a way to grab a video thumbnail in FFmpeg? I'd like to grab the middle-most frame as the video and use that as the thumbnail. Video duration is unknown. The ability to specify the ...
StackOverflowNewbie's user avatar
14 votes
1 answer
8k views

ffmpeg : setting a rectangle in a video to black

I want to set a rectangle in a video to black, so that each frame in the video will have this black rectangle. Is it possible ? I want something similar to this: "How to put border around video to ...
dafnahaktana's user avatar
14 votes
1 answer
11k views

What bunch of ffmpeg scripts do I need to get HTML5-compatible "Video for everybody"?

What list of commands should I do in ffmpeg/mencoder/some_other_CLI_app to get a video in all the right formats to use Video for Everybody? i.e. Is there a subtlety that prevents there being a ...
John Baber-Lucero's user avatar
14 votes
1 answer
25k views

Using ffmpeg to denoise (reduce film grain)

I have a large collection of movies I'd like to re-encode to both reduce size and improve picture quality. A large number are old black and white movies that are pretty grainy, but even titles through ...
jbbarnes77's user avatar
14 votes
1 answer
23k views

How to concatenate two or more videos with different dimensions in FFMpeg?

I have two videos I would like to concatenate. First Video Dimensions = 480x640 Second Video Dimensions = 640x480 I tried concatenating them and received an error. I've included the full error below....
Daryl's user avatar
  • 529
14 votes
2 answers
47k views

Convert video with vp9 codec using ffmpeg

I am trying to convert input.mp4 video to output.mkv using vp9 codec. I have install development version of ffmpeg via: brew install ffmpeg --devel. ffmpeg -i input.mp4 -vcodec vp9 output.mkv But I ...
Pavel Binar's user avatar
14 votes
3 answers
27k views

How to record what's playing on the soundcard using FFmpeg?

I am trying to record what's playing on my soundcard in Windows 8.1 I ran the following to determine what devices I have: ffmpeg -list_devices true -f dshow -i dummy The output listed: DirectShow ...
AngryHacker's user avatar
  • 18.6k
14 votes
4 answers
10k views

ffmpeg: Removing parts with silence: Efficiently remove several parts of a Video

I'm trying to remove parts of a video, where there is no (or little) audio. For this I use audacity (Analyze->Sound finder) and export the Label Track. This results in something like this: 0.000000 ...
3244611user's user avatar
14 votes
2 answers
31k views

How to recover 1.4GB video file that can't be read (Canon) [duplicate]

I was shooting video with a Canon EOS 7D, and it was telling me the battery (I thought) was getting hot, so I opened the battery cover and it promptly shut off. It was a battery pack, and the ...
Arlen Beiler's user avatar
  • 1,640
14 votes
2 answers
13k views

MP4 file ignores subtitle settings in VLC

When playing an MKV movie (h264/aac) with a separate .SRT file, VLC lets me control the looks of subtitles perfectly from the menu. However, after losslessly converting the MKV/SRT to MP4 with built-...
forthrin's user avatar
  • 2,027
13 votes
1 answer
14k views

Ffmpeg upscale and letterbox a video

I have a video with that is 480x360 in resolution, what I want to do is upscale this video to 1280:720 and not loos the original videos aspect ration ( letterbox the left and right side) So I know ...
Levan's user avatar
  • 1,169
13 votes
3 answers
26k views

ffmpeg command for concatenate two mp3 files

I am using ffmpeg for Concatenating two MP3 files together, I use this command : ffmpeg -y -i first.mp3 -i second.mp3 -filter_complex "[0:0][1:0] amix=inputs=2:duration=longest" -c:a libmp3lame ...
Karami's user avatar
  • 133
13 votes
2 answers
30k views

ffmpeg limit number of images converted to video [duplicate]

Is it possible to instruct ffmpeg to combine a limited range of images together? Lets say there is a folder of 1000 images named img_0001.jpg to img_1000.jpg and I only wanted to combine img_0250....
lklepner's user avatar
  • 133
13 votes
2 answers
20k views

How to list streams with FFmpeg?

I’m reading the FFmpeg documentation from top to bottom and I’ve reached stream selection and stream specifiers and while the inference logic (i.e. which stream to operate upon) is impressive I think ...
S Meaden's user avatar
  • 295
13 votes
3 answers
16k views

Combine MOV video files

I'm on Arch Linux 4.13.10 and I'd like to combine multiple .MOV files shot with a Canon EOS camera. I tried to convert the files to transport streams (.ts files) using FFmpeg, as shown here, but ...
Matthias Braun's user avatar
13 votes
1 answer
41k views

FFmpeg 2 Pass Encoding

I a trying to convert my high quality movie collection to save some disk space. And I learned that 2 Pass encoding will do the job better. And this is the command line that I am using to encode videos ...
RvidD's user avatar
  • 404
13 votes
1 answer
18k views

ffmpeg pipe images extracted from video

I can use the following command to extract images from a video using ffmpeg, saving them to the filesystem: ... | ffmpeg -i - -f image2 'img-%03d.png' I would like to pipe these images to another ...
Birjolaxew's user avatar
13 votes
2 answers
12k views

ffmpeg x11grab a single window

Is it possible with ffmpeg grab a window that is minimized or that not has the focus (there is another window over but ffmpeg records only the window which is below)? With a command like ffmpeg -f ...
Pioz's user avatar
  • 233
13 votes
1 answer
47k views

How do I extract the timestamps associated with frames ffmpeg extracts from a video with the -r option?

ffmpeg -i myvid.mp4 -r 25 -t 100 image-%d.jpeg Is the command I'm using to extract frames and it's working just like I expected. However I'd also like to look at the timestamps of the frames. ...
Srini's user avatar
  • 235
13 votes
1 answer
5k views

Can ffmpeg read filters from a text file?

I have a very long list of drawtext and overlay filters (several thousand). I'm running into an issue of hitting my operating system's hard limit for total command length (~131k characters). Can I ...
user1661677's user avatar
13 votes
2 answers
22k views

Hardcoding FFMPEG subtitles on MP4 / MKV

I am using FFMPEG to hard code subs into a video. Having read many posts on the best approach, and whether to use mkv or mp4, but am still none the wiser. The code below uses an mp4 file. The ...
Jonathan_W's user avatar
13 votes
1 answer
5k views

Video produced from images only plays in VLC but no other players

Within my folder with bunch of 13MP bmp images named 0001.bmp, 0002.bmp,... I run the following commands from command line. Crop images to 4K ffmpeg -i %4d.bmp -vf "crop=3840:2160:184:240" croped%4d....
Krcevina's user avatar
  • 153
13 votes
1 answer
9k views

Concatenating videos with ffmpeg produces silent video when the first video has no audio track

I have 3 mp4 files: 1.mp4 - Has video, no audio 2.mp4 - Has video and audio 3.mp4 - Has video and audio I have created a clips file (clips.txt) for concatenation: file '1.mp4' file '2.mp4' file '3....
Phil's user avatar
  • 361
13 votes
3 answers
21k views

Recommended settings to convert Opus to AAC

I am downloading some music from Youtube, and it seems that in most cases (popular videos), the best quality audio is an opus file. I know that (1) Opus is the newest and more efficient codec, and (2)...
Peter K.'s user avatar
  • 414
13 votes
1 answer
29k views

Creating video containing animated text using FFMPEG alone

I doubt this is possible, but am trying to find some way to dynamically render text, and then optionally animate it (simple left to right movement) and then composite the result on top of another ...
Bachalo's user avatar
  • 2,637
13 votes
1 answer
6k views

FFMPEG: Windows binaries with globbing (libavformat) support?

I am struggling to get ffmpeg to combine a bunch of images in to a video which have a format with a full 17 digit timestamp. 17 digits is well beyond what -i %d will support. So I want to use ...
gnychis's user avatar
  • 231
12 votes
2 answers
20k views

Can I make ffmpeg stop if integrity check encounters an error?

Is there a way to stop ffmpeg from processing if an error was encountered? I'm using ffmpeg to check video integrity by using: ffmpeg -v error -i file.avi -f null - 2>error.log However, I'd like ...
Kate's user avatar
  • 255
12 votes
2 answers
29k views

Combine multiple images to form a strip of images ffmpeg

I wish to combine multiple images into a single strip of images, using FFMPEG. I have been trying to search this thing on google, but unable to find anything useful. All links take me to places ...
Manu's user avatar
  • 1,003
12 votes
3 answers
8k views

ffmpeg/avconv force scaled output to be divisible by 2

I record my desktop with avconv (aka ffmpeg) and then scale it to 720p. I recently added to my script so they can select a window with xwininfo and it will record that one specifically. However, if ...
J V's user avatar
  • 486

1
3 4
5
6 7
141