update readme

This commit is contained in:
tocariimaa 2024-12-31 13:40:33 -03:00
parent 9d8856db58
commit 05370ac335

View file

@ -1,18 +1,40 @@
# ugoira-downloader
Downloader for Pixiv's [Ugoira](https://safebooru.donmai.us/wiki_pages/ugoira?z=1) animation format.
## Dependencies
### Internal
Only Go's standard library.
### External
- FFmpeg: for Ugoira to video conversion.
## Usage
```
ugoira-downloader post_id
### Downloading a Ugoira
```sh
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.
See `ugoira-downloader -h` for all flags.
### Conversion of Ugoira animation to WebM
```sh
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
```
```sh
go build .
```