{"id":13645783,"url":"https://github.com/gen2brain/x264-go","last_synced_at":"2025-05-16T10:06:37.034Z","repository":{"id":44454401,"uuid":"121696293","full_name":"gen2brain/x264-go","owner":"gen2brain","description":"Go bindings for x264","archived":false,"fork":false,"pushed_at":"2024-10-22T18:21:36.000Z","size":2886,"stargazers_count":217,"open_issues_count":2,"forks_count":44,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-09T04:07:17.365Z","etag":null,"topics":["encoder","golang","x264"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gen2brain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-15T23:35:50.000Z","updated_at":"2025-03-14T09:05:28.000Z","dependencies_parsed_at":"2024-01-14T09:57:27.248Z","dependency_job_id":"222fcaba-1790-4754-97da-829aa45ff1bc","html_url":"https://github.com/gen2brain/x264-go","commit_stats":{"total_commits":78,"total_committers":2,"mean_commits":39.0,"dds":"0.012820512820512775","last_synced_commit":"732e1bdb7da2abf9709e6ec1a4ab3f8df23021d6"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gen2brain%2Fx264-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gen2brain%2Fx264-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gen2brain%2Fx264-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gen2brain%2Fx264-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gen2brain","download_url":"https://codeload.github.com/gen2brain/x264-go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254509476,"owners_count":22082891,"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":["encoder","golang","x264"],"created_at":"2024-08-02T01:02:41.701Z","updated_at":"2025-05-16T10:06:37.011Z","avatar_url":"https://github.com/gen2brain.png","language":"Go","funding_links":[],"categories":["HarmonyOS","Go"],"sub_categories":["Windows Manager"],"readme":"## x264-go\n[![Build Status](https://github.com/gen2brain/x264-go/actions/workflows/build.yml/badge.svg)](https://github.com/gen2brain/x264-go/actions)\n[![GoDoc](https://godoc.org/github.com/gen2brain/x264-go?status.svg)](https://godoc.org/github.com/gen2brain/x264-go) \n[![Go Report Card](https://goreportcard.com/badge/github.com/gen2brain/x264-go?branch=master)](https://goreportcard.com/report/github.com/gen2brain/x264-go) \n\n`x264-go` provides H.264/MPEG-4 AVC codec encoder based on [x264](https://www.videolan.org/developers/x264.html) library.\n\nC source code is included in package. If you want to use external shared/static library (i.e. built with asm and/or OpenCL) use `-tags extlib`\n\n### Installation\n\n    go get -u github.com/gen2brain/x264-go\n\n### Build tags\n\n* `extlib` - use external x264 library\n* `pkgconfig` - enable pkg-config (used with extlib)\n\n\n### Examples\n\nSee [screengrab](https://github.com/gen2brain/x264-go/blob/master/examples/screengrab/screengrab.go) example.\n\n### Usage\n\n```go\npackage main\n\nimport (\n\t\"bytes\"\n\t\"image\"\n\t\"image/color\"\n\t\"image/draw\"\n\n\t\"github.com/gen2brain/x264-go\"\n)\n\nfunc main() {\n\tbuf := bytes.NewBuffer(make([]byte, 0))\n\n\topts := \u0026x264.Options{\n\t\tWidth:     640,\n\t\tHeight:    480,\n\t\tFrameRate: 25,\n\t\tTune:      \"zerolatency\",\n\t\tPreset:    \"veryfast\",\n\t\tProfile:   \"baseline\",\n\t\tLogLevel:  x264.LogDebug,\n\t}\n\n\tenc, err := x264.NewEncoder(buf, opts)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\timg := x264.NewYCbCr(image.Rect(0, 0, opts.Width, opts.Height))\n\tdraw.Draw(img, img.Bounds(), image.Black, image.ZP, draw.Src)\n\n\tfor i := 0; i \u003c opts.Width/2; i++ {\n\t\timg.Set(i, opts.Height/2, color.RGBA{255, 0, 0, 255})\n\n\t\terr = enc.Encode(img)\n\t\tif err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\terr = enc.Flush()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\terr = enc.Close()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n\n## More\n\nFor AAC encoder see [aac-go](https://github.com/gen2brain/aac-go).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgen2brain%2Fx264-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgen2brain%2Fx264-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgen2brain%2Fx264-go/lists"}