{"id":13478909,"url":"https://github.com/lukechilds/gifgen","last_synced_at":"2025-04-05T04:14:51.128Z","repository":{"id":39635081,"uuid":"62515206","full_name":"lukechilds/gifgen","owner":"lukechilds","description":"Simple high quality GIF encoding","archived":false,"fork":false,"pushed_at":"2023-01-22T12:21:49.000Z","size":1384,"stargazers_count":556,"open_issues_count":2,"forks_count":31,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-03-29T03:11:20.264Z","etag":null,"topics":["encoding-gifs","ffmpeg","gif"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/lukechilds.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["lukechilds"],"custom":["https://blockstream.info/address/1LukeQU5jwebXbMLDVydeH4vFSobRV9rkj","https://blockstream.info/address/3Luke2qRn5iLj4NiFrvLBu2jaEj7JeMR6w","https://blockstream.info/address/bc1qlukeyq0c69v97uss68fet26kjkcsrymd2kv6d4","https://tippin.me/@lukechilds"]}},"created_at":"2016-07-03T21:06:41.000Z","updated_at":"2025-03-24T19:23:56.000Z","dependencies_parsed_at":"2023-01-30T00:01:17.346Z","dependency_job_id":null,"html_url":"https://github.com/lukechilds/gifgen","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukechilds%2Fgifgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukechilds%2Fgifgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukechilds%2Fgifgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lukechilds%2Fgifgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lukechilds","download_url":"https://codeload.github.com/lukechilds/gifgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284954,"owners_count":20913704,"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","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":["encoding-gifs","ffmpeg","gif"],"created_at":"2024-07-31T16:02:05.654Z","updated_at":"2025-04-05T04:14:51.075Z","avatar_url":"https://github.com/lukechilds.png","language":"Shell","funding_links":["https://github.com/sponsors/lukechilds","https://blockstream.info/address/1LukeQU5jwebXbMLDVydeH4vFSobRV9rkj","https://blockstream.info/address/3Luke2qRn5iLj4NiFrvLBu2jaEj7JeMR6w","https://blockstream.info/address/bc1qlukeyq0c69v97uss68fet26kjkcsrymd2kv6d4","https://tippin.me/@lukechilds"],"categories":["Shell","Images","Utilities","ffmpeg","Multimedia and File Formats","\u003ca name=\"graphics\"\u003e\u003c/a\u003eGraphics"],"sub_categories":["Gif Creation","Directory Navigation"],"readme":"# gifgen\n\n\u003e Simple high quality GIF encoding\n\n[![GitHub Donate](https://badgen.net/badge/GitHub/Sponsor/D959A7?icon=github)](https://github.com/sponsors/lukechilds)\n[![Bitcoin Donate](https://badgen.net/badge/Bitcoin/Donate/F19537?icon=bitcoin)](https://lu.ke/tip/bitcoin)\n[![Lightning Donate](https://badgen.net/badge/Lightning/Donate/F6BC41?icon=bitcoin-lightning)](https://lu.ke/tip/lightning)\n\nIf you've ever tried encoding GIFs with `ffmpeg` there's a good chance your results came out looking pretty bad. This is because GIFs are limited to a palette of 256 colours and `ffmpeg` just uses a generic palette to be able to cover a wide range of colours.\n\n`gifgen` produces much better results by doing a 2-pass encode. The first pass generates a custom colour palette based on all of the pixels from each frame. The second pass encodes the GIF using this palette instead of the default one bundled with `ffmpeg`.\n\n**ffmpeg default:**\n\n![ffmpeg default](gifs/bbb-default.gif)\n\n**gifgen:**\n\n![gifgen](gifs/bbb-gifgen.gif)\n\n## Usage\n\n```\n$ gifgen -h\ngifgen 1.2.0\n\nUsage: gifgen [options] [input]\n\nOptions:\n  -o   Output file [input.gif]\n  -f   Frames per second [10]\n  -s   Optimize for static background\n  -v   Display verbose output from ffmpeg\n  -w   Scale output with horizontal resolution\n  -b   Begin the clip at a given timestamp (in seconds)\n  -d   Duration in seconds of the resulting gif, can be combined with at\n\nExamples:\n  $ gifgen video.mp4\n  $ gifgen -o demo.gif SCM_1457.mp4\n  $ gifgen -sf 15 screencap.mov\n  $ gifgen -sf 15 -w 320 screencap.mov\n\nBegin at 3.5 seconds into the video, make the gif using the next 5.5 seconds\n  $ gifgen -b 3.5 -d 5.5 screencap.mov\n\n```\n\n## Installation\n\n### macOS\n\n```shell\nbrew install lukechilds/tap/gifgen\n```\n\n### Linux\n\nJust clone this repo and either copy/symlink `gifgen` to your PATH or run the script directly with `./gifgen`. Requires `ffmpeg` to be installed.\n\n### Windows\n\n```\n¯\\_(ツ)_/¯\n```\n\n## Credits\n\n`gifgen` is pretty much just the information from [this blog article](http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html) wrapped up in a shell script. Full credit goes to the original [author](http://ubitux.fr/).\n\n## License\n\nMIT © Luke Childs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukechilds%2Fgifgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flukechilds%2Fgifgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flukechilds%2Fgifgen/lists"}