No description
Find a file
tocariimaa 01c7151dd3 remove redundant os.Remove
The created temporal file is already within another temporary directory
that already gets removed (along with its contents) with `os.RemoveAll`.
2025-01-04 13:03:44 -03:00
conversion.go remove redundant os.Remove 2025-01-04 13:03:44 -03:00
go.mod name change 2024-12-30 23:50:44 -03:00
LICENSE initial commit 2024-12-28 19:14:16 -03:00
main.go ffmpeg-args flag message 2024-12-31 14:12:28 -03:00
manifest.go move manifest error field check out 2024-12-31 13:56:35 -03:00
README.md update readme 2024-12-31 14:04:58 -03:00

ugoira-tool

Downloader and converter for Pixiv's Ugoira animation format.

Dependencies

Internal

  • Only Go's standard library.

External

  • FFmpeg: for Ugoira to video conversion.

Usage

Downloading a Ugoira

ugoira-tool download <post_id>
# with specific file name:
ugoira-tool download -o ugo.zip <post_id>

By default, it will download both the zip file (containing the frames) and the manifest JSON in the current working directory (default filenames being <post_id>_ugoira.zip and <post_id>_ugoira.json respectively). Use -o to change the zip file path and -M for the manifest.

Conversion of Ugoira animation to WebM

ugoira-tool u2v -o anim.webm <ugoira_file> <ugoira_manifest>
# Example:
ugoira-tool u2v -o anim.webm ugo.zip ugo.json

The created WebM file uses the VP9 codec with flags that should yield a decent quality while maintaining a reasonable file size, avoiding any additional quality degradation (since most Ugoira use JPEG for their frames).

The default codec flags are in ffmpegDefaultArgs at conversion.go.

Additionally, you can set your own codec flags with -ffmpeg-args

Building

go build .

License

This program is licensed under the GPLv3 license.