Home > Blog > Vectorial Videos Glitch

Vectorial Videos Glitch

This is one that I've been wanting to do for a while. Full code available here.
The idea is that SVG glitch is really fun but it's probably even more fun in video. There aren't really any codecs that I know of that do vector videos though so we'll have to use the SVG image format. To be able to script everything I had to install two dependencies on my linux mint system : graphicsmagick-imagemagick-compat (maybe just imagemagick could work for you though) and autotrace to handle all these png < - - > svg conversions.

glitch type

For now the script just does a basic search and replace, you can control the strength of the glitch using the -s parameter, it goes from 1 to 4. A value of 1 will randomly replace the units, value of 2 will replace the tens, 3 the thousands, etc..

the picture I'm using here to demonstrate is a portrait of FKA Twigs photographed by Willy Vanderperre &styling by Alastair McKimm.

python lemonjuice.py -i input.jpg -s 1
python lemonjuice.py -i input.jpg -s 2
python lemonjuice.py -i input.jpg -s 3
python lemonjuice.py -i input.jpg -s 4


Something a little annoying with vector format glitches is that you often displace data so much that you uncover transparent spaces. These empty spaces can be interpreted as white by some img viz or when converting to video, which can be a little disturbing when you're glitching something dark. To fix this I added an ffmpeg command at the end that just layers all the glitched images with the base images to replace all the empty spaces with the background of the original images.

ffmpeg \
	-i oldframes/%06d.png \
	-i newframes/%06d.png \
	-filter_complex '\
	[out]format=rgba' \
	-c:v libx264 output.mp4
If you have any questions, notice any mistakes or want to hire me for research/art
feel free to send me an email me at kaspar.ravel[at]gmail[dot]com
for more visual art and less text you can follow my work on facebook or instagram
And whoever you are stranger, thank you for existing and being passionate about things.