Interesting things you can do with FFmpeg
Interesting things you can do with FFmpeg. convolution, debug, audi
Download a sample mp4 file and rename it to input.mp4
:
wget http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4
mv ElephantsDream.mp4 input.mp4
Convolution (kernels)
Apply edge enhance
Apply edge detect
ffmpeg -i input.mp4 -vf convolution="0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:0 1 0 1 -4 1 0 1 0:5:5:5:1:0:128:128:128" -c:a copy -c:v h264_nvenc output.mp4
Apply embos
ffmpeg -i input.mp4 -vf 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" -c:a copy -c:v h264_nvenc output.mp4
Apply blur
ffmpeg -i input.mp4 -vf convolution="1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1 1 1 1 1 1 1 1 1:1/9:1/9:1/9:1/9" -c:a copy -c:v h264_nvenc output.mp4
Generate macroblock (debug video)
ffmpeg -flags2 +export_mvs -i input.mp4 -vf codecview=mv=pf+bf+bb output.mp4
Extract Audio
ffmpeg -i input.mp4 -b:a 320K -vn output-audio.mp3
Sources: