Skip to main content
8 votes
Accepted

Correct "stripes" in VHS record

Those are interlacing artifacts. They become visible when the motion in the video is faster than the field rate, so that when both fields are combined into a progressive scan image, the movement is ...
Michael Liebman's user avatar
6 votes

How to set pts time format when using ffmpeg filter to add timestamp

Do In order to draw Timestamp: 01:25., you should specify this one to (feed) ffmpeg: drawtext = text = 'Timestamp\: %{pts\:gmtime\:0\:%M\\\:%S}.' Don't If you specify this one to (feed) ffmpeg: ...
Константин Ван's user avatar
6 votes
Accepted

replace black frames with previous frames

It's possible to have the black frames removed and earlier frames duplicated. ffmpeg -i in.mp4 -vf blackframe=0,metadata=select:key=lavfi.blackframe.pblack:value=50:function=less -vsync cfr -c:a copy ...
Gyan's user avatar
  • 33.6k
4 votes
Accepted

Color leakage effects with ffmpeg blend=all_expr

The default pixel format for testsrc filter is rgb24, which gets converted to yuv444p for encoding to H264. The default pixel format for color is yuv420p, which is kept as-is. The blend filter ...
Gyan's user avatar
  • 33.6k
4 votes
Accepted

mplayer/ffmpeg How to set caca filter's output size

Found. Caca library is driven mostly by environment variables rather than filter params. export CACA_GEOMETRY=200x78 mplayer -vo caca $INPUT
Ondra Žižka's user avatar
4 votes
Accepted

How to concatenate multiple videos with fades (from- and to-black) in-between?

So here is what I came up with. A not fully one-liner solution 1) Generate black clips ffmpeg -f lavfi -i "color=black:s=1920x1080:r=30" \ -f lavfi -i "anullsrc=r=48000:cl=stereo" ...
TedGrassman's user avatar
3 votes
Accepted

How to improve quality of a WebCam video?

More Light You're seeing noise for two reasons. One is the tiny sensor of your webcam, but since you don't want to buy a new one right now, you can't do anything about that. However, the sensor size ...
MoritzLost's user avatar
  • 5,452
3 votes
Accepted

How to set pts time format when using ffmpeg filter to add timestamp

Use text='timestamp \: %{pts\:gmtime\:0\:%H\\\:%M\\\:%S}'
Gyan's user avatar
  • 33.6k
3 votes
Accepted

Add semi-transparent box around subtitle

Use ffmpeg -i movie.mkv -strict -2 -vf "subtitles=subtitle.srt:force_style='FontName=ubuntu,fontsize=30,BorderStyle=3,OutlineColour=&H80000000',scale=720:-1" -qscale:v 3 Movie.avi See Style ...
Gyan's user avatar
  • 33.6k
3 votes

"ffmpeg" set fontsize and font

I did solved this with " " "subtitles=subtitle.srt:force_style='FontName=ubuntu,Fontsize=30'"
Slobodan Vidovic's user avatar
3 votes
Accepted

FFmpeg: afade plugin, how to specify time 1:55 if colon separates filter parameters? Escape

Enclose the time argument in single quotes and escape the colons within. So, afade=t=out:curve=hsin:st='00\:0\:30':d='00\:00\:10'
Gyan's user avatar
  • 33.6k
3 votes
Accepted

ffmpeg blend mode multiply results in green overlay

I solved my problem thanks to @Gyan comment: ffmpeg -i bg.mp4 -i fg.mov -filter_complex "[0:v] format=rgba [bg]; [1:v] format=rgba [fg]; [bg][fg] blend=all_mode='multiply':all_opacity=1, format=rgba" ...
Alex's user avatar
  • 41
2 votes
Accepted

Stack images with "hstack"-filter from video or image sequence in ffmpeg

You're better off using the tile filter for this: ffmpeg -i INPUT.mov -vf fps=1,scale=192:108,tile=54x1 output.jpg The tile argument is the size of a rectangle. So for a 54 second video, 54x1 ...
Gyan's user avatar
  • 33.6k
2 votes

What -preset medium stand for in ffmpeg

On the page you linked to it explains it fairly well: A preset is a collection of options that will provide a certain encoding speed to compression ratio. A slower preset will provide better ...
stib's user avatar
  • 13.8k
2 votes
Accepted

