
Quitar i-frames
ffmpeg -i input.file -c:v mpeg4 -q:v 0 -bf 0 -g 600 output.avi
​
datamosh input.file -o output.file
-----------------------------------------------------------------------------------------------
Macroblock
Output to MPEG-2 video
ffmpeg -i input.mp4 -bsf:v noise -c:v mpeg2video -q:v 0 -c:a copy macroblock.ts
Increase -q:v value to ~20 if you want a more "encoded" look. Add a noise value as shown in the section above if you want more noise.
The output macroblock.ts is damaged, but you can re-encode it so it will work in your player:
ffmpeg -i macroblock.ts -codec:v libx264 -pix_fmt yuv420p output.mp4
------------------------------------------------------------------------------------
PACKETREMOVER
BIT STrEAM PACKET REMOVER
ffmpeg -i reversehipsink.mp4 -bsf noise=1000 revshi.mp4
---------------------------------------------------------------------------------------------
HUFFyuv
ffmpeg -i input.mp4 -codec:v huffyuv -c:a pcm_s16le -bsf noise=1000000 huffy.mkv
​
re-encode for video player
ffmpeg -i noise.mkv -codec:v libx264 -pix_fmt yuv420p output.mkv
random compression looking errors cant get working in ffmpeg
ffmpeg -f rawvideo -video_size 256x144 -pixel_format rgb24 -framerate 1 -i /dev/urandom \
-ar 48000 -ac 2 -f s16le -i /dev/urandom -codec:a aac -b:a 640k \
-t 10 output.mp4
ffmpeg -f rawvideo -video_size 3840x2160 -pixel_format rgb24 -framerate 2
-i /dev/urandom -ar 48000 -ac 2 -f s16le -i /dev/urandom -codec:a copy -t 1 output.mkv
ffmpeg -f rawvideo -video_size 100x100 -pixel_format rgb24 -framerate 1 \
-i /dev/urandom -ar 48000 -ac 2 -f s16le -i /dev/urandom -codec:a copy \
-t 10 output.mkv
---------------------------------------------------
remove IFRAMES KEYFRAMES
-x264opts "keyint=24:min-keyint=24:no-scenecut"
ffmpeg -i <input> -vcodec libx264 -x264-params keyint=120:scenecut=0 -acodec copy out.mp4
-----------------------------------------------
BSF NOISE GLITCH WITH GOP
alter b framess
try -g 9999 -bf 2 -bsf noise=900 for interesting result
-------------------------------------------------------------------
PREP FILES FOR MaSH
ffmpeg -i input.file -c:v mpeg4 -q:v 0 -bf 0 -an -g 600 output.avi
then
datamosh -i input.mp4 - o output.mp4
FFplay ----adding `-loop 0` to the command will loop playback indefinitely.
ffplay
half speed playback of raw file
ffplay -f h264 file.264 -vf "setpts=2.0*N/FRAME_RATE/TB"
------------------------------------------------------w
LOOP/CONCAT
loops same vid 10 times. 70 is number of frames
ffmpeg -i video.mp4 -filter_complex "loop=loop=10:size=70:start=0" -pix_fmt yuv420p videloop.mp4
method 2.......mylist.txt
file '1.AVI'
file '2.AVI'
file '3.AVI'
ffmpeg -safe 0 -f concat -i list.txt -c copy output.mp4
ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.mp4
​
METHOD2
​
ffmpeg -i afe.avi -i alientoma.avi -filter_complex "[0:v] [0:a] [1:v] [1:a] concat=n=2:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" output.avi
if its 3 files
ffmpeg -i lockp.avi -i jobsrob.avi -i lockp.avi -filter_complex "[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] concat=n=3:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" output.avi
​
ffmpeg -i OverheadCam.mp4 -filter_complex "
[0:v]split=3[copy1][copy2][copy3],
[copy1]trim=10:20,setpts=PTS-STARTPTS[part1],
[copy2]trim=30:40,setpts=PTS-STARTPTS[part2],
[copy3]trim=60:80,setpts=PTS-STARTPTS[part3],
[part1][part2][part3]concat=n=3[out]" -map "[out]" out.mp4
----------------=================00000000000=======================
FIX ERRORS IN FILE
ffmpeg -err_detect ignore_err -i fina.avi -c copy video_fixed.avi
OR
ffmpeg -i video.mkv -c copy video_fixed.mkv
fix non monontonous dts
ffmpeg -err_detect ignore_err -i video.mkv -c copy video_fixed.mkv
add following IF TOO MANY PACKETS FOR BUFFER ERROR MESSAGE
-max_muxing_queue_size 4096
IF ERROR CANNOT be DIVISIBLE BY 2
-vf "pad=ceil(iw/2)*2:ceil(ih/2)*2"
-----------------------------------------------------------------------------------------------------
copy audio directly from video/stream
ffmpeg -i source_video.avi -vn -codec:a copy sound.wav
============================================================
SOX AUDIO
ffmpeg -i ringAUDIO.wav -af aresample=resampler=soxr -ar 44100 my-44100.wav
​
AUDIO FROM ONE SOURCE/VIDEO FROM ANOTHER
ffmpeg -i video.mp4 -i audio.wav -map 0:v -map 1:a -c:v copy -shortest output.mp4
strip audio stream away from video
ffmpeg -i INPUT.mp4 -codec copy -an OUTPUT.mp4
NEW VIDEO/AUDIO WITH hq audio
ffmpeg -i INPUT.mp4 -i AUDIO.wav -c:v copy -c:a aac -b:a 320k OUTPUT.mp4
EXTRACT AUDIO
ffmpeg -i input.mkv -vn audio_only.ogg
REPLACE AUDIO/VIDEO WITHOUT REENCODING
strip audio stream away from video
ffmpeg -i INPUT.mp4 -codec copy -an OUTPUT.mp4
combine the two streams together (new audio with originally exisiting video)
ffmpeg -i video.mp4 -i audio.wav -map 0:v -map 1:a -c copy -y audiovideo.mp4
or add an offset to audio
ffmpeg -i 36.MOV -itsoffset -0.25 -i 36.wav -map 0:v -map 1:a -c copy -y 36-encoded.mov
or
ffmpeg -i INPUT.mp4 -i AUDIO.wav -shortest -c:v copy -c:a aac -b:a 256k OUTPUT.mp4
AUDIO FROM ONE vIDEO fromanother COMBINE
ffmpeg -i input.mp4 -i input.mp3 -c copy -map 0:v:0 -map 1:a:0 output.mp4
ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac -strict experimental output.mp4
combine the two streams together (new audio with originally existing video)
ffmpeg -i video.mp4 -i audio.wav -map 0:v -map 1:a -c copy -y videoaudio.mp4
ffmpeg -i fernwave.mp4 -i cover.wav -c:v copy -c:a aac -b:a 320000k -map 0:v:0 -map 1:a:0 fernwavesaudio.mp4
WAV NEEDS .MOV TO KEEP QUALITY
ffmpeg -i video.mp4 -i 3.wav -acodec copy -vcodec copy -map 0:v:0 -map 1:a:0 video.mov
AUDIO quality HIGH
ffmpeg -i my_input_file.mp3 -c:a pcm_s16le -ar 44100 my_output_file.wav
o
-------------------------------
SQUASHING WITH HQ AUDIO
ffmpeg -i file.mp4 -c:v libx264 -crf 18 -c:a aac -ab 320k fileout.mp4
============================================================
PIP upper left
ffmpeg -i input.mp4 -i input.mp4 -filter_complex "[0:v][1:v] overlay=25:25"
output.mp4
​
CROP SIZE WIDTH
​
ffplay -i input -vf "crop=in_w:in_h-40"
​
below crops sides
ffmpeg -i twinorig.mp4 -filter_complex "[0:v]crop=960[cropped]" -map "[cropped]" outpu2t.mp4
​
syntax crop=width:height:x:y.
ffmpeg -i input.mp4 -filter_complex "[0:v]crop=200:200:300:100[cropped]" -map "[cropped]" output.mp4
This command results in a 200x200 cropped portion of the video situated 300 pixels from the left edge and 100 pixels from the top edge.
If the parameters 300:100 is not provided, the resulting portion will be taken from the center of the video.
​
RATIO STRETCH
​
ffplay -i winter1slow.mp4 -vf "scale=1494:-1,setdar=16/9"
​
-------------------------------------------------------------------------
change frame size width heigh etc
ffmpeg -i input.mkv -vf "scale=iw/2:ih/2" half_the_frame_size.mkv
ffmpeg -i input.mkv -vf "scale=iw/3:ih/3" a_third_the_frame_size.mkv
ffmpeg -i input.mkv -vf "scale=iw/4:ih/4" a_fourth_the_frame_size.mkv
--------------------------------------------------
CHANGE FRAME RATE AND SPEED UP VIDEO
ffmpeg -i input.mkv -r 16 -filter:v "setpts=0.25*PTS" output.mkv
DREAMY MISTY EFFECT
ffmpeg -i original.mp4 -filter_complex "[0]rgbashift=rh=15:bv=15:gh=-15,format=rgba[in2];[in2][0]scale2ref[in2][in1];[in1][in2]blend=overlay,gblur=sigma=42:steps=6,format=yuv420p[in2];[in2][0]scale2ref[in2][in1];[in1][in2]blend=screen" -pix_fmt yuv420p output.mp4
----------------------------------------------
OVERLAY 3 IMAGES/VIDEOS
ffmpeg -i background-frame%d.png -vf tmix=frames=3 stacked.png
------------------------------------------
NO GRATICULE AND HQ
ffmpeg -i 44.mp4 -filter_complex "waveform=intensity=0.1:mode=column:mirror=1:c=1:f=5:flags=numbers+dots:scale=0" -c:v libx264 44-waveform-acolor.mp4
change size=1280x720 for example
------------------------------------------------------------------
JUST MOTION VECTORS
ffmpeg -flags2 +export_mvs -i stair.avi -vf "split[original],codecview=mv=pf+bf+bb[vectors],[vectors][original]blend=all_mode=difference128,eq=contrast=7:brightness=-1:gamma=1.5" -c:v libx264 we-vector-flow.avi
-----------------------------------------------------------------------------
REVERSE
ffmpeg -i video.mp4 -vf reverse -c:v libx264 reversedvideo.mp4
​
video and audio
ffmpeg -i Count.mp4 -vf reverse -af areverse reversed.mp4
============================================================
OUTPUT DIFFERENCE BETWEEN TWO DATA STREAMS
ffmpeg -i clockss.avi -i 8.avi -filter_complex ìblend=c0_mode=differenceî -c:v libx264 -crf 18 -c:a copy diff.avi
use -qscale 0 if avi
​
============================================================
CHROMAKEY
ffmpeg -i vid.mp4 -i overlay.mp4 -filter_complex '[1:v]colorkey=0x000000:0.1:[ckout];[0:v][ckout]overlay[out]' -map '[out]' out.mp4
​
ffmpeg -i input.mp4 -c:v vp9 -filter:v "chromakey=0x00ff00:0.1:0.2" file.mp4
-----------------------------------------------------------
VIDSTAB MOTION VECTORS SQUARES
ffmpeg -i in.mp4 -vf vidstabdetect=show=1 -y out.mp4
EXPORTMOTION VECTORS
ffmpeg -flags2 +export_mvs -i input.mp4 -vf codecview=mv=pf+bf+bb output.mp4
PATTERNS CELLAUTO
ffplay -f lavfi -i cellauto=rule=110
ffmpeg -f lavfi -i cellauto=rule=30:s=1920x1080 -t 16 out.mp4
------------------------------------------------------------------------------------------------
ROTATE VIDEO CLOCKWISE
$ ffmpeg -i input.mp4 -vf "transpose=1" output.mp4
-----------------------------------------------------------------------------------
FASTER VIDEO
ffplay -i input.mp4 -vf "setpts=0.1*PTS"
ffmpeg -i input.mp4 -vf "setpts=0.1*PTS" output.mp4
DROP FRAMES -
ffmpeg -i 466.avi -vf setpts=0.5*PTS output.avi
WITHOUT DROPPING FRAMES.
CHANGE FRAME RATE AND SPEED UP VIDEO
ffmpeg -i input.mkv -r 16 -filter:v "setpts=0.25*PTS" output.mkv
SLOW
ffmpeg -i input.mp4 -filter:v "setpts=2*PTS" output.mp4
​
BOTH VIDEO AND SOUND SPED/SLOWDOWN UP
ffmpeg -i input.mp4 -filter_complex "[0:v]setpts=0.5*PTS[v];[0:a]atempo=2.0[a]" -map "[v]" -map "[a]" -c:v libx264 output.mp4
​
3x sped up video and audio
ffmpeg.exe -i input.mp4 -filter_complex "[0:v]setpts=PTS/1.3[v];[0:a]atempo=1.3[a]" -map "[v]" -map "[a]" output.mp4
--------------------------------------------------------------------------------------
TRIM A VIDEO
​
ffmpeg -i floppy.mp4 -ss 00:00:34 -to 00:01:00 -c copy output.mp4
ffmpeg -ss 00:00:30 -i orginalfile.mpg -t 00:00:05 -vcodec copy -acodec copy newfile.mpg
In the example above, we are cutting out a part starting at 00:00:30 into the original file with a 5 seconds length. -ss indicates the starting time, and -t indicates the duration.
ffmpeg -i input.mkv -c:av copy -ss 00:01:00 -t 10 output.mkv
ffmpeg -i 41.avi -ss 00:02:07 -to 00:02:27 -c copy ocout.avi
-------------------------------------------------------------------------------------
​
REMOVE LAST SECOND FROM THE FILE
ffmpeg -ss 00:01:00 -i input.mp4 -to 00:02:00 -c copy output.mp4
​
FOR A 1 MINUTE VIDEO REMOVES THE LAST 15 SECONDS
ffmpeg -t 1:00 -i input.mpg -ss 45 output.mpg
REMOVSECTION OF YOUR VIDEO-------------------------------
ffmpeg -i destEarth.m4v -ss 00:01:00 -to 00:04:35 -c:v copy -an destEarth_Mars_video.mp4
============================================================
SET HEIGHT AND WIDTH OF VIDEO
ffmpeg -i input.mkv -c:a copy -s 1280x720 output.mkv
ADJUST FRAME RATE OF VIDEO
ffmpeg -i input.webm -c:a copy -c:v vp9 -r 30 output.mkv
CHANGE BITRATE OF VIDEO
b (encoding,audio,video)
Set bitrate in bits/s. Default value is 200K.
ab (encoding,audio)
Set audio bitrate (in bits/s). Default value is 128K.
1megabyte per second example
ffmpeg -i input.webm -c:a copy -c:v vp9 -b:v 1M output.mkv
CHANGING THE CONTAINER
ffmpeg -i input.webm -c:av copy output.mkv
CHANGING CODECS
ffmpeg -i input.mp4 -c:v vp9 -c:a libvorbis output.mkv
This will make a Matroska container with a VP9 video stream and a Vorbis audio stream, essentially the same as the WebM we made earlier.
-----------------------------------------------------------
ANOTHER CROPPING VERSION WITH ASYNC INCLUDED TRY THIS
ffmpeg -i video.mp4 -ss 00:00:05 -t 00:03:14 -async 1 cut.mp4
PREPPING FOR DVD PLAYER XVID
ffmpeg -i INPUT_FILE -c:v libxvid -q:v 21 -q:a 5 OUTPUT_FILE.avi
other example just change tag
ffmpeg -i input.avi -c:v mpeg4 -vtag xvid output.avi
------------------------------------------------------------------------------
take 1 minute clip starting 1 minute into the video
-
ffmpeg -i "test.avi" -c:v libx264 -crf 20 -c:a aac -strict -2 -ss 60 -t 60 "test.mp4"
-----------------------------------------------
to change to mp4 libx264 dont forget
-CRF 18
in order to keep it high quality.
solid way of converting keeping quality/audio
ffmpeg -i "test.avi" -c:v libx264 -crf 18 -c:a aac -strict -2 "test.mp4"
-------------------------------------------------------------------------
when changing from libx264 to libxvid USE to retain quality -qscale 0
--------------------------------------------------------
CHANGE FRAME SIZE HEiGHt WIDTH ASPECT RATION
ffmpeg -i input.mov -vf scale=720x406,setdar=16:9 -preset slow -profile:v main -crf 20 output.mov
ffmpeg -i input.avi -vf scale=2000x1500,setdar=4:3 -preset slow -profile:v main -crf 20 output.avi
------------------------------------------------------------------
V I D E O S T A B I L I Z A T I O NN
2methods
1.
ffmpeg -i FILE.MP4 -vf vidstabdetect -f null -
ffmpeg -i file.mp4 -vf vidstabtransform=smoothing=50:crop=keep:invert=0:relative=0:zoom=0:optzoom=2:zoomspeed=0.2:interpol=bilinear:tripod=0 -map 0 -c:v libx264 -preset fast -crf 8 -c:a aac -b:a 320k fileout.mp4
2.
ffmpeg -i filename.MP4 -vf vidstabdetect=stepsize=32:shakiness=7:accuracy=10:result=transform_vectors.trf -f null -
ffmpeg -i filename.MP4 -vf vidstabtransform=input=transform_vectors.trf:zoom=0:smoothing=10,unsharp=5:5:0.8:3:3:0.4 -c:v libx264 -preset slow -crf 18 -c:a copy Output.MP4
---------------------------------------------------------------------------------------
CONVERT IMAGES TO VIDEO
ffmpeg -f image2 -i image%d.jpg video.mpg
--------------------------------------------------------------------------------------------------
IF WIDTH NOT DIVISIBLE BY 2 ADD THIS
-vf "pad=ceil(iw/2)*2:ceil(ih/2)*2"
-----------------------------------------------------------------------------------------------------
AUDIO AUDIO AUDIO
mp3 music to wav
ffmpeg -i music.mp3 music.wav
============================================================
Add the amerge filter to combine the audio channels from both inputs:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v];[0:a][1:a]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output
----------------------------------------------------------
truncate to fit video
ffmpeg -i music.wav -ss 0 -t 37 musicshort.wav
MP3 FILE FROM MP4
ffmpeg -i video.mp4 -vn -ar 44100 -ac 1 -b:a 32k -f mp3 audio.mp3
AUDIOAUDIO --------------------XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX-------------------------------------------------------------------------------------------------------------------------
fade in then out audio
ffmpeg -i input.mp4 -filter_complex "afade=d=0.5, areverse, afade=d=0.5, areverse" output.mp4
---------
fade both audio and video for 5seconds in a -2min video
ffmpeg -i input.mp4 -filter:v "fade=in:st=0:d=5, fade=out:st=115:d=5" -filter:a "afade=in:st=0:d=5, afade=out:st=115:d=5" -c:v libx264 -c:a aac output.mp4
----------------------------------------------------------------------------------------
TAUDIO SOURCE vIDEO FROM ANOTHER
ffmpeg -i input.mp4 -i input.mp3 -c copy -map 0:v:0 -map 1:a:0 output.mp4
ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac -strict experimental output.mp4
If your input video already contains audio, and you want to replace it, you need to tell ffmpeg which audio stream to take:
ffmpeg -i video.mp4 -i audio.wav -c:v copy -c:a aac -strict experimental -map 0:v:0 -map 1:a:0 output.mp4
--------------------------------------------------------------------------------------------
-ROTATE VIDEO
Rotate 90 clockwise:
ffmpeg -i in.mov -vf "transpose=1" out.mov
For the transpose parameter you can pass:
0 = 90CounterCLockwise and Vertical Flip (default)
1 = 90Clockwise
2 = 90CounterClockwise
3 = 90Clockwise and Vertical Flip
Use -vf "transpose=2,transpose=2" for 180 degrees.
---------------------------------------------------------------------------------------
IMAGE OVERLAY ON A VIDEO
ffmpeg -i input.mp4 -i image.png -filter_complex "[0:v][1:v] overlay=25:25:enable='between(t,0,20)'" -pix_fmt yuv420p -c:a copy output.mp4
overlay=25:25: The image will be positioned 25px to the right and 25px down, originating from the top left corner (0:0).
enable='between(t,0,20)': The overlay image will be shown from 00:00:00 to 00:00:20
--------------------------------------------------------------------------------------------
ZOOM INTO VIDEO OVER DURATION OF TIME
ffmpeg -i we.avi -vf zoompan=z=pzoom+0.01:x='iw/2-iw/zoom/2':y='ih/2-ih/zoom/2':d=1:s=1280x720:fps=30 wezoom.avi
0.02 will zoom in twice as close
MIRROR
ffplay -i input.mp4 -vf "split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2"
For export
ffmpeg -i input.mp4 -vf "split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2" output.mp4
KALEIDOSCOPE
ffmpeg -i in.mp4 -vf rotate=PI/6,stereo3d=abl:sbsr,stereo3d=sbsl:aybd,"split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2","crop=iw/2:ih:0:0,split[left][tmp];[tmp]hflip[right];[left][right] hstack",scale=720:460 out.mp4
ffplay -i GOPR0186cr.mp4 -vf rotate=PI/6,stereo3d=abl:sbsr,stereo3d=sbsl:aybd,"split [main][tmp]; [tmp] crop=iw:ih/2:0:0, vflip [flip]; [main][flip] overlay=0:H/2","crop=iw/2:ih:0:0,split[left][tmp];[tmp]hflip[right];[left][right] hstack",scale=720:460
-------------------------------------------------------------------
CONTRAST SATURATION
contrast and saturation better using gamma
# tinker with numbers
ffplay -vf eq=gamma=1.5:saturation=1.3 original.vid
# render
ffmpeg -i original.vid -vf eq=gamma=1.5:saturation=1.3 \
-c:a copy outfile.vid
----------------------------------
could also try CURVES
ffmpeg -i input.vid -vf "curves=all='0/0 0.5/1 1/1'" -codec:a copy -codec:v libx264 -y output.vid
The 0.5/1 maps mid-range brightness (0.5) to full bright (1)
------------------------------------------------------------------------------------
truncate to fit video
ffmpeg -i music.wav -ss 0 -t 37 musicshort.wav
mix music and video
ffmpeg -i musicshort.wav -i movie.avi final_video.avi
----------------------------------------------------------------------------------------------------
RESIZE VIDEO
SIMPLE
ffmpeg -i input.avi -s 720x480 -c:a copy output.mkv
BETTER
ffmpeg -i input.avi -filter:v scale=720:-1 -c:a copy output.mkv
ffmpeg -i input.avi -filter:v scale="trunc(oh*a/2)*2:720" -c:a copy output.mkv
The -1 will tell ffmpeg to automatically choose the correct height in relation to the provided width to preserve the aspect ratio. -1 can also be used for width if you provide a given height.
One downside of scale when using libx264 is that this encoder requires even values and scale may automatically choose an odd value resulting in an error: width or height not divisible by 2. You can tell scale to choose an even value for a given height (720 in this example):
scale="trunc(oh*a/2)*2:720"
...or a given width (1280 in this example):
scale="1280:trunc(ow/a/2)*2"
SELECT PORTION OF VIdEO TO REMOVE(8SECONDS)
To select just the relevant portions of the video, I used the -ss (start/seek position) and -t (time/duration) flags, e.g.:
ffmpeg -f h264 -i input-video-file.264 -ss 180 -t 8 output-video-file.mp4
The above example takes 8 seconds of the input video starting at the 3-minute (180-second) mark.
I added a flag to specify the framerate:
ffmpeg -f h264 -r:v 7 -i input-video-file.264 -ss 180 -t 8 output-video-file.mp4
------------------------------------------------------------------------------------------------------------------------
LOOP VIDEO
Concat demuxer
Make a text file. Contents of an example text file to repeat 4 times.
file 'input.mp4'
file 'input.mp4'
file 'input.mp4'
file 'input.mp4'
Then run ffmpeg:
ffmpeg -safe 0 -f concat -i list.txt -c copy output.mp4
2nd method
ffmpeg -i lockp.avi -i jobsrob.avi -i lockp.avi -filter_complex "[0:v] [0:a] [1:v] [1:a] [2:v] [2:a] concat=n=3:v=1:a=1 [v] [a]" -map "[v]" -map "[a]" output.avi
-------------------------------------------------------------------------------------------
GIF LOOOPS
ffmpeg -loop 4 -i input.mp4 -c copy output.mp4
-------------------------------------------------------------------------------------------------------------------
VISUAL GRAPHS AUDIO AND VIDEO--------------------------------------------
gray frame for 20 seconds
ffmpeg -f lavfi -i color=c=gray:s=256x144 -r 1 -t 20 output.mp4
TEST PATTERN
ffmpeg -f lavfi -i smptebars=duration=60:size=8192x8192:rate=60 smptebars.mp4
----------------------------------------------------------------------------
​
EMBED A VECTORSCOPE
show ------ffplay destEarth_Mars_video.mp4 -vf "split=2[m][v], [v]vectorscope=b=0.7:m=color3:g=green[v],[m][v]overlay=x=W-w:y=H-h"
make--------ffmpeg -i destEarth_Mars_video.mp4 -vf "split=2[m][v], [v]vectorscope=b=0.7:m=color3:g=green[v],[m][v]overlay=x=W-w:y=H-h" -c:v libx264 destEarth_Mars_vectorscope.mp4
SHOW SLIDING FREQUENCY SPECTROGRAM
ffplay -f lavfi 'amovie=bc.WAV, asplit [a][out1];[a] showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt [out0]'
ffplay -f lavfi 'amovie=bc.wav -asplit bc.wav bc.wav;bc.wav showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt eera.avi'
ffplay -f lavfi 'amovie=bc.wav showspectrum=mode=separate:color=intensity:slide=1:scale=cbrt 345.avi'
SHOW VECTORSCOP
ffmpeg -i input.mp3 -filter_complex "[0:a]avectorscope=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a avectorscope.mp4
ffmpeg -i dr.wav -filter_complex "[0:a]avectorscope=s=480x480:zoom=1.5:rc=0:gc=200:bc=0:rf=0:gf=40:bf=0,format=yuv420p[v]" -map "[v]" -map 0:a -b:v 700k -b:a 360k OUTPUT_VIDEeO.mp4
SHOW Cqt
ffmpeg -i dr.wav -filter_complex "[0:a]showcqt=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a showcqt.mp4
SHOW SPECTRUM
ffmpeg -i input.mp3 -filter_complex "[0:a]showspectrum=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a showspectrum.mp4
SECOND SPECTRUM EX.
ffmpeg -i WS.wav -filter_complex "[0:a]showspectrum=s=1900x1080:mode=combined:slide=scroll:saturation=0.2:scale=log,format=yuv420p[v]" -map "[v]" -map 0:a -b:v 700k -b:a 360k out.mp4
SHOW WAVES
ffmpeg -i dr.wav -filter_complex "[0:a]showwaves=s=1920x1080:mode=line:rate=25,format=yuv420p[v]" -map "[v]" -map 0:a showwaves.mp4
SHOWHISTOGRAM
ffmpeg -i dr.wav -filter_complex "[0:a]ahistogram=s=1920x1080,format=yuv420p[v]" -map "[v]" -map 0:a ahistogram.mp4
ffmpeg -i dr.wav -filter_complex "[0:a]showvolume=f=0.5:c=VOLUME:b=4:w=1920:h=900,format=yuv420p[v]" -map "[v]" -map 0:a showvolume.mp4
---------------------------------------------------------------------------------------------------------------
To do a slow-mo you need to slow it down by 4x
ffmpeg -i input.avi -filter "minterpolate='fps=120',setpts=4*PTS" output.avi
-------------------------------------------------
MOTION INTERPOLATION
ffmpeg -i ha2.mp4 -filter:v "setpts=62.5*PTS,minterpolate='fps=24:mb_size=16:search_param=400:vsbmc=0:scd=none:mc_mode=aobmc:me_mode=bilat:me=epzs'" 035_mc_mode=aobmc_me_mode=bilat_me=epzs.mp4
LINEAL
ffmpeg -i cat_rainbow_original.mp4 -filter:v "setpts=62.5*PTS,minterpolate='fps=25:mb_size=16:search_param=400:vsbmc=0:scd=none:mc_mode=obmc:me_mode=bilat:me=epzs'" 026_mc_mode=obmc_me_mode=bilat_me=epzs.mp4
-smooth
ffmpeg -i cat_rainbow_original.mp4 -filter:v "setpts=62.5*PTS,minterpolate='fps=25:mb_size=16:search_param=400:vsbmc=0:scd=none:mc_mode=obmc:me_mode=bilat:me=fss'" 023_mc_mode=obmc_me_mode=bilat_me=fss.mp4
ffmpeg -i cat_rainbow_original.mp4 -filter:v "setpts=62.5*PTS,minterpolate='fps=25:mb_size=16:search_param=400:vsbmc=0:scd=none:mc_mode=obmc:me_mode=bilat:me=ds'" 024_mc_mode=obmc_me_mode=bilat_me=ds.mp4
try this
ffmpeg -i in.mp4 -filter:v "setpts=32.5*PTS,minterpolate='fps=15:mb_size=8:search_param=200:vsbmc=0:scd=none:mc_mode=aobmc:me_mode=bilat:me=epzs'" -an -t 10 -threads 6 -y out.mp4
-------------------------------------------------------------------------------------
DISPLACEMENT
DISPLACEMENT SCRIPTS ONE BELOW WORKING. USE AS MODEL TO CHANGE REST
1. MIX OF SHAKE, COLOUR, MUSIC LINE
ffmpeg -y -i b.wav -i skullproject.mp4 -filter_complex "color=0x808080:s=1280x720,format=rgb24,loop=-1:size=2[base];0:a]showcqt=s=1280x720:basefreq=73.41:endfreq=1567.98,format=rgb24,geq='p(X,363)',setsar=1,colorkey=black:similarity=0.1[vcqt];[base][vcqt]overlay,split[vcqt1][vcqt2];[1:v]scale=1280:720,format=rgb24,setsar=1[bgv];[bgv][vcqt1][vcqt2]displace=edge=blank,format=yuv420p[v]" -map "[v]" -map 0:a pref.mp4
2. MUSIC LINE VISUAILIZER DISP y
ffmpeg -y -i dr.WAV -i bicut.mp4 -filter_complex "color=0x808080:s=1440x1080,format=rgb24,loop=-1:size=2[base];[0:a]showcqt=s=1280x720:basefreq=73.41:endfreq=1567.98,format=rgb24,setsar=1,colorkey=black:similarity=0.1[vcqt];[base][vcqt]overlay,split[vcqt1][vcqt2];[1:v]scale=1440:1080,format=rgb24,setsar=1[bgv];[bgv][vcqt1][vcqt2]displace=edge=blank,format=yuv420p[v]" -map "[v]" -map 0:a move66.mp4
3.
ffmpeg -y -i dr.wav -i bicut.mp4 -filter_complex "color=0x808080:s=1440x1080,format=rgb24,loop=-1:size=2,split[base1][base2];[0:a]showcqt=s=1440x1080:basefreq=73.41:endfreq=1567.98,format=rgb24,geq='if(lte(X,640)*lte(Y,360),p(233,363),if(gt(X,640)*lte(Y,360),p(333,363),if(lte(X,640)*gt(Y,360),p(500,363),if(gt(X,640)*gt(Y,360),p(633,363),128))))',setsar=1,colorkey=black:similarity=0.1[vcqt];[base1][vcqt]overlay[vcqt1];[1:v]scale=1440:1080,format=rgb24,setsar=1[bgv];[bgv][vcqt1][base2]displace=edge=mirror,format=yuv420p[v]" -map "[v]" -map 0:a movie3n.mp4
4. video wallx4
ffmpeg -y -i oooor.wav -i skullproject.mp4 -filter_complex "color=0x808080:s=1280x720,format=rgb24,loop=-1:size=2[base];[0:a]showcqt=s=1280x720:basefreq=73.41:endfreq=1567.98,format=rgb24,geq='p(X,363)',setsar=1,colorkey=black:similarity=0.1[vcqt];[base][vcqt]overlay,split[vcqt1][vcqt2];
[1:v]scale=1280:720,format=rgb24,setsar=1[bgv];[bgv][vcqt1][vcqt2]displace=edge=blank,format=yuv420p[v]" -map "[v]" -map 0:a movie43.mp4
5.
ffmpeg -y -i dr.wav -i bicut.mp4 -filter_complex "color=0x808080:s=1440x1080,format=rgb24,loop=-1:size=2[base];[0:a]showcqt=s=1440x1080:basefreq=73.41:endfreq=1567.98,format=rgb24,geq='p(233,363)/4+p(333,363)/4+p(500,363)/4+p(633,363)/4',setsar=1,colorkey=black:similarity=0.1[vcqt];[base][vcqt]overlay,split[vcqt1][vcqt2];[1:v]scale=1440:1080,format=rgb24,setsar=1[bgv];[bgv][vcqt1][vcqt2]displace=edge=blank,format=yuv420p[v]" -map "[v]" -map "0:a" ri3.mp4
6.
ffmpeg -y -i dr.wav -i bicut.mp4 -filter_complex "color=0x808080:s=1440x1080,format=rgb24,loop=-1:size=2,split[base1][base2];[0:a]showcqt=s=1440x1080:basefreq=73.41:endfreq=1567.98,format=rgb24,geq='(128-60/2)+mod(p(233,363)+p(333,363)+p(500,363)+p(633,363),60)',setsar=1,colorkey=black:similarity=0.1[vcqt];[base1][vcqt]overlay[vcqt1];[1:v]scale=1440:1080,format=rgb24,setsar=1[bgv];[bgv][vcqt1][base2]displace=edge=mirror,format=yuv420p[v]" -map "[v]" -map "0:a" shake.mp4
7.clean line displacement
ffmpeg -y -i dr.wav -i di.mp4 -filter_complex "color=0x808080:s=1440x1080,format=rgb24,loop=-1:size=2[base];[0:a]showcqt=s=1280x720:basefreq=73.41:endfreq=1567.98,format=rgb24,setsar=1,colorkey=black:similarity=0.1[vcqt];[base][vcqt]overlay,split[vcqt1][vcqt2];[1:v]scale=1440:1080,format=rgb24,setsar=1[bgv];[bgv][vcqt1][vcqt2]displace=edge=blank,format=yuv420p[v]" -map "[v]" -map '0:a' visual21.mp4
8.
ffmpeg -y -i dr.wav -i drex.mp4 -filter_complex "color=0x808080:s=2000x1500,format=rgb24,loop=-1:size=2[base];[0:a]showcqt=s=2000x1500:basefreq=73.41:endfreq=1567.98,format=rgb24,geq='p(X,363)',setsar=1,colorkey=black:similarity=0.1[vcqt];[base][vcqt]overlay,split[vcqt1][vcqt2];[1:v]scale=2000:1500,format=rgb24,setsar=1[bgv];[bgv][vcqt1][vcqt2]displace=edge=blank,format=yuv420p[v]
" -map "[v]" -map "0:a" displ.mp4
SHOW VIDSTAB MOTION VECTOR
ffmpeg -y -i skullproject.mp4 -vf "vidstabdetect=show=1" -an shown.mp4
ffmpeg -y -i skullproject.mp4 -vf "vidstabdetect=show=2" -an shown2.mp4"
SWAPPING VIDEOS - STROBBE
ffmpeg -y -i move.mp4 -i movie3.mp4 -filter_complex "[1:v]scale=1280:720,setsar=1[alpha];[0:v]curves=preset=color_negative[vf];[0:v][alpha]alphamerge[vt];[vf][vt]overlay=shortest=1" -an MOVIEE.mp4"
ZOOM PAN WITH DRAGGED PIXEL EDGES
ffmpeg -y -i gw.png -filter_complex "[0:v]scale=-1:1080,pad=1920:1080:(ow-iw)/2:(oh-ih)/2,loop=loop=-1:size=2,geq='p(X*2,Y*2)',setsar=1[v]" -map "[v]" -an -t 10 out.mp4
RGB SHIFT horizontally
ffmpeg -y -i radiacompress.mp4 -vf "rgbashift=rh=-50" -an radiashift.mp4
vertically
ffmpeg -y -i skullproject.mp4 -vf "rgbashift=rv=-50" -an rgbshif.mp4
green pixel horizontally
ffmpeg" -y -i skullproject.mp4 -vf "rgbashift=gh=-50" -an greenshift.mp4
SMEAR
ffmpeg -y -i skullproject.mp4 -vf "rgbashift=bv=-50:edge=smear" -an skullsmear.mp4
THRESHOLD
ffmpeg -y -i skullproject.mp4 -filter_complex "color=gray:s=1280x720:d=30[th];color=black:s=1280x720:d=30[ifle];color=white:s=1280x720:d=30[ifot];[0:v][th][ifle][ifot]threshold" result.mp4
ffmpeg -y -i skullproject.mp4 -filter_complex "color=gray:s=2000x1496:d=30[th];color=white:s=2000x1496:d=30[ifle];color=black:s=2000x1496:d=30[ifot];[0:v][th][ifle][ifot]threshold" resultr3.mp4
blue threshold
ffmpeg -y -i radiacompres.mp4 -filter_complex "color=gray:s=1280x720:d=30[th];color=blue:s=1280x720:d=30[ifle];[0:v]trim=0:30,setpts=PTS-STARTPTS[ifot];[0:v][th][ifle][ifot]threshold" resultbue.mp4
mix two videos using threshold could be interesting
ffmpeg -y -i skullcompres.mp4 -i radiacompres.mp4" -filter_complex "[1:v]trim=0:30,setpts=PTS-STARTPTS,fps=25,split[th][ifle];[0:v]trim=0:30,setpts=PTS-STARTPTS[ifot];[0:v][th][ifle][ifot]threshold" resultge.mp4
============================================================
# invert colors
ffmpeg -i in1.mp4 -vf "split [main][tmp]; [tmp] lutrgb="r=negval:g=negval:b=negval" [tmp2]; [main][tmp2] overlay" -y output.mp4
# red filter colors
ffmpeg -i in1.mp4 -vf "colorbalance=rs=.7" -y output.mp4
# bw filter
ffmpeg -i in1.mp4 -vf lutyuv="u=128:v=128" -y output.mp4
CROP JUMPING EFFECT
ffmpeg -i in1.mp4 -vf "crop=in_w/2:in_h/2:(in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10):(in_h-out_h)/2 +((in_h-out_h)/2)*sin(n/7)" -y output.mp4
EMBOSS
ffmpeg -i in1.mp4 -vf "format=gray,geq=lum_expr='(p(X,Y)+(256-p(X-4,Y-4)))/2'" -y output.mp4
MERGING TWO CLIPS OVER EACH OTHER
ffmpeg -y -i landtosea.mp4 -i landtosearev.mp4 -filter_complex "color=0xAAAAAA:s=1920x1080:d=24[mask];[0:v][1:v][mask]maskedmerge[v]" -map "[v]" -an out3.mp4
GRADATION MERGE
ffmpeg -y -i landtosea.mp4 -i landtosearev.mp4 -filter_complex "color=black:s=992x558:d=24,format=yuv444p,geq='lum=X*255/W:cr=128:cb=128'[mask];[0:v]scale=992:558,setsar=1[0v];[1:v]scale=992:558,setsar=1[1v];[0v][1v][mask]maskedmerge,format=yuv420p[v]" -map "[v]" -an outEE.mp4
--------------------------------------------------------------------------------------------------------
# flip horizontaly
ffmpeg -i in1.mp4 -vf "hflip" -y output.mp4
BRIGHTNESS/CONTRAST
Gamma correction is likely to be a better choice than brightness, to stretch the histogram to the right rather than push it over:
--tinker with numbers
ffplay -vf eq=gamma=1.5:saturation=1.3 original.vid
# render
ffmpeg -i original.vid -vf eq=gamma=1.5:saturation=1.3 -c:a copy outfile.vid
OTHER METHOD USING BRIGHTNESS
ffplay -vf eq=brightness=0.06:saturation=2 INPUT.MOV
ffmpeg -i INPUT.MOV -vf eq=brightness=0.06:saturation=2 -c:a copy OUTPUT.MOV
----------------------------------------------------------------
green and purple trippy hue
ffmpeg -i in1.mp4 -vf "hue=h=90:s=6" -y output.mp4
# add saturation
ffmpeg -i output.mp4 -vf eq=saturation=1.5 -y output2.mp4
INVERT COLOURS
ffmpeg -i in1.mp4 -vf "split [main][tmp]; [tmp] lutrgb="r=negval:g=negval:b=negval" [tmp2]; [main][tmp2] overlay" -y output.mp4
FISH EYE LENS
ffmpeg -i in.mp4 -vf "lenscorrection=cx=0.5:cy=0.5:k1=-0.727:k2=-0.822" out.mp4
# add text
ffmpeg -i in1.mp4 -vf drawtext="text='ALHA MBRA': fontcolor=white: fontsize=96: box=1: boxcolor=black@0.5: boxborderw=5: x=(w-text_w)/2: y=(h-text_h)/2" -y output.mp4
---------------------------------------------------------------------------------
​
TILE EFFECT
ffmpeg -i in6.mp4 -i in6.mp4 -i in6.mp4 -filter_complex "[0]scale=-1:720,format=rgba[v1]; [1]scale=-1:360,crop=360:360[v2]; [2] crop=360:440[v3]; [v1][v2]overlay=0:H/1.7[out1];[out1][v3]overlay=0:0 [out]" -shortest -map [out] -y -preset ultrafast output.mp4
-------------------------------------------------------------------------------
​
OVERLAY VIDEOS
ffmpeg -i in1.mp4 -i in2.mp4 -filter_complex "[0:0][1:0]overlay[out]" -shortest -map [out] -pix_fmt yuv420p -c:a copy -c:v libx264 -crf 18 output.mp4 OR MAYBE THE CODE BELOW WORKS
ffmpeg -i out360.mp4 -i out180.mp4 -filter_complex "[1:v]setpts=PTS+0.1/TB[a]; [0:v][a]overlay=enable=gte(t\,0.1):shortest=1[out]" -map [out] -c:v libx264 -crf 18 -pix_fmt yuv420p -t 20 -c:a copy -y output3.mp4
+ saturation
ffplay -i input.mp4 -vf "eq=contrast=1.5:brightness=-0.05:saturation=0.75"
---------------------------------------------------------------------------------------
​
STACK VIDEOS HORIZONTALLY HSTACK
ffmpeg -i input0 -i input1 -filter_complex vstack=inputs=2 output
AND VERTICALLY VSTACK
ffmpeg -i input0 -i input1 -filter_complex hstack=inputs=2 output
WITH A 5PX BORDER BETWEEN THEM
USING PAD FILTER
ffmpeg -i input0 -i input1 -filter_complex "[0]pad=iw+5:color=black[left];[left][1]hstack=inputs=2" output
SAME AS ABOVE BUT WITH AUDIO STREAM
Add the amerge filter to combine the audio channels from both inputs:
ffmpeg -i input0 -i input1 -filter_complex "[0:v][1:v]vstack=inputs=2[v];[0:a][1:a]amerge=inputs=2[a]" -map "[v]" -map "[a]" -ac 2 output
THREE VIDEOS
ffmpeg -i input0 -i input1 -i input2 -filter_complex "[0:v][1:v][2:v]hstack=inputs=3[v]" -map "[v]" output
If you want vertical use vstack instead of hstack.
2X2 GRID VIDEO
ffmpeg -i input0 -i input1 -i input2 -i input3 -filter_complex "[0:v][1:v][2:v][3:v]xstack=inputs=4:layout=0_0|w0_0|0_h0|w0_h0[v]" -map "[v]" output
DELAYING AND PAUSING EACH VIDEO IN THE GRID SO THEY PLAY ONE AFTER THE OTHER
---This example assumes each input has a stereo audio stream and each input is 5 seconds duration. Adjust start_duration and adelay values as needed.
ffmpeg -i top-left.mp4 -i top-right.mp4 -i bottom-left.mp4 -i bottom-right.mp4 -filter_complex "[1]tpad=start_mode=clone:start_duration=5[tr];[2]tpad=start_mode=clone:start_duration=10[bl];[3]tpad=start_mode=clone:start_duration=15[br];[0][tr][bl][br]xstack=inputs=4:layout=0_0|w0_0|0_h0|w0_h0[v];[1:a]adelay=5s|5s[a1];[2:a]adelay=10s|10s[a2];[3:a]adelay=15s|15s[a3];[0:a][a1][a2][a3]amix=inputs=4[a]" -map "[v]" -map "[a]" output.mp4
------------
create spectrogram one frame
ffmpeg -i INPUT.wav -lavfi showspectrumpic=s=hd480:legend=0,format=yuv420p SPECTROGRAM.png
slice SLICE VIDEOS IN STRIPS
# Slicebox 4x
ffmpeg -i video1.mp4 -i video2.mp4 -i video3.mp4 -i video4.mp4 -filter_complex "[0]scale=1920:1080,format=rgba[v1]; [1]scale=-1:1080,crop=480:1080[v2]; [2]scale=-1:1080, crop=480:1080[v3]; [3]scale=-1:1080,crop=480:1080[v4]; [v1][v2]overlay=0:0[out1]; [out1][v3]overlay=480:0 [out2]; [out2][v4]overlay=960:0[out3];[out3][v]overlay=1440:0[out]" -shortest -map [out] -t 5 -y output.mp4
PERSPECTIVE TWIST
ffplay -f lavfi -i testsrc -vf perspective=x0=200:y0=100:x1=200:y1=200:sense=destination
TEST PATTERN
ffplay -f lavfi testsrc2 -vf perspective=0:W:0:0:H:W:H:0:0:0,scale=1440:1080,crop=1200:720
​
BLACK AND WHITE 30FPS STROBE
ffmpeg -f lavfi -i nullsrc=s=1280x720:r=30:d=5 -filter_complex "geq=(N-2*trunc(N/2))*255:128:128" -crf 0 30fps.mp4
============================================================
WATERMARK
ffmpeg -i input.mp4 -i input.png -filter_complex "overlay=50:50" output.mp4
============================================= USEFUL EXPERIMENTAL COMMANDS==============================================================
ACOLOR WAVE FORM GRAPH
ffmpeg -i 44.avi -filter_complex "waveform=intensity=0.1:mode=column:mirror=1:c=1:f=5:graticule=green:flags=numbers+dots:scale=0" 44-waveform-acolor.avi
CHANGE F OPTION NUMBER FOR DIFFERENT EFFECT. 4 will give no lines and just image. 3 will give image tilted more towards viewer. CHANGING C OPTION does similiar. C 7 GIVES Red white blue 3 layer
NO GRATICULE AND HQ
ffmpeg -i 44.avi -filter_complex "waveform=intensity=0.1:mode=column:mirror=1:c=1:f=5:flags=numbers+dots:scale=0" -c:v libx264 44-waveform-acolor.avi
NO GRATICULE HQ AND BEST VERSION
ffmpeg -i 44.avi -filter_complex "waveform=intensity=0.1:mode=column:mirror=1:c=4:f=4:flags=numbers+dots:scale=0" -c:v libx264 44-waveform-acolor.avi
-------------------------------------------------------------------------------------------------------
BIT STEAM PACKET REMOVER
-bsf noise=1000
------------------------------------------------------------------------------------------------------
REVERSE A VIDEO
ffmpeg -i video.mp4 -vf reverse -c:v libx264 reversedvideo.mp4
-------------------------------------------------------------------------------
SPEED UP/DOWN
-i input.mp4 -vf "setpts=0.5*PTS" output2xspeed.mp4
----------------------------------------------------------------------------------
UPSCALING
ffmpeg -i input.mp4 -vf scale=1920x1080:flags=lanczos output_1080p.mp4
BEATSWAP COMMMANDS
beatswap -i 22.wav -o 22beatswapped.wav -b 0.3 -s aaabbbcccdddeeefffggghhhiiijjjkkklllmmmnnnooopppqqqrrrssstttuuuvvvwwwxxxyyyzzz
---------------------------------------------------------------------------------------------------
EXTRACT ALL FRAMES AS IMAGES FROM AVIDE
ffmpeg -i "Blue Angels Fly By.mp4" -vf fps=30 "Blue Angels Fly By %d.png"
RESCALING
use following commands to do rescaling for videos and images. For fixed width and height -
ffmpeg -i input.avi -vf scale="720:480" output.avi
and if you want to retain aspect ratio just give height as -1 and it will automatically resize based on the width -
ffmpeg -i input.avi -vf scale="720:-1" output.avi
If you want to scale based on input size Eg. lets say reduce the width/height yo half you can do-
ffmpeg -i input.avi -vf scale="iw/1:ih/2" output.avi
------------------------------------------------------------------------------------------
CREATE SERIES OF THUMBNAILS OUT OF AVIDEO USING I-FRAME METHOD
The following command will create one thumbnail image every I-frame, named yi01.png, yi02.jpg, yi03.png...yi116
ffmpeg -i yosemiteA.mp4 -f image2 -vf "select='eq(pict_type,PICT_TYPE_I)'" -vsync vfr yi%03d.png
"select='eq(pict_type,PICT_TYPE_I)'": extracts I-frame image
vsync: video sync method.
vfr: variable frame rate.
--------------------------------------------------------------------------------------------
CONCATENATE and add audio
ffmpeg -y -i video1.mp4 -i video2.mp4 -i video3.mp4 -i sound_track.mp3 -filter_complex "[0:v:0] [1:v:0] [2:v:0] concat=n=3:v=1:a=0 [v]" -map "[v]" -map 3:a -c:v libx264 -shortest output.mp4
ffmpeg -y -i short.avi -i short.avi -i short.avi -i short.avi -i short.avi -i short.avi -i short.avi -i short.avi -i short.avi -i m.wav -filter_complex "[0:v:0] [1:v:0] [2:v:0] [3:v:0] [4:v:0] [5:v:0] [6:v:0] [7:v:0] [8:v:0] concat=n=9:v=1:a=0 [v]" -map "[v]" -map 9:a -c:v libx264 game2.avi
CONCATENATE SHORT VERSION
ffmpeg -i video.mp4 -i audio.m4a -map 0:v -map 1:a -c copy -shortest output.mp4
--------------------------------------------------------------------------------------------------
--0--------------------------------STABILIZER VIDSTAB---------------------------------------
1st step pass to get info about vid
default values
ffmpeg -i input.mp4 -vf vidstabdetect -f null -
try this
ffmpeg -i SEATON.mp4 -vf vidstabdetect=stepsize=6:shakiness=10:accuracy=15:result=transform_vectors.trf -f null -
final pass(smoothing can go up to 30 for jello)
ffmpeg -i SEATON.mp4 -vf vidstabtransform=input=transform_vectors.trf:zoom=0:smoothing=30,unsharp=5:5:0.8:3:3:0.4 -vcodec libx264 -tune film -preset slow SEATONstabilized.mp4
example from site with high smoothig
ffmpeg -i input.mp4 -vf vidstabtransform=smoothing=30:input=transform_vectors.trf out_stabilized.mp4
----------------------------------------------------------------------------------------
convert to divx
ffmpeg -i eddie.avi -c:v mpeg4 -q:v 5 -tag:v DIVX -s 640x480 -c:a libmp3lame -q:a 5 -ac 2 -ar 44100 eddie2.avi
------------MINTERPOLATE MINTERPOLATE------------------------
ffmpeg -i looney.avi -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=120'" looneyminterpolate.avi
alhambra patio of lions farther away loop of lionsx10loop
ffmpeg -i looney.avi -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=180'" looneyminterpolate.avi
this command could be for hq version as compared to above
ffmpeg -i looney.avi -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=180'" -c:v libx264 looneyminterpolate.avi
NEW VERSION FROM YOUTUBE VID 4step search
ffmpeg -i looney.avi -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=180:me=fss'" looneyminterpolate.avi
DIAMOND SEARCH
ffmpeg -i lion.avi -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=180:me=ds'" -q:v 0 liondimeser.avi
asSUREs QUALITY IS GOOD(CRF COMMAND)
ffmpeg -i dunpack.avi -filter:v "minterpolate='mi_mode=mci:mc_mode=aobmc:vsbmc=1:fps=180:me=ds'" -crf 0 ddiamoncrf9.avi
try this
ffmpeg -i lion.avi -filter:v "minterpolate='me_mode=bilat:mc_mode=aobmc:vsbmc=1:fps=60:me=epzs'" -q:v 0 liondimeseer.avi
OUPUT ONE IMAGE WITH SOUND
ffmpeg -loop 1 -y -i DSCF9546.jpg -i ame.WAV -acodec copy -vcodec libx264 ONEIMAGONESOUN.AVI
ffmpeg -loop 1 -y -i DSCF9546.JPG -i AME.WAV -shortest video.mp4
MACROBLOCK AND COLOUR EXTRACTER
ffmpeg -debug vis_mb_type -i SEATON.MP4 SEATONMACROBLOC.mp4
-------------------BUTTERFLOW----------------------------
slowing down so it runs at fourth of original speed
ffmpeg -i lion.avi -vf setpts=4*PTS -an lionfourth.avi
speed it up use 0.5PTS
make a video with 4x the frames
butterflow -s a=0,b=end,spd=0.25 <video>
th butterflow -s a=0,b=end,fps=200 <video>
creat 200frames for 1sec
butterflow -r 2x [input-file] -o [output file]
REMEMBER TO FIND OUT HOW TO EXPLICITLY STATE X264
ffmpeg -i input.webm -c:v libx264 -preset ultrafast -crf 23 output.mp4
ëwarning, 24í FFPLAY COMMAND TO SHOW WARNING AND ERRORS
other use of command...........ffmpeg -i video.mp4 -filter:v "minterpolate=fps=60" -c:a copy output.mp4
------------------------------------------------------------------------------------------------------------
GENERATE CELLULAR AUTOMATON
ffmpeg -f lavfi -i cellauto=s=640x360:rule=15:r=50 \
-vf scale=1280x720 -bsf noise=1000 -r 30 -f mpegts \
-c:v h264 -crf 31 -preset ultrafast -tune zerolatency - | \
ffplay -i - -loglevel quiet -fs -vf tblend=all_mode=darken
---------------------------------------------------------------------------
​
ISOLATE MOTION BLOCK VECTORS
"
MINTERPOLATE CUT AND PASTE PAGE WEB
Example Usage
Altering the frame rate (the global playback rate):
Examples:
Double a video's frame rate with butterflow -r 2x <video>.
-r, or --playback-rate, sets the global playback rate.
-r 3x would triple the frame rate, -r 4x would quadruple the frame rate, etc.
Set a video's frame rate to 60fps with butterflow -r 60 <video>.
Set a fractional frame rate: butterflow -r 23.976 <video>.
This command is the same as butterflow -r 24/1.001 <video>.
Note: In general frames will be interpolated if the frame rate is increased, otherwise they'll be dropped. The video's original rate will be used if -r is not set (an X fps input video will yield an X fps output video).
shaping a sonic bodyóan ecstatic ìliving somethingî rendering audiblE/visible the human through the eye of technology -
describing a human/techno state of being. an abstraction of the human condition, a hystericized form --- dismantling mind and body series of works
video with motion vectors on top
ffmpeg -v error -flags2 +export_mvs -i foo.mp4 -vf codecview=mv=pf+bf+bb -y mv.mp4
​
TRACERS
ffmpeg -i input.MOV -vf lagfun output.MOV
motion blur
ffmpeg -i input.mp4 -vf tmix=frames=8:weights="1 1 1 1 1 1 1 1" output.mp4
remove all colours exept one
ffmpeg -i input.mp4 -vf "colorhold=color=00FFFF:similarity=1" -pix_fmt yuv420p output.mp4
animating thru hue colour s of video
ffmpeg -i input.mp4 -vf "hue=H=2*PI*t:s=cos(2*PI*t)+10" output.mp4
​
turn video black and white
ffmpeg -i input.mp4 -vf "hue=s=0" output.mp4
FLICKERING CANDLELIGHT EFFECT
ffmpeg -i ev.mp4 -vf vignette='PI/4+random(1)*PI/50':eval=frame,eq=contrast=1.2:brightness=0:saturation=1:gamma=1:gamma_r=1:gamma_g=1:gamma_b=1.1:gamma_weight=1 08i.mp4
​
vignette
ffmpeg -i input.mp4 -vf "vignette" output.mp4
30 degree vignette ......fmpeg -i input.mp4 -vf "vignette=angle=PI/6" output.mp4
invert colour
ffmpeg -i input.mp4 -vf "negate" output.mp4
red blue greenshift
ffmpeg -i input.mp4 -vf "rgbashift=rh=-10" -pix_fmt yuv420p output.mp4
ffmpeg -i input.mp4 -vf "rgbashift=bh=10" -pix_fmt yuv420p output.mp4
ffmpeg -i input.mp4 -vf "rgbashift=gv=10" -pix_fmt yuv420p output.mp4
saturation
ffmpeg -i input.mp4 -filter_complex "vibrance=intensity=2" -pix_fmt yuv420p output.mp4
ffmpeg -i input.mp4 -filter_complex "vibrance=intensity=-2:gbal=10" -pix_fmt yuv420p output.mp4
generate a color pallete from a video, then use on another video
ffmpeg -i input.mp4 -vf "palettegen" palette.png
ffmpeg -i input2.mp4 -i palette.png -filter_complex "paletteuse" -c:v libx264 -pix_fmt yuv420p output.mp4
​
SCROLLING TEXT starwarstyle
input.MOV -vf "drawbox=t=fill,drawtext=textfile=prologue.txt:x=20:y=h-80*t:fontsize=50:fontcolor=yellow,drawbox,perspective=W/4:H/8:W-(W/4):H/8:0:H:W:H:sense=destination"
​
randomize frames
ffmpeg -i /content/test.mp4 -vf "random=frames=4:seed=5" -vcodec libx264 -pix_fmt yuv420p /content/random-4.mp4
frames sets number of frames in cache 512 is maximum
seed is random seed generator
​
old grainy look
ffplay -i rivercows2k.mp4 -vf hue=s=0,boxblur=lr=3.9,noise=c0s=19:allf=t
​
watching tv look
ffmpeg -i input.MOV -vf "drawbox=t=20,drawgrid=h=10,perspective=0:0:W-(W/20):H/20:0:H:W-(W/20):H-(H/20):sense=destination,boxblur=3:1" boomertv.MOV
​
matrix look histrogram of colour space
~/matrixbench_mpeg2.mpg -vf "split[a][b];[a]waveform=e=3,split=3[c][d][e];[e]crop=in_w:20:0:235,lutyuv=v=180[low];[c]crop=in_w:16:0:0,lutyuv=y=val:v=180[high];[d]crop=in_w:220:0:16,lutyuv=v=110[mid] ; [b][high][mid][low]vstack=4"
​
drop every other frame
ffmpeg -i input.MOV -an -vcodec rawvideo -pix_fmt yuv420p rawbitstream.yuv
Step 2: ffmpeg -r 2 -s WxH -i rawbitstream.yuv -filter:v select="mod(n-1\,2)" -c:v rawvideo -r 1 -format rawvideo -pix_fmt yuv420p -an odd.yuv Step 3: ffmpeg -r 2 -s WxH -i rawbitstream.yuv -filter:v select="not(mod(n-1\,2))" -c:v rawvideo -r 1 -format rawvideo -pix_fmt yuv420p -an even.yuv Step 4: ffmpeg -s 1920x1080 -i even.yuv even.MOV ffmpeg -s 1920x1080 -i odd.yuv odd.MOV Step 5: ffmpeg -i even.MOV -vf "setpts=1.67*PTS" Slowed-even.MOV ffmpeg -i odd.MOV -vf "setpts=1.67*PTS" Slowed-odd.MOV
​
remove duplicate frames
Use the mpdecimate filter, whose purpose is to "Drop frames that do not differ greatly from the previous frame in order to reduce frame rate."
-
This will generate a console readout showing which frames the filter thinks are duplicates.
ffmpeg -i input.mp4 -vf mpdecimate -loglevel debug -f null -
-
To generate a video with the duplicates removed
ffmpeg -i input.mp4 -vf mpdecimate,setpts=N/FRAME_RATE/TB out.mp4
​
endless loop clip fade in/over itself
ffmpeg -i dd.mp4 -filter_complex "[0]trim=end=1,setpts=PTS
-STARTPTS[begin];[0]trim=start=1,setpts=PTS-STARTPTS[end];[end][begin]xfade=fade:duration=0.5:offset=2.5" output.mp4
​
XFADE IN CLIPS
ffmpeg -i swanssunsetMOTVEX2k.mp4 -i rivercows2K.mp4 -filter_complex "[0][1]xfade=transition=distance:duration=10:offset=4.5" wer.mp4
​
chroma key
ffmpeg -i vid.mp4 -i overlay.mp4 -filter_complex '[1:v]colorkey=0x000000:0.1:[ckout];[0:v][ckout]overlay[out]' -map '[out]' out.mp4
​
black white video noise
ffmpeg -f lavfi -i nullsrc=s=2000x1500 -filter_complex \ "geq=random(1)*255:128:128;aevalsrc=-2+random(0)" \ -t 5 output.mkv
​
colour video noise
ffmpeg -f rawvideo -video_size 2000x1500 -pixel_format yuv420p -framerate 30 \ -i /dev/urandom -ar 48000 -ac 2 -f s16le -i /dev/urandom -codec:a copy \ -t 5 output.mkv
​
noise over top of video
ffmpeg -i input.mp4 -codec:v huffyuv -bsf:v noise=2 -codec:a copy noise.mkv
​
noise over top of video and the audio
ffmpeg -i input.mp4 -codec:v huffyuv -c:a pcm_s16le -bsf noise=1000000 noise.mkv
ffmpeg -i input.mp4 -codec:v huffyuv -c:a pcm_s16le -bsf:v noise=1000000 -bsf:a noise=100 noise.mkv
------damaged so reencode----> ffmpeg -i noise.mkv -codec:v libx264 -pix_fmt yuv420p output.mkv
​
vintage tv effect
→ ffmpeg -i input.mp4 -vf drawbox=t=20,drawgrid=h=10,boxblur=3:1,format=gbrp,lenscorrection=k1=0.1,format=yuv420p output01.mp4 with: * -i input.mp4 = Reads file «input.mp4» … * -vf = … and starts a series of video filters (vf)… * drawbox=t=20 = Draws a 20 pixels wide black box around the video … * drawgrid=h=10 = … and adds black horizontal lines every 10 pixels. * boxblur=3:1 = … Now blurs the video for a vintage touch… * lenscorrection=k1=0.1 = … and shapes the video to look like an old TV screen. * format=gbrp = The video is converted to the RGB (gbrp) color scheme BEFORE being used by the “lenscorrection” filter since would result otherwise in a green background. When using lenscorrection, if the output pixel has no corresponding value, it is populated with 0. In the YUV format, 0 is a shade of green. * format=yuv420p = The video is converted after back to YUV (yuv420p)... * output01.mp4 = … and final result outputted to file «output01.mp4»
​
black and white ancient tv
-i input.mp4 -vf drawbox=t=20,drawgrid=h=10,boxblur=3:1,format=gbrp,lenscorrection=k1=0.1,format=yuv420p,hue=s=0,vignette='PI/4+random(1)*PI/50':eval=frame,eq=contrast=1.2:brightness=0:saturation=1:gamma=1:gamma_r=1:gamma_g=1:gamma_b=1.1:gamma_weight=1 output01.mp4
​
countdown timer on screen with video
* -i input.mp4 = Reads file «input.mp4» and … * -vf drawtext = … calls the «drawtext» video filter (vf) to draw a text on a video. * fontfile='C\:\\Windows\\fonts\\Arial.ttf' = Sets to use the “Arial” font (note here the full path to the font!)… * text='%{eif\:trunc(mod(((3600-t)/3600),24))\:d\:2}\:%{eif\:trunc(mod(((3600-t)/60),60))\:d\:2}\:%{eif\:trunc(mod(3600-t\,60))\:d\:2}' = … and the countdown format to HH:mm:ss starting from 1 hour (3600 seconds) * fontcolor=cyan = Sets the font color to “Cyan” and … * fontsize=80 = … the font size to “80”… * x=10:y=150 = Sets the countdown text position to x = 10, y =150 and … * output02.mp4 = … and outputs the result to file «output02.mp4»
​
SKEWED WITH DRAGGED PIXELS
ffmpeg -i input.mp4 -vf perspective=0:0:1280:0:0:720:1280:350:sense=destination output01.mp4
WITHOUT
ffmpeg -i input.mp4 -vf drawbox=t=1,perspective=100:10:W-100:20:300:H-50:W-150:H-20:sense=destination output02.mp4
​
ffmpeg -loop 1 -i input.jpg -vf zoompan=z='if(lte(zoom,1.0),1.5,max(1.001,zoom-0.0023))':x='max(1,iw/2-(iw/zoom/2))':y='max(1,ih/2-(ih/zoom/2))':d=300:s=hd1080' -t 10 -pix_fmt yuv420p output05.mp4 with: * x='max(1,iw/2-(iw/zoom/2))' = Sets «x» horizontal position for zoomed out video to be centered. * y='max(1,ih/2-(ih/zoom/2))' = Sets «y» vertical position for zoomed out video to be centered.
​
INFRApredator
-i input.mp4 -vf "curves=r='0.42/0 0.62/1':g='.24/1 .76/.5 .9/0 1/1':b='0/1 .24/0 .76/0 1/1'" -pix_fmt yuv420p output01.mp4
​
CREDITS ON END OF VIDEO
ffmpeg -i input.mp4 -vf drawtext="textfile=thanks.txt:x=(w-text_w)/2:y=h-20*t:fontfile=_FX/fonts/arial.ttf :fontsize=28: fontcolor=white" output03.mp4
​
RUN MULTIPLE COMMANDS ONE AFTER THE OTHER
→ for %f in ("*.avi") do ffmpeg -i "%f" -s 1920x1080 "%~nf.mp4"
with:
* %f = Our filename variable
* for %f in ("*.avi") do = For every *.avi files in the ffmpeg.exe folder, …
* ffmpeg -i "%f" -s 1920x1080 = … execute the "ffmpeg conversion to .mp4" command seen earlier…
* "%~nf.mp4" = … outputting the result to the same filename with extension .mp4 this time. Note: all files will end up in the same folder
MORE OPTIONS
→ for %f in (“INPUT/*.avi") do ffmpeg -i "%f" -s 1920x1080 “%~nf.mp4"
with:
* INPUT/ = Specify input folder for *.avi files (relative path)
→ for %f in (“INPUT/*.avi") do ffmpeg -i "%f" -s 1920x1080 “OUTPUT/%~nf.mp4"
with:
* OUTPUT/ = Specify output folder for *.mp4 files (relative path)
→ for %f in ("C:\INPUT\*avi") do ffmpeg -i "%f" -s 1920x1080 "C:\OUTPUT\%~nf.mp4"
with:
* C:\INPUT\ = Specify full path to output files
* C:\OUTPUT\ = Specify full path to input files
DISPLACEMENT MAP
ffmpeg -i IN.mp4 -i IN.mp4 -i IN.mp4 -c:v hevc -crf 40 -b:v 20k -filter_complex "[0][1][2]displace=edge=wrap[middle];[middle]stereo3d=ar" -y res.mp4
​
extract keyframes
ffmpeg -i video.mp4 -vf "select=eq(pict_type\,I)" -vsync vfr frame-%08d.png
​
echo
ffmpeg -i ev.mp4 -ss 00:00:00.01 -i ev.mp4 -ss 00:00:00.15 -i ev.mp4 -filter_complex "[0][1]blend=all_mode=lighten[a];[1][2]blend=all_mode=lighten[b];[a][b]blend=all_mode=lighten[p];[0][p]blend=all_mode=lighten[o]" -map "[o]" -c:v h264 -crf 15 evblend.mp4
STEREOSCOPIC
ffplay -i winter3slowlagfun.mp4 -vf stereo3d=sbs2l:arcc
-vf stereo3d=sbs2l:arch
-vf stereo3d=sbs2l:arcd
-vf stereo3d=sbs2l:arcg
letterbox width -vf stereo3d=tbl:aybc
side2side L ontop R onbottom -vf stereo3d=abl:sbsr
‘mr’ (right eye only) -vf stereo3d=abl:mr use on 4k
‘ml’ (left eye only) -vf stereo3d=abl:ml
‘irl’ interleaved rows -vf stero3d=abl:irl
‘irr’ interleaved rows
‘al’ alternating frames strobe. -vf stereo3d=abl:al
‘ar’ alternating frames stobe -vf stereo3d=abl:ar
above-below -vf stereo3d=abl:ab2l
-vf stereo3d=abl:tb2l
above-below
-vf stereo3d=abl:ab2r
-vf stereo3d=abl:tb2r
​
subtle 3D
ffplay -i winter1NORMALSPEED.mp4 -vf stereo3d=ar:arch
​
WIDEANGLEfrom 4k
ffmpeg -i b.mp4 -filter:v "crop=4608:2592:0:0" 5.mp4
ffplay -i winter2ndday4Ktwarpx5p.mp4 -vf stereo3d=irl:al
ffplay -i winter2ndday4Ktwarpx5secondhal.mp4 -vf stereo3d=irl:ml
​
EXTRACT FRAMES AND MOSIAC
extract scene - ffmpeg -i wintertime.mp4 -vf select='gt(scene\,0.4)',scale=160:120,tile -frames:v 1 winterpreview.png
select every 400th frame -- ffmpeg -ss 00:00:05 -i wintertime.mp4 -frames 1 -vf "select=not(mod(n\,400)),scale=160:120,tile=6x5" tile.png
​
CHOPPING A SECTION OUT OF A VIDEO
ffmpeg -i WINTERSLOW.mp4 -ss 00:00:07.5 -to 00:04:05 -c copy winterslowcut.mp4
CHOPPING SECTION OF AUDIO OUT
ffmpeg -ss 00:00:00.00 -t 30 -i WINTER.WAV -ab 256k -y Alone-Sistar.wav
​
COLOURBALANCE. R. G. B
-vf colorbalance=-0.2:0:0:-0.4:0:-0.1:-0.2:0:0
​
COLOUR Grading FINE TUNE
-vf eq=gamma_r=1:gamma_g=1.2:gamma_b=1.2:saturation=1:contrast=1
​
Crop: ffmpeg -i input.mp4 -filter:v "crop=1280:720:0:0" output.mp4
Watermark: ffmpeg -i input.mkv -i watermark.png -filter_complex "overlay=50:50" Chroma Key: ffmpeg -i input.mkv -c:v vp9 -filter:v "chromakey=0x00ff00:0.1:0.2"
Overlay VideoPIP: ffmpeg -i input.mkv -i input2.mkv -filter_complex "[0:v][1:v] overlay=25:25"
​
ISOLATE A COLOUR - R - G - B
ffplay -i "color-pattern.jpg" -vf "colorhold=0xFF0000:similarity=0.25"
ffplay -i "color-pattern.jpg" -vf "colorhold=0x00FF00:similarity=0.25"
ffplay -i "color-pattern.jpg" -vf "colorhold=0x0000FF:similarity=0.25"
ISOLATE WITH SOFTEN
ffplay -i "color-pattern.jpg" -vf "colorhold=0xFF0000:similarity=0.25:blend=.30"
ffplay -i "color-pattern.jpg" -vf "colorhold=0x00FF00:similarity=0.25:blend=.30"
ffplay -i "color-pattern.jpg" -vf "colorhold=0x0000FF:similarity=0.25:blend=.30"
​
VIRTUAL BINAURAL ACOUSTICS
ffmpeg -i input.wav -af sofalizer=/path/to/sofa/file output.flac
DECIMATE
ffmpeg -i VIDEO.mp4 -vf "crop=w=1440:h=1080,hue=H='t/10':s=4,tmix=frames=5:weights='-0.96 0 0 0 1',decimate=cycle=2,decimate=cycle=2,decimate=cycle=2,minterpolate=fps=30,setpts=PTS*1.1,vignette" -an -crf 12 video.mp4
SOBEL EFFECT
-vf "sobel,eq=saturation=0.2,tmix=frames=15:weights='0.6 0 0 0 0 0 0 0 0.8 0.2 0 0 0 0.2 1.0',lagfun=decay=0.5

PSYCH DUSK
ffmpeg -i video.mkv -vf "crop=w=720:h=540,tblend=all_mode=grainmerge,tblend=all_expr=A+(B*(T/100)),tmix=frames=25:weights='0.2 0 0 0 0 0 0.4 0 0 0 0 0 0.6 0 0 0 0 0 0.8 0 0 0 0 0 1',format=yuv420p,boxblur=lp=0.4,scale=s=2880x2160:flags=gauss,scale=s=1440x1080" -crf 14 maybe.mp4


Created blurred video
ffmpeg -i video.mp4 -vf "crop=w=720:h=540,scale=s=180x135,chromashift=crh=4:cbh=-4:crv=-2:cbh=2,scale=s=1440x1080,boxblur=lp=20,tmix=frames=5:weights='0.2 0.4 0.6 0.8 1.0" video_blurred.mp4
Create scaled video
ffmpeg -i video.mp4 -vf crop=w=720:h=540,scale=s=1440x1080 -vcodec ffv1 video_scaled.mkv
smoosh em together with effects
ffmpeg -i video_blurred.mp4 -i video_scaled.mkv -filter_complex "blend=all_mode=overlay,tblend=all_mode=overlay,lagfun=decay=0.9,vignette" videooutput.mp4
FRAGMENT BLOCKS
ffplay -f lavfi -i "amovie=input.wav,asplit[a][out1];[a]showcqt=s=1440x1080:bar_t=0:axis=0:fps=25,sobel,shufflepixels=mode=block:w=144:h=108:seed=336,hue=H=5.5,tmix=frames=2:weights='0.99, 1',vignette[out0]"


ffmpeg -i "2021-02-16 17-56-42.mkv" -vf "shuffleframes='0 1 2 4 3 5 6 7 10 9 8 11 12 16 13 14 15',shufflepixels" -crf 12 video.mp4
ffmpeg -i rule_110.mp4 -vf geq=r='sin(T*X)*r(X,Y)':g='(1/sin(T*Y))*g(X,Y)':b='cos(T*X*Y)*b(X,Y)' geq.mp4


ffmpeg -i "input.mp4" -vf crop=w=1440:h=1080,hue=H=sin(t):s=4,lagfun=decay=0.99 -crf 12 more_train_step1.mp4


ffmpeg -i more_train_step1.mp4 -vf decimate=cycle=2,decimate=cycle=2,decimate=cycle=2 -crf 12 -an more_train_step2.mp4


ffmpeg -i more_train_step2.mp4 -vf minterpolate=fps=60:mi_mode=mci:scd=none -r 60 -crf 12 more_train_step3.mp4


"scale=w=1440:h=1080,deshake,boxblur=chroma_radius=0.5,hue=H=sin(t/3):s=10,tmix=frames=5:weights=0.8 0.0 0.0 0.0 1.0" -crf 18 -y -shortest output.mp4


ffmpeg -i input.mp4 -vf "prewitt,scale=w=1440:h=1080,eq=saturation=0,pseudocolor=p=magma,hue=H=tan(t),eq=saturation=2" output.mp4


ffmpeg -i "d8PXyOXTCwogw8VLZ2L4--JPTRM (1).mp4" -vf "minterpolate=fps=30,scale=s=1440x1080,cas,hue=s=1.5" -crf 12 walled_city_minterpolate_30.mp4
ffmpeg -i walled_city_minterpolate_30.mp4 -i guitar_take.wav -shortest -vcodec copy -ab 256k test.mp4
​
​
​
​
​
​
​
​