FFmpeg: Make a CRT SCAN Lines Filter

FFmpeg CRT Lines

FFmpeg CRT Lines

ffmpeg -loglevel debug -y -f lavfi -i color=c=black:s=1216x896 -filter_complex "movie='scanline_pattern_croped.png'[spc];movie='main.png',format=rgba,scale=iw:ih*4:flags=neighbor,scale=iw*4:ih:flags=bilinear[in0];[in0][spc]blend=all_mode=softlight:all_opacity=0.15[frame];[0][frame]overlay[o]" -map "[o]" -frames:v 1 output.png
ffmpeg -loglevel debug -y -f lavfi -i color=c=black:s=618x360 -filter_complex "movie='scanline_pattern_croped_360p.png',scale=618:360[spc];movie='input.mp4',format=rgba[in0];[in0][spc]blend=all_mode=softlight:all_opacity=0.20[frame];[0][frame]overlay[o]" -map "[o]" output.mp4
ffmpeg -loglevel debug -y -f lavfi -i color=c=black:s=1236x360 -filter_complex 'movie=input.mp4[in0];movie=output.mp4[in1];subtitles='text.srt'[t];[0:][in0]overlay=0:0[a0];[a0][in1]overlay=overlay_w:0[o]' -map "[o]" with-text.mp4

Over on Reddit someone was having a little issue with this complex FFmpeg filter which I found very cool. I offered some help fixing the issue and have this filter.

Using my FFExtra scripts (scripts I've been using relatedly since 2014!) I found out that there was some issue with the input files.

I love this filter so I thought it should be documented somewhere.

Here are some results: