Hacker News new | ask | show | jobs
by 204NoContent 3913 days ago
Sure! It's a little hack that autoplays everywhere, browser and mobile. It's javascript that loops over numbered png images in the canvas tag. You can grab the js in the source of our homepage toward the bottom.

The process for creating the images is as follows:

Use quicktime to take a video, called demo.mov (or equivalent movie capture program with whatever file format)

Create a color palette from the movie $ ffmpeg -i demo.mov -vf fps=10,scale=1378:-1:flags=lanczos,palettegen palette.png

Create a gif from the movie using the color palette $ ffmpeg -i demo.mov -i palette.png -filter_complex "fps=10,scale=1378:-1:flags=lanczos[x];[x][1:v]paletteuse" output.gif

Create a sequence of pngs from the gif $ convert -dispose Background -coalesce output.gif -colors 256 PNG8:target-%d.png

party!

Feel free to email us if you need any help!

1 comments

Thanks a ton! Going to try this over thr weekend~~