{"id":13752409,"url":"https://github.com/kevmo314/codec-from-scratch","last_synced_at":"2025-10-13T10:16:17.329Z","repository":{"id":64366569,"uuid":"569851458","full_name":"kevmo314/codec-from-scratch","owner":"kevmo314","description":"Build a simple video encoder from scratch","archived":false,"fork":false,"pushed_at":"2025-03-07T05:13:32.000Z","size":30089,"stargazers_count":366,"open_issues_count":1,"forks_count":17,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-05-23T16:22:24.802Z","etag":null,"topics":["codec","go","golang","tutorial","video"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevmo314.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2022-11-23T19:00:20.000Z","updated_at":"2025-05-21T19:00:28.000Z","dependencies_parsed_at":"2025-03-24T11:12:56.244Z","dependency_job_id":"74954388-d1bf-400e-8950-71bfcedac23c","html_url":"https://github.com/kevmo314/codec-from-scratch","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/kevmo314/codec-from-scratch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevmo314%2Fcodec-from-scratch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevmo314%2Fcodec-from-scratch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevmo314%2Fcodec-from-scratch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevmo314%2Fcodec-from-scratch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevmo314","download_url":"https://codeload.github.com/kevmo314/codec-from-scratch/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevmo314%2Fcodec-from-scratch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279014682,"owners_count":26085554,"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-13T02:00:06.723Z","response_time":61,"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":["codec","go","golang","tutorial","video"],"created_at":"2024-08-03T09:01:05.379Z","updated_at":"2025-10-13T10:16:17.309Z","avatar_url":"https://github.com/kevmo314.png","language":"Go","readme":"# Video Encoding from Scratch\n\nEver wondered how a video encoder works? This is a simple video encoder\nthat walks through building a video encoder from scratch to achieve a 90% compression ratio!\n\nhttps://user-images.githubusercontent.com/511342/203627486-611066cd-f8e5-48c1-863b-eab9529ff90d.mp4\n\nStart by opening up `main.go`. You can run the code by running\n`cat video.rgb24 | go run main.go` and you should see this as output\n\n```sh\n$ cat video.rgb24 | go run main.go\n2022/11/23 13:54:03 Raw size: 53996544 bytes\n2022/11/23 13:54:03 YUV420P size: 26998272 bytes (50.00% original size)\n2022/11/23 13:54:03 RLE size: 13592946 bytes (25.17% original size)\n2022/11/23 13:54:15 DEFLATE size: 5457415 bytes (10.11% original size)\n```\n\nThe actual encoding is done in about 120 lines of code. This is meant\nto be a didactic exercise rather than a comprehensive guide, but maybe\nif there's interest we could add more features that appear in modern video\ncodecs.\n\nSample video from [Ketut Subiyanto](https://www.pexels.com/video/a-little-girl-preparing-a-scramble-egg-meal-4823190/).\n\n## Other languages\n\n* Rust: https://github.com/Carel155/codec-from-scratch-rust\n","funding_links":[],"categories":["Go","Tutorials"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevmo314%2Fcodec-from-scratch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevmo314%2Fcodec-from-scratch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevmo314%2Fcodec-from-scratch/lists"}