Split .png file into multiple smaller files #68
Replies: 3 comments 1 reply
-
Hi @philipgoyal, seeing your activities and passion for contributing to the project is lovely. The issue you described is solved using the |
Beta Was this translation helpful? Give feedback.
-
Hi @ArtyomVancyan, many thanks for creating this project—I've been looking for a thumbnail generator that generates .vtt files for use with e.g. Plyr, so I'm happy to contribute in any small way that I can.
I've tried the compress option, setting generator.compress (in the Python script) to several values between 0.01 and 1.00. But the movie.png file size did not change at all (it's 17.6MB based on 5s interval from a video that's 103.4MB). The video file and generated files (.png and .vtt) are here <https://www.dropbox.com/sh/cqooo6ivylo67o6/AABN3mNjotilpUmWURlPzigna?dl=0>.
The full settings are:
generator = Generator(inputs)
generator.base = " "
generator.compress = 1
generator.skip = False # overwrite existing thumbnails
generator.interval = 5
generator.compress = 1.00 # also tried between 0.01 and 1.00
generator.generate()
Also: is there any possibility of enabling creation of multiple .png files as I suggested? A previous online service ("videohop <https://www.videohop.com.au/>", no longer operational) created multiple thumbnail sheets, which were then referenced in a single .vtt file.
|
Beta Was this translation helpful? Give feedback.
-
Thank you—erasing the previously generated results seems to have been necessary to get this to work (even though I set generator.skip = False). I now get:
22.9 MB with compress = 1.0
17.5 MB with compress = 0.2
3.9 MB with compress = 0.1
0.8MB with compress = 0.05
|
Beta Was this translation helpful? Give feedback.
-
Currently, a single .png thumbnail sheet is created, irrespective of the video duration or chosen thumbnail interval. This can result in large a .png file (e.g. 20MB for a 1 hour video with 10s interval). This could be problematic when the video is streamed on a website.
It would be preferable to have the option to create several thumbnail sheets, numbered sequentially, based on an optional argument. Specifically, if e.g. "thumbnail-sheet-size" is set to e.g. 2 MB, then the code will split sheets so that each is no more than (roughly) 2MB is size.
Beta Was this translation helpful? Give feedback.
All reactions