{"id":16676325,"url":"https://github.com/wolfy-j/goffli","last_synced_at":"2025-07-09T19:38:58.490Z","repository":{"id":57591783,"uuid":"131519741","full_name":"wolfy-j/goffli","owner":"wolfy-j","description":"⚗️ Lua wrapper at top of FFMPEG API with nice progress bars and user friendly input arguments.","archived":false,"fork":false,"pushed_at":"2018-06-29T20:38:32.000Z","size":7813,"stargazers_count":107,"open_issues_count":0,"forks_count":7,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-02T01:41:31.306Z","etag":null,"topics":["ffmpeg","ffmpeg-cli-wrapper","github-gist","golang","lua","progress-bar","snippets"],"latest_commit_sha":null,"homepage":"","language":"Go","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/wolfy-j.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-04-29T18:37:23.000Z","updated_at":"2024-02-27T04:13:39.000Z","dependencies_parsed_at":"2022-09-26T19:43:24.238Z","dependency_job_id":null,"html_url":"https://github.com/wolfy-j/goffli","commit_stats":null,"previous_names":["spiral/goffli"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/wolfy-j/goffli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfy-j%2Fgoffli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfy-j%2Fgoffli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfy-j%2Fgoffli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfy-j%2Fgoffli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wolfy-j","download_url":"https://codeload.github.com/wolfy-j/goffli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wolfy-j%2Fgoffli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264502493,"owners_count":23618619,"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":["ffmpeg","ffmpeg-cli-wrapper","github-gist","golang","lua","progress-bar","snippets"],"created_at":"2024-10-12T13:10:09.079Z","updated_at":"2025-07-09T19:38:58.443Z","avatar_url":"https://github.com/wolfy-j.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Goffli\n==========\n![GitHub release](https://img.shields.io/github/release/wolfy-j/goffli.svg?style=flat-square)\n![license](https://img.shields.io/github/license/wolfy-j/goffli.svg?color=blue\u0026style=flat-square)\n[![Go Report Card](https://goreportcard.com/badge/github.com/wolfy-j/goffli?style=flat-square)](https://goreportcard.com/report/github.com/wolfy-j/goffli)\n![Travis](https://img.shields.io/travis/wolfy-j/goffli.svg?style=flat-square)\n\n\nGoffli is simple to use interface and FFmpeg CLI wrapper that offers the ability to convert video, audio, and other multimedia files and streams using small Lua programs which you can share over Github Gist.\n\n![Goffli](goffli.gif)\n\n![GIF](gif.gif)\n\n\u003e You can save and share any script with others. Every time you reuse it you will save all the time you spent in the past searching Google for ffmpeg bash scripts.\n\n# Installation\nMake sure to [install Golang 1.9](https://golang.org/doc/install) on your machine.\n\n```\ngo get \"github.com/wolfy-j/goffli\"\n```\n\nOr you can find binaries [here](https://github.com/wolfy-j/goffli/releases).\n\n# Usage\nBy default, Goffli can only display media information about a given file:\n\n```\ngoffli info video.mp4\n```\n\nIf you are looking to extend the possibilities of Goffli's functionality, you can load snippets using a GitHub Gist url:\n\n```\ngoffli get https://gist.github.com/wolfy-j/d4ece481eb8c9bd8a438967d77603ce7 video2gif\n```\n\nThese snippets can then be used immediately:\n\n```\ngoffli video2gif input.mp4 result.gif\n```\n\n# Available Snippets\n\nSnippet         | URL\n----            | ---\ncopy            | https://gist.github.com/wolfy-j/8009a8b3be1004d933e105494c64c372\nvideo2gif       | https://gist.github.com/wolfy-j/d4ece481eb8c9bd8a438967d77603ce7\n\n\u003e Feel free to share your own snippets you create above for others in the community.\n\n### Local snippets\nYou can also test your local Lua script without having to download it from GitHub Gists.\n\n```\ngoffli run snippet.lua [args]\n```\n\n# Coding the Snippet\nWriting the code for the snippet is easy. You can utilize a set of functions embedded to a Lua machine in order to make it more user friendly.\n\n### Input functions\nYou can ask a user to enter a value\n\n```lua\nprint(ask(\"Value\"))\n```\n\nIn order to validate a input value\n\n```lua\nlocal number = ask(\"Number\", \"number\")\nlocal float = ask(\"Number\", \"float\")\nlocal file = ask(\"File\", \"exists\")\nlocal not_empty = ask(\"Not Empty\", \"!empty\")\n```\n\nDefault values \n\n```lua\nlocal quality = ask(\"Quality\", null, \"32\")\n```\n\n### Temp files and directories\nIn order to retrieve a name of a temp directory\n\n```lua\nlocal tmp = require(\"tmp\")\nprint(tmp.dir())\n```\n\nIn order to allocate a temporary file with a desired extension\n\n```lua\nlocal tmp = require(\"tmp\")\nprint(tmp.file(\"mp4\"))\n```\n\n### FFmpeg functions\nThis will display a spinner  \n\n```lua\nrequire(\"ffmpeg\").run({\n  \"-i\", input,\n  \"-vcodec\", \"copy\", \n  \"-y\", output\n}, \"spinner\")\n```\n\nThis will display a progress bar\n\n```lua\nrequire(\"ffmpeg\").run({\n  \"-i\", input,\n  \"-vcodec\", \"copy\", \n  \"-y\", output\n}, \"progress\")\n```\n\nRun Ffmpeg without showing any progress to a user\n\n```lua\nrequire(\"ffmpeg\").run({\n  \"-i\", input,\n  \"-vcodec\", \"copy\", \n  \"-y\", output\n}, \"none\")\n```\n\nGet media and stream details\n\n```lua\nlocal info = require(\"ffmpeg\").probe(input)\n\nprint(info.format.duration)\n```\n\nDisplay media file details\n\n```lua\nrequire(\"ffmpeg\").probe(input, true)\n```\n\n\u003e Returned result [example](info.json).\n\nDisplay media file streams\n\n```lua\nrequire(\"ffmpeg\").probe(input, false, true)\n```\n\nLicense:\n--------\nThe MIT License (MIT). Please see [`LICENSE`](./LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfy-j%2Fgoffli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwolfy-j%2Fgoffli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwolfy-j%2Fgoffli/lists"}