What -preset medium stand for in ffmpeg

preset is a private option that may be defined for an encoder, such as libx264. It is a shorthand method to set a whole bunch of options at once, and won't have any effect if set when using an encoder ...
Gyan's user avatar
  • 33.6k
2 votes
Accepted

ffmpeg fade to specific color values over time

The lut filter expressions don't work with time. geq does. geq=r='(1-0.7*min((T-S)/D,1))*p(X,Y)':g={the same as r}:b={the same}:enable='gte(t,S)' S should be your start time in second. D is duration ...
Gyan's user avatar
  • 33.6k
2 votes

If I use a normal build of ffmpeg how take advantage of video acceleration for scale?

The answer to your second question is yes. Change -c:v libx264 to -c:v h264_nvenc. I use those builds as well. If you use the option -encoders you can see a list of included video and audio codecs. ...
Gordon's user avatar
  • 106
2 votes
Accepted

Replace all completely black frames with interpolated frames

After poring over the documentation all weekend, I figured out how to use the minterpolate filter to do motion interpolation. The full command is ffmpeg -i in.mp4 -vf blackframe=0,metadata=select:...
BlueRaja - Danny Pflughoeft's user avatar
2 votes
Accepted

Combine -vf yadif,format=yuv420p and -filter_complex for watermark

Use ffmpeg -i input.mp4 -i logo.png \ -filter_complex "[0]yadif,format=yuv420p[main];[1][main]scale2ref=iw/5:ow*450/450[wm][vid];[vid][wm]overlay=W-w-W*3/100:H-h-H*1/100:enable='gt(t,30)'" \ -...
Gyan's user avatar
  • 33.6k
2 votes
Accepted

What are brightness, gamma, and lut filters doing to my video? What's the difference, which should I prefer?

Here's what all these settings do, typically. Some pieces of software define or apply them differently, but this should give a general idea. Brightness simply changes the brightness value of each ...
Cam's user avatar
  • 266
1 vote

How to use ffmpeg to fade in/out a veriable frame rate video clip with unknown duration

This works here ffmpeg -i VID_1.mp4 -sseof -2 -copyts -i VID_1.mp4 -lavfi "[1]fade=out:s=1:d=2[tail];[0][tail]overlay,fade=in:s=0:d=2,scale=640:-2[video];anullsrc,atrim=0:2.1[audiotail];[0][audiotail]...
Gyan's user avatar
  • 33.6k
1 vote

Video player with motion blur or frame averaging

VLC has a motion blur option under Tools > Effects and Filters > Video Effects > Advanced. As a bonus, it can natively take the URL of some video sites, like YouTube.
trlkly's user avatar
  • 111
1 vote
Accepted

Combining two video fields into one (to create an interlaced video)

Use ffmpeg -i top.avi -i bottom.avi -filter_complex vstack,il=l=i:c=i -c:v ffv1 il.avi See docs for http://www.ffmpeg.org/ffmpeg-filters.html#vstack and http://www.ffmpeg.org/ffmpeg-filters.html#il
Gyan's user avatar
  • 33.6k
1 vote
Accepted

What do I need to take into consideration to take video of molten glass which I will later postprocess?

What this comes down to is what's referred to as dynamic range. The wider the dynamic range the more detail you will see between the darkest darks and brightest lights. The human eye has a very large ...
Dlayd's user avatar
  • 26
1 vote

How to apply different filters to different parts of a video using AviSynth?

This can be done using the filter ClipClop. Here is an example script from the docs of the filter: Avisource("D:\avs\test.avi") ORG=Last V1 = FFT3DFilter(Plane=0,Sigma=1.6) # Light Luma V2 = ...
Krisztián Balla's user avatar
1 vote
Accepted

How to overlay 2 videos using depth layers

The main issue was, that the Z-Layer was not accurate enough, as Gyan said. Addtionally the condition needed to be changed from lt(A,B) to lte(A,B).
Pingger Shikkoken's user avatar
1 vote

Why when I overlay a logo on top of the video, the white color part of the logo is transparent?

There is no white color. That's the background color of the page showing through. Your input PNG is palettized 8-bit image where black color indicates transparency. Apply the following filter to the ...
Gyan's user avatar
  • 33.6k

Only top scored, non community-wiki answers of a minimum length are eligible