The easy option is to use the included gifski.xcodeproj file to build the library automatically for all Apple platforms. You may need to have a patent license to use H.264/H.265 video (I recommend using VP9/WebM instead). When compiled with video support ffmpeg licenses apply. Once you have dependencies installed, compile with cargo build -release -features=video or cargo build -release -features=video-static. If you're cross-compiling, try uncommenting section at the end of Cargo.toml, which includes some experimental fixes for ffmpeg. Especially on macOS and Windows it takes expert knowledge to just get them installed without wasting several hours on endless stupid installation and compilation errors, which I can't help with. Please note that installation of these dependencies may be quite difficult. Details depend on the platform and version, but you usually need to install packages such as libavformat-dev, libavfilter-dev, libavdevice-dev, libclang-dev, clang. You must have ffmpeg and libclang installed, both with their C headers intalled in default system include paths. The tool optionally supports decoding video directly, but unfortunately it relies on ffmpeg 4.x, which may be very hard to get working, so it's not enabled by default. Let me know if you'd like to use it in a product incompatible with this license. I can offer alternative licensing options, including commercial licenses. To build the library, run: rustup updateĪnd link with target/release/libgifski.a. In the cloned directory, run: cargo build -release.if you don't run rustup update regularly. You may get compile errors, warnings about "unstable edition", etc. This project only supports up-to-date versions of Rust. Install Rust via rustup or run rustup update.GIF just isn't that good at compressing, no matter how much you compromise. If the input was ever encoded using a lossy video codec it's recommended to at least halve size of the frames to hide compression artefacts and counter chroma subsampling that was done by the video codec.Īdding -quality=90 may reduce file sizes a bit, but expect to lose a lot of quality for little gain. You can also resize frames (with -W option). If you have ffmpeg installed, you can run in terminal: ffmpeg -i video.webm frame%04d.pngĪnd then make the GIF from the frames: gifski -o anim.gif frame*.png The recommended way is to first export video as PNG frames. There is no GUI for Windows or Linux (there is one for macOS). If you have Rust 1.60+, you can also build it from source with cargo install gifski. If you have Homebrew, you can also get it with brew install gifski. It's a CLI tool, but it can also be compiled as a C library for seamless use in other apps. It produces animated GIFs that use thousands of colors per frame. Gifski converts video frames to GIF animations using pngquant's fancy features for efficient cross-frame palettes and temporal dithering. Highest-quality GIF encoder based on pngquant.
0 Comments
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |