FFmpeg is a free software project that produces libraries and programs for handling multimedia data. The most notable parts of FFmpeg are libavcodec, an audio/video codec library used by several other projects, libavformat, an audio/video container mux and demux library, and the ffmpeg command line ...

learn more… | top users | synonyms

5
votes
1answer
4k views

ffmpeg drawtext filter - create transparent background with text

I am currently working with the drawtext filter. So far I have only been successful with drawtext option configurations to use the right font and place the text horizontally centered. How could i get ...
54
votes
1answer
62k views

How can I crop a video with ffmpeg?

I have an MP4 file of a screen recording that I need to crop down. How can I accomplish this without using expensive tools like Adobe Premier or Final Cut? I prefer ffmpeg because I have used it ...
12
votes
4answers
26k views

How to losslessly encode a jpg image sequence to a video in ffmpeg?

I have a large set of jpgs that I want to convert to a video losslessly (or, at the very least, very close to losslessly as long as the encoding time isn't much higher than otherwise). Naively, I ...
3
votes
1answer
853 views

Correct lens distortion with ffmpeg

It seems to be possible to correct lens distortion with ffmpeg. According to the manual you can adjust K1 and K2 values. What this means? How to use it correctly? Example still image - captured with ...
3
votes
1answer
3k views

What CRF or settings I should choose for h265 in order to achieve a similiar quality of h264?

I'm doing some experiments with HEVC x265. I have a raw footage and the quality of details of h264 with same CRF setting looks better than h265. Shouldn't be the opposite? Maybe my setup isn't the ...
2
votes
1answer
572 views

ffmpeg - video with timer

I am currently working with the drawtext and drawbox filters to recreate a similar video appearance to what is shown below in the image. I am trying to see of a possible ways to add a count down timer ...
5
votes
1answer
14k views

Add an image in front of video using ffmpeg

I have many videos and I need to put an image in front of them for about 5 seconds, but adding it manually and rendering it each time would take really long, so I am asking if it is possible to do so ...
1
vote
2answers
6k views

How do I recover truncated AVI/DV video?

Short version: I believe I have truncated but otherwise valid AVI/DV files that won't play in any player I've tried (Adobe Premiere, MPC HC, VLC). I assume the stream data is intact but truncated, and ...
1
vote
1answer
469 views

Can I run this in one command line (ffmpeg)

I used this command ffmpeg -i thevideo.mp4 -c:a copy -vf 'drawbox= : x=0 : y=0 : color=invert:enable=between(t\,11\,39)' output.mp4 but it runs very slow. So, I took another approach, I copy first ...
0
votes
2answers
4k views

Error FFMPEG when convert video to MP4 with baseline presset

I have this command in ffmpeg: ffmpeg -i '/var/www/sites/default/files/private/videos/original/reel para web en loop_2_2.mp4' -vf 'scale=640:480' -strict experimental -vco dec 'h264' -vpre ...
10
votes
1answer
25k views

How do I change frame size, preserving width (using ffmpeg)?

I'm new to this StackExchange site, and to using the ffmpeg encoder. I have a video that is 720x480 (3:2) that I would like to change to 720x406 (16:9) to match the other videos I have for a site. I ...
11
votes
4answers
17k views

How can I convert .MTS file (AVCHD) to .mp4 by ffmpeg without re-encoding H264 video stream?

Note: I posted same question to stackoverflow a short time before, when I have not found this comunity yet. I repost this since the question is more suitable to this community. 1. What I tried I ...
9
votes
4answers
8k views

How to get FFMPEG to join non-sequential image files? (skip by 3s)

I have a bunch of images, that follow this pattern. 0001.png 0004.png 0007.png 0010.png 0013.png 0016.png 0019.png ... They're in the correct order, but FFMPEG ignores anything after the first ...
8
votes
1answer
4k views

Can I use FFMPEG in a commercial product [closed]

Not sure if I am correct posting my question here and I will of course delete this question if appropriate. I have a c# desktop app using FFMPEG I have a web service using FFMPEG. I sell both ...
6
votes
2answers
3k views

What is the difference between ffmpeg and ffmbc now?

Two years ago I've used ffmbc to encode videos to prores, but nowadays ffmpeg also supports prores and avchd. What is the difference between ffmpeg and ffmbc now?
4
votes
3answers
1k views

creating a lossless mp4 screencast

I'm trying to create a screencast for playback on the web. Would like to use h.264, webm, and ogg. The source files are in the Apple Animation codec, and they look perfectly accurate. However when I ...
4
votes
1answer
109 views

Top and tail GoPro video based on volume

I'm thinking of using ffmpeg to automate a simple video task. I have lots of action videos that go like this, quiet/boring -> loud/exciting -> quiet/boring. Allowing for a few seconds at the start ...
3
votes
1answer
204 views

Using h264 in loseless mode brings small unexpected results

I got curious on ffmpeg screen capture capabilities and started messing around with a simple realtime capture test in h264. ffmpeg -f dshow -i video="screen-capture-recorder" -video_size 1920x1080 ...
3
votes
1answer
1k views

Video converted by FFMPEG has a different duration, why?

I convert videos using FFMPEG. My goal is to convert them to the MP4 container format (MPEG-4 Part 14) with AAC-encoded audio stream and MPEG-4 part 10-encoded video stream. I use the following line ...
2
votes
1answer
229 views

Streamable Container for HEVC (H.265)

flv is a container which can be used to stream videos while they are being encoded. flv supports h.264 codec. However, flv doesn't support hevc codec. Is there any container for hevc which is ...
2
votes
1answer
243 views

Crossfading audio at beginning and ending of video

The html5 video tag has a loop attribute. When playing a video in a continuous loop, it doesn't do this seamlessly. I hear cracks and pops at the beginning. With ffmpeg I am able to trim .05 seconds ...
1
vote
1answer
90 views

Unable to hardcode subtitles in FFmpeg on Mac to mov

I would like to hardcode subtitles using FFmpeg, I'm trying to do this using the following command: ffmpeg -i grdedFinal.mov -vf subtitles=portSbs.srt gradedFinalwithSubs.mov which returns the ...
1
vote
1answer
159 views

ffmpeg Cut a media preserving all streams but also all metadata, timecodes and everything else

Today I wanted to obtain a ts file cut preserving everything, so I tried with this command: ffmpeg -i "original.ts" -map 0 -c copy -t 00:30:0.0 -threads 1 "cutted.ts" The resulting file have ...
1
vote
1answer
31 views

Identifying source of audio drift between camcorder and recording PC

I'm recording our church's sermons using a standard consumer-grade camcorder (Handycam HDR-CX380). Depending on mixer circumstances (our church moves around a lot), I'll either run a line from our ...
1
vote
2answers
709 views

ffmpeg: mute first 2 seconds in all audio streams

Looking to edit a blip out of the beginning of a video/audio file: How can I use ffmpeg to only edit the first two seconds of the clip so that there's no longer that blip in the audio? How do I ...
1
vote
2answers
568 views

Why does quality degrade so much if just cutting video with ffmpeg?

I have tried to cut video with the following command ffmpeg -i "Вспомнить все (Total Recall, 1990).avi" -ss 01:07:29 -to 01:08:05 fight.avi Output: Input #0, avi, from '╨Т╤Б╨┐╨╛╨╝╨╜╨╕╤В╤М ╨▓╤Б╨╡ ...
0
votes
1answer
42 views

FFMpeg concat demuxer corrupted output (freezed video on some concatenated parts)

I have big videos with different types of properties and trying to collect some part of these videos by ffmpeg. I use this command to cut specific parts: scale video >> scale png >> pad ...
0
votes
1answer
83 views

Add transparent background to ffmpeg with text over it

How to correctly add expression to transparent background like on this question ffmpeg drawtext filter - create transparent background with text for my case (where there are 3 lines in bottom right ...
0
votes
2answers
110 views

ffmpeg - burning in subtitles with non-square pixels

I've got a 16:9 standard-def movie into which I need to burn some subtitles. I'm using ffmpeg -y -i input.mov -vf ass="./captions.ass" output.mov and in the subtitle.ass file I've tried PlayResX: ...
0
votes
1answer
487 views

ffmpeg drawtext clipping to a bounding box

I'm trying to create a transparent box with some text in it and then overlay that onto a (bigger) existing video. I know I can do the text directly over the video, but I need the text bounded inside ...