Jon-Becker / nft-generator-py

This tool allows users to generate sets of unique images and metadata using weighted layer collections.
MIT License
304 stars 126 forks source link

Use GIF or MP4 files in generations #10

Closed KotesUA closed 1 year ago

KotesUA commented 2 years ago

Hello! Is it possible to merge not PNG, but GIF or MP4 files the same way as PNG? Can this feature be added?

KotesUA commented 2 years ago

This can be done by adding an option in config to create GIF from PNG sequence, by selecting an entire folder with PNGs. In this cade, GIF is processed layer by layer for each output image. Parameters for GIF may be only frames/second.

Jon-Becker commented 2 years ago

Considering adding this.

Jon-Becker commented 2 years ago

Accepted. v1.1.x will accept GIFs and PNG sequences as inputs.

KotesUA commented 2 years ago

convert.txt I've done this using moviepy and mp4 output. Pretty custom after-png-generation solution, but after all tests the quality is better than if using PIL .save even with 'optimize' parameter set to 'false'. However, I reached max speed 30 seconds for generating .mp4 2 second 25fps video.

AndoKarim commented 2 years ago

Hello, I don't get what your script is doing. He's reading all the "eyes" folder and png inside and create a video of all of them? I thought that your question was more about merging a blinking eye gif for example with other static layers.