{"id":16085057,"url":"https://github.com/BB-301/rust-iced-gif-maker","last_synced_at":"2025-10-23T01:31:31.556Z","repository":{"id":202055086,"uuid":"707291584","full_name":"BB-301/rust-iced-gif-maker","owner":"BB-301","description":"A simple FFmpeg-based animated GIF generator application built using Iced","archived":false,"fork":false,"pushed_at":"2023-10-20T21:29:14.000Z","size":20382,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-13T05:49:16.261Z","etag":null,"topics":["animated-gif","ffmpeg","ffmpeg-wrapper","gui","iced","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BB-301.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-10-19T15:41:54.000Z","updated_at":"2024-11-28T14:59:34.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e21adb4-4f04-469f-890b-db9173e3355a","html_url":"https://github.com/BB-301/rust-iced-gif-maker","commit_stats":null,"previous_names":["bb-301/rust-iced-gif-maker"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/BB-301/rust-iced-gif-maker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BB-301%2Frust-iced-gif-maker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BB-301%2Frust-iced-gif-maker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BB-301%2Frust-iced-gif-maker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BB-301%2Frust-iced-gif-maker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BB-301","download_url":"https://codeload.github.com/BB-301/rust-iced-gif-maker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BB-301%2Frust-iced-gif-maker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280546390,"owners_count":26348719,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-22T02:00:06.515Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["animated-gif","ffmpeg","ffmpeg-wrapper","gui","iced","rust"],"created_at":"2024-10-09T13:01:49.862Z","updated_at":"2025-10-23T01:31:28.655Z","avatar_url":"https://github.com/BB-301.png","language":"Rust","funding_links":[],"categories":["Projects Using iced"],"sub_categories":[],"readme":"# Iced Animated GIF Maker\n\nThis is a simple [FFmpeg](https://www.ffmpeg.org/)-based animated GIF generator application built using [Iced](https://docs.rs/iced/0.10.0/iced/index.html).\n\n**NOTE**: Please take the time to read the [potential issue](#potential-issue) section before running this application.\n\n![Iced Animated GIF Maker - App preview (idle state)](assets/iced-gif-maker-app-preview-idle.png)\n\n![Iced Animated GIF Maker - App preview (converting)](assets/iced-gif-maker-app-preview-converting.png)\n\n![Iced Animated GIF Maker - App preview (preview state)](assets/iced-gif-maker-app-preview-previewing.png)\n\n## How to use\n\n* To start converting a video into an animated GIF, simply drag-and-drop a video file on the application window or click on the `open button` to trigger your system's native file picker dialog.\n* The GIF's width defaults to 480 pixels, but you can use the `width input` to change that value.\n  * NOTE: The GIF's frame rate is fixed at 10 FPS.\n* When the job completes, the animated GIF automatically gets previewed by the application.\n* To save the generated GIF, simply click on the `save button` to trigger your system's native file picker (i.e. saver) dialog.\n* The `cancel button`, when visible, may be used to cancel an ongoing job and clear the UI.\n* The `clear button`, when visible, may be used to clear the UI for a completed job.\n\n## How it works\n\nVideo to animated GIF conversion is achieved using `FFmpeg`. The application uses the [rust-ffmpeg-gif-maker](https://github.com/BB-301/rust-ffmpeg-gif-maker/releases/tag/0.1.1) wrapper library to communicate with `FFmpeg` by making a system call to it and capturing and interpreting its `stdout` and `stderr`. In turn, the `Iced` application communicates with the library using an asynchronous worker, similar to the one described in the official documentation for [iced::subscription::channel](https://docs.rs/iced/0.10.0/iced/subscription/fn.channel.html).\n\n## Target audience\n\nThis project is mainly targeted at Rust programmers who are in the process of learning `Iced`. It makes use of concepts such as:\n\n* using an asynchronous worker based on [iced::subscription::channel](https://docs.rs/iced/0.10.0/iced/subscription/fn.channel.html) to allow communicating between an `Iced` application and something else (in this case a child process),\n* implementing `Iced`'s [subscription method](https://docs.rs/iced/0.10.0/iced/application/trait.Application.html#method.subscription),\n* using the [rfd](https://github.com/PolyMeilex/rfd) library to trigger native file picker dialogs,\n* importing and configuring custom fonts,\n* creating and using a [component](https://docs.rs/iced/0.10.0/iced/widget/trait.Component.html),\n* performing custom styling,\n* and other stuff.\n\n## How to build\n\n### Potential issue\n\nThis project uses the [rfd](https://github.com/PolyMeilex/rfd) library to display native file picker dialogs. I noticed, on my development system (i.e. `macOS`), that running the application with `cargo run` or by simply executing the binary in a terminal (e.g. `./target/release/iced_gif_maker`) will cause `rfd` to crash the application when trying to trigger a dialog. On the other hand, no problem arises, for instance, when starting the application using the following syntaxes: `/bin/bash -c \"cargo run --release\"` or `env cargo run --release`. Launching the application from a shell script will also work fine. At this point, I have reasons to believe that this is a permission issue, but I need to research the problem further. So, in the meantime, I recommend trying these workarounds if you face a similar issue when triggering dialogs. If none of these workarounds work, please let me know by [opening an issue](https://github.com/BB-301/rust-iced-gif-maker/issues) and we'll try to figure this out together.\n\n### Requirements\n\n* The `ffmpeg` binary must be available on your system's path.\n  * Note that it is possible to use the `ICED_GIF_MAKER_FFMPEG_PATH` environment variable to specify the absolute location of the binary on the system if the binary is not on the path. See [Build and running - More options](#more-options) for an example.\n  * If you need to download `FFmpeg`, please visit the official [FFmpeg download page](https://ffmpeg.org/download.html).\n  * NOTE: At the moment, the [rust-ffmpeg-gif-maker](https://github.com/BB-301/rust-ffmpeg-gif-maker/releases/tag/0.1.1) library has successfully been tested with `ffmpeg version 5.0-tessus` and `ffmpeg version 6.0-tessus` on `macOS`, as well as with version `ffmpeg version N-112483-gd799ad2404-20231020` on `Windows 11`. So please feel free to let me know by [opening an issue](https://github.com/BB-301/rust-iced-gif-maker/issues) if you encounter any problems when trying run the application on your system.\n\n### Building and running\n\n1. Clone the Git repository from GifHub:\n```\ngit clone https://github.com/BB-301/rust-iced-gif-maker.git\n```\n2. Move into the cloned repository:\n```\ncd rust-iced-gif-maker\n```\n3. Run in release mode\n```\ncargo run --release\n```\n\n#### More options\n\n* Use the `ICED_GIF_MAKER_FFMPEG_PATH` environment variable to specify the path of the `ffmpeg` binary on your system. E.g.:\n```\nICED_GIF_MAKER_FFMPEG_PATH=/absolute/path/to/ffmpeg cargo run --release\n```\n* Enable logging. E.g.:\n```\n# If `RUST_LOG` is not provided, the application will set it\n# to `iced_gif_maker=debug,ffmpeg_gif_maker=info`.\ncargo run --release --features logging\n\n# Or, to specify `RUST_LOG` yourself, you can do something like this:\nRUST_LOG=\"iced_gif_maker=debug\" cargo run --release --features logging\n```\n\n## Still to do...\n\n* The application was tested on `macOS` and `Windows 11`, but I would also like to test it on `Raspberry Pi OS`.\n* I need to fix the bug described in [How to build - Potential issue](#potential-issue), about [rfd](https://github.com/PolyMeilex/rfd) making the application crash on `macOS` (and maybe elsewhere).\n* Ideally, the application would warn the user when (if) a save operation fails. But currently the application only prints whether the save operation was successful or not to `stdout`.\n* This project currently relies on a [forked version](https://github.com/BB-301/iced_gif/tree/tmp) of the [iced_gif](https://github.com/tarkah/iced_gif) widget repository. In this application, the `iced_gif::gif::Frames::from_bytes` (from the `tokio` feature flag) is used to decode the animated GIF into frames that are required by the widget. But when starting a decoding job, that job cannot be cancelled. This is generally not a problem for small to mid sized GIFs, but it could be wasteful for bigger ones. A simple solution around this problem would be to modify `iced_gif::gif::Frames::from_bytes` with an optional argument for the receiver part of a channel that would allow cancelling a job, and then use that channel's sender part to signal cancellation from the application, when required.\n\n## Contact\n\nIf you have any questions, if you find bugs, or if you have suggestions for this project, please feel free to contact me by opening an issue on the [repository](https://github.com/BB-301/rust-iced-gif-maker/issues).\n\n## License\n\nThis project is released under the [MIT License](./LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBB-301%2Frust-iced-gif-maker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FBB-301%2Frust-iced-gif-maker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FBB-301%2Frust-iced-gif-maker/lists"}