-
Notifications
You must be signed in to change notification settings - Fork 254
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] jpeg to gif conversion issue #1109
Comments
Interesting. The originally downloaded ugoria files shouldn't be affected, correct? Just the conversions? If so, perhaps an option to re-encode all existing ugoria files might also be a good option to add to this fix! |
Not gonna lie, i can't really open ugoira files on my mac. But i can see that it's around the same size as the zip archive of the images. |
Yeah, the ugoira files are basically the same as the zip files but with added animation data. Line 581 in e7c380b
|
Added a workaround that performs a bit depth check for each image contained in the temporary ugoira processing folder. If some images have a lower bit depth number than others, these images are all encoded to have the same bit depth number corresponding to the highest among the images in the folder.
* Develops the issue #1112 Create an option overwriteUgoira in config.ini that behave like the overwrite option but is targeted toward ugoira. Option created to overcome the bug raised by the issue #1109 Prone to improvement * New export by post_id feature Add feature in menu to export all Pixiv, Fanbox and Sketch post ever download in a txt file Feature following possible improvement of issue #1112 Add feature in command line to export all Pixiv, Fanbox and Sketch post ever download in a txt file Add info in readme * Add feature asked by @cglmrfreeman in issue #1112 Overwrite all ugoira, gif, webp, webm, apng if the corresponding option are selected in config.ini Re-encode based on the zip folder Add feature to export whole database in a single command Can export Fanbox, Skecth post_id and Pixiv image_id in a file txt
Prerequisites
Description
I wanted to use the option to convert ugoira to gif.
It turns out that this feature works quite well except for some ugoira from users 4734113.
We notice that the gif obtained truncates a large number of images and keeps only a few images at the end.
Steps to Reproduce
To do this, change the option
createGif
to True in the category [Ugoira] in the config.ini file.Then launch
PixivUtils.py
by selecting option 2. Download by image_id and enter one of the following two examples (sorry for the not family firendly character of the chosen examples, it's the only ones that don't work):Small investigation
When we display the logs in debug mode of the command passed in the function
convert_ugoira
ofPixivHelper.py
by the linesubprocess.Popen
, we realize that a great number of automatic conversion of pixel_format are realized and that at certain moments, EOI tags seem to be missing.After inspection, the issue does not come from the images (jpeg) which have all their SOI and EOI tags (respectively "\xff\xd8" and "\xff\xd9"). I put the mini script I used in footnote if you want to check the info.
However, the problem seems to come from the automatic conversion of the images which cuts the generation of the gif and erases the information previously generated.
To realize this, you just have to delete the images generating an automatic conversion (images 21, 22, 23, 106 and 107 for the artwork id 91281700) from the file
i.ffconcat
to prevent their use during the conversion and the gif is generated from the image 00000.jpeg without issues.I tried to prevent the conversion of the pix_fmt of the images by adding (for example)
-pix_fmt +yuvj444p
but the command crash because it does not manage to continue the operation without converting the image.I suspect that the problem is that these images are black and white while the others are colored but I can't seem to solve the problem.
If someone experienced enough in ffmpeg could give his expertise on this problem, it would be welcome.
Versions
PixivDownloader2 version 20220311-beta3
Annex
Code to show the hex of an image :
The text was updated successfully, but these errors were encountered: