Skip to content

ASCII motion art #14

Description

@bitozoid

This is just an idea I do not know where to share.

From a small B/W video/GIF it is possible to create ASCII frames.

Something like this:

Get video frames as PNG.

ffmpeg -i video.mp4 -vf fps=10,crop=800:300:400:100,scale=80:-1,negate,eq=contrast=5,format=gray frames/output_%04d.png

Convert to ascii frames:

for img in frames/*.png; do
 ./mediatoascii --image-path "$img" > ascii_frames/$(basename "$img" .png).txt
done

Show in terminal:

for frame in ascii_frames/*.txt; do
 clear
 cat "$frame"
 sleep 0.1
done

Just an example. I'm pretty sure this can be improved a lot. For instance, there are some ASCII to SVG tools so maybe ascii could be optimized for SVG rendering.

So that, the repository could host video prompts and ascii rendered frames. Rendered frames could be easily improved via PR. AI could probably recreate video from the frames in a near future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions