ffmpeg examples

Here is a dumping ground for ffmpeg settings I have used as I am sick of loosing them.

Docs: https://ffmpeg.org/ffmpeg-filters.html

Negate and scale

/ffmpeg -i ../Pictures/Monochromo.mov -ss 00:26:06 -vf 'negate=1,scale=1920:1080' -t 00:24:39 -r 25 -vb 20M negative.mov

This also shows how to make a clip from a point in time for a give length time.

Colour, Saturation, Gamma etc:

ffmpeg -i all.MTS -c:v libx264 -c:a libfaac -vf mp=eq2=1:1.68:0.3:1.25:1:0.96:1 foo.mp4

Based on this template:

-vf mp=eq2=gamma:contrast:brightness:saturation:rg:gg:bg:weight

Yellow, contrasty inverted:

/ffmpeg -i ../Pictures/Monochromo.mov -ss 00:26:06 -vf '[in]negate=1[o1],[o1]scale=1920:1080[o2],[o2]unsharp[o3],[o3]mp=eq2=1:1.0:0.0:1.25:1:0.4:0.1[o4]' -t 00:24:39 -r 25 -vb 40M /Volumes/Seagate-1/negative.mov 

Spectrogram

./ffmpeg -f  lavfi -i 'amovie=1-Hour.mp3,asplit=3[out1][a][b]; [a]showspectrum=s=1920x540:slide=1,pad=iw:ih*2[waves]; [b]showspectrum=s=1920x540:slide=1[spectrum]; [waves][spectrum] overlay=0:h [out0]' -i 10-Hours.mp3  -r 24 -s 1920x1080 -strict -2  -acodec mp3 -ab 320k -t 365 -vf "histeq,unsharp,crop=iw/2:ih:iw:0,split[tmp],pad=2*iw[left]; [tmp]hflip[right]; [left][right] overlay=W/2, crop=iw:ih/2:0:0,split[tmp1],pad=0:2*ih[top]; [tmp1]vflip[bottom]; [top][bottom] overlay=0:H/2" /Volumes/Seagate-1/sample.mov

drop histeq and unsharp to make it more cool and dark looking.

Stereogram

./ffmpeg -i x.mp3 -filter_complex "[0:a]avectorscope=s=1920x1080:bc=200:gc=100:rc=75:bf=5:gf=3:rf=1:zoom=2,format=yuv420p[vid]" -map "[vid]" -map 0:a -codec:v libx264 -crf 1 -preset fast -acodec copy -strict -2  BWV-1031-I.mov

Motion blur to remove noise

./ffmpeg -i IMG_2192.MOV -vf  "yadif,hqdn3d=2.0:2.0:10:10,scale=1280:720" -strict -2 output.mp4

Emboss/Engrave

convolution="-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2:-2 -1 0 -1 1 1 0 1 2"


Brexit Is Intellectually And Morally Bankrupt

To leave the EU is to act against the interests of Britain and its people. It is to act against the good of the world. It is to act against the fundamental principles which saved our world from disaster and for which our fathers, mothers and grandparents fought and died.
We can choose to do the right thing for us and for our children. We can choose to do what our greatest leader stated we must.
Or we can follow what a idiot calling himself 'Boris' and his self serving cronies say we must.
You choose, I choose, we all choose. Choose wisely.
Whilst Churchill, at the end of the above quoted speech hinted at Great Britain being outside and supporting his vision, this is not the same as us now trying to leave the EU. Some work must be done to ensure 'ever closer union' does not extinguish those states which do not wish to be part of that structure; I have no doubt that Britain is one who does not. Nevertheless, to help reform, strengthen and sustain the EU and maintain the great man's vision we must remain within the EU and support it from the inside. We and this most essential of projects will be mortally wounded by the folly of isolationist, 19th century thinking.

Too Many Words

The greatest gain and loss of the digital age is word count. Through twitter and email we learn to communicate with extreme brevity whilst word processing results in articles and theses exploding into piles of unnecessary and unloved words.

Enough said.