danbooru icon indicating copy to clipboard operation
danbooru copied to clipboard

Support grabbing original ugoira frames instead of ZIP

Open AlyoshaVasilieva opened this issue 9 years ago • 3 comments

At least some ugoira on Pixiv has the original frames available. I only noticed recently so maybe always was available, or maybe recent development.

Examples: http://www.pixiv.net/member_illust.php?mode=medium&illust_id=54728979 This has GIF frames available, without the artifacting of the JPGs in the ZIP. http://www.pixiv.net/member_illust.php?mode=medium&illust_id=54736611 This has transparent PNGs available, instead of JPGs with white background. The original frames are also larger, being 1326x1564 instead of 916x1080 from the ZIP. http://www.pixiv.net/member_illust.php?mode=medium&illust_id=54736928 This has large, high-quality JPG available. 2480x3507 q98 rather than the ZIP's 764x1080 q90.

The first frame is listed in the JSON object of the pixiv API. For example, http://i4.pixiv.net/img-original/img/2016/01/16/05/53/01/54736611_ugoira0.png is the first frame of illust 54736611. Requires a referer of pixiv to view. Iterating ugoira0 to ugoira1 retrieves second frame.

I don't think danbooru supports this automatically since I see https://danbooru.donmai.us/posts/2245307 which uses either webm or jpg-zip, while original GIF frames look better. And (NSFW) https://danbooru.donmai.us/posts/2233476?original=1 is using 810x1080 JPG while pixiv has 960x1280 available. If danbooru does support this and I missed it I apologize for waste of time, I can't read ruby well.

AlyoshaVasilieva avatar Jan 16 '16 06:01 AlyoshaVasilieva

Hmm, this might be an interesting enhancement, but this would require to download each frame separately, confirm their integrity, and pack into zip for ugoira player usage. This might be doable, but would likely break md5 checks - due to date changes, the resulting zip archive would be different every time.

Type-kun avatar Jan 26 '16 17:01 Type-kun

Set constant date (epoch 0, original post date, whatever) after download or when making ZIP to avoid date changes affecting hash.

AlyoshaVasilieva avatar Jan 30 '16 08:01 AlyoshaVasilieva

Can we reopen this as it seems danbooru downloads sample 1080 zip?

https://i.pixiv.cat/img-original/img/2020/01/23/18/01/05/79053448_ugoira0.jpg compare this first frame with post #5579702

fredgido avatar Sep 03 '22 17:09 fredgido