VIDEO ART IN PYTHON

I wrote a wee utility script in Python to process video in an 'arty' way. Outputs take the form of a video, or, more commonly, a still image. With the latter, the central idea is the collapse of the video's time dimension in various ways.

The various 'modes' can be summarised thusly:

To demonstrate, consider the following images:

Mode/Sub-mode Beach Scene Slowly Rotating Flower
Still from input video Still from input video Still from input video
mode: slitscan; submode: 0 mode: slitscan; submode: 0 mode: slitscan; submode: 0
mode: slitscan; submode: 1 mode: slitscan; submode: 1 mode: slitscan; submode: 1
mode: striper; submode: 0 mode: striper; submode: 0 mode: striper; submode: 0
mode: striper; submode: 1 mode: striper; submode: 1 mode: striper; submode: 1
mode: tiler; submode: 10x10 mode: tiler; submode: 10x10 mode: tiler; submode: 10x10
Still from output video; mode: mirror; submode: 0 Still from output video; mode: mirror; submode: 0 Still from output video; mode: mirror; submode: 0
Still from output video; mode: mirror; submode: 1 Still from output video; mode: mirror; submode: 1 Still from output video; mode: mirror; submode: 1
Still from output video; mode: mirror; submode: 2 Still from output video; mode: mirror; submode: 2 Still from output video; mode: mirror; submode: 2
Still from output video; mode: mirror; submode: 3 Still from output video; mode: mirror; submode: 3 Still from output video; mode: mirror; submode: 3

Since I'm using a little bit of OpenCV to do some of the processing, the easiest way to run my ArtVideo.py script is via Docker.

Paste the following command into a bash script:
docker run -it --rm --name ArtVideo --mount type=bind,source="$(pwd)"/ArtVideo,target=/app -w="/app" yoanlin/opencv-python3 python3 ArtVideo.py $@
... and call that script with the --help option to get some guidance about the script parameters.

Addendum: slightly related (and the subject of a parallel project): motion extraction.

Enjoy!

Creative Commons License

All Video Art In Python assets by Chris Molloy are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.