Skip to content

Instantly share code, notes, and snippets.

@eladg
Created May 14, 2020 00:31
Show Gist options
  • Save eladg/8483f3a2fc3bcfcac4a823f0a8c853df to your computer and use it in GitHub Desktop.
Save eladg/8483f3a2fc3bcfcac4a823f0a8c853df to your computer and use it in GitHub Desktop.
FFmpeg filter for CRT SCAN lines
# you will need these files:
# -> https://www.gariany.com/2020/05/ffmpeg-crt-scan-lines-filter/scanline_pattern_croped.png
ffmpeg -loglevel debug -y -f lavfi -i color=c=black:s=1216x896 -filter_complex "movie='bg_croped.png',format=rgba,setsar=1:1[bgc];movie='scanline_pattern_croped.png'[spc];movie='main.png',format=rgba,scale=iw:ih*4:flags=neighbor,scale=iw*4:ih:flags=bilinear[input];[bgc][input]overlay[tmp];[tmp][spc]blend=all_mode=softlight:all_opacity=0.15[tmp2];[0][tmp2]overlay[o]" -map "[o]" -frames:v 1 output.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment