Topic: [Feature] .ugoira support

Posted under Site Bug Reports & Feature Requests

Requested feature overview description.
Being able to upload properly formatted .ugoira files. These files would then be played back with pixivs own open source player when viewed. We could also additionally create sample of WebM or GIF out of it or continue accepting filetype conversions as child posts.

https://danbooru.donmai.us/wiki_pages/55658
https://github.com/pixiv/zip_player

Why would it be useful?
Pixiv only supports ugoiras for their animations, so getting the content to e621 can be quite difficult and requires converting into APNG, WebM, GIF or Flash first and all of these options does alter the files quality and integrity.

Directly being able to upload .ugoira would mean that the quality stays original, framerate is always correct.

What part(s) of the site page(s) are affected?
Post pages.
Upload page.

Updated

zip only contains images there is no timing information, so you will still need source url to extract the timings from it.

eg: https://i.pximg.net/img-zip-ugoira/img/2016/06/02/02/07/38/57182459_ugoira1920x1080.zip

from: https://www.pixiv.net/member_illust.php?mode=medium&illust_id=57182459

timings:https://www.pixiv.net/ajax/illust/57182459/ugoira_meta
{"error":false,"message":"","body":{"src":"https:\/\/i.pximg.net\/img-zip-ugoira\/img\/2016\/06\/02\/02\/07\/38\/57182459_ugoira600x600.zip","originalSrc":"https:\/\/i.pximg.net\/img-zip-ugoira\/img\/2016\/06\/02\/02\/07\/38\/57182459_ugoira1920x1080.zip","mime_type":"image\/jpeg","frames":[{"file":"000000.jpg","delay":120},{"file":"000001.jpg","delay":130},{"file":"000002.jpg","delay":120},{"file":"000003.jpg","delay":130},{"file":"000004.jpg","delay":120},{"file":"000005.jpg","delay":130},{"file":"000006.jpg","delay":120},{"file":"000007.jpg","delay":130}]}}

Updated by anonymous

AoBird said:
zip only contains images there is no timing information, so you will still need source url to extract the timings from it.

There's actually .ugoira fileformat, which has the additional file with frame delays on top of the regular JPG image sequence.

Something like IrfanView can view these, pixiv themselves has the player for this on github (linked above), danbooru already supports this (linked above) and there are software like PixivUtil2 to create them.

Updated by anonymous

I don't see it, you mean just like .zip but .ugoira instead?

Can you provide a link?

Updated by anonymous

From what I see that .ugoira is a file manually crated from combining fraems with timing from json. It's not a native format from Pixiv.

Updated by anonymous

AoBird said:
From what I see that .ugoira is a file manually crated from combining fraems with timing from json. It's not a native format from Pixiv.

...I kinda feel like talking to wall.

No, it's not native format by pixiv, because pixiv doesn't even allow you to download the file directly. Also the .zip from pixiv is pretty much just archive containing JPG image sequence, it's not the container that's important but the content itself. As archival site, being able to host the content in it's original form is valuable and .ugoira is semi-standartized format for doing this combined with player that pixiv does provide. APNG is the second closest format to keep the visual quality intact, but in most cases thanks to source being JPG image sequence the filesizes will explode.

Updated by anonymous

gattonero2001 said:
Bump

(Not quite) Bump
https://github.com/mikf/gallery-dl/discussions/6147#discussioncomment-10610492 -> Pixiv's ugoira zip files are actually samples #6056
Yeah, this sucks since I've used the 1920x1080 link for so long. At least I think the Pixiv Toolkit grabs the PNGs when available, I think. A big warning for anyone implementing Ugoira support on their site or in a tool. Figured it was kind of important that anyone messing with Ugoira sees this!

I've never heard of this format before. If "converting to a more standard format requires lossy recompression" isn't a good enough reason to support MPEG or AV1, I can't imagine this will get anywhere either.

errorist said:
I've never heard of this format before. If "converting to a more standard format requires lossy recompression" isn't a good enough reason to support MPEG or AV1, I can't imagine this will get anywhere either.

Which, AVIF? APNG? GIFV? HEIC? AVI? WMV/ASF? MNG? TS/H2TS? Ugoira ZIPs?
Anyways, popular container formats support lossless frames. Animated PNG pretty much is that. There's a weird bug on some Boorus where it works, but you have to rename it to PNG to upload it. The browsers don't care, the PNG code they use understands APNGs. WebM/Vorbis has lossless methods as well.

  • 1