1.3 KiB
1.3 KiB
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.