{"id":13628871,"url":"https://github.com/lieff/minih264","last_synced_at":"2025-04-05T22:06:54.531Z","repository":{"id":63177111,"uuid":"149658703","full_name":"lieff/minih264","owner":"lieff","description":"Minimalistic H264/SVC encoder single header library","archived":false,"fork":false,"pushed_at":"2020-12-10T15:56:51.000Z","size":30981,"stargazers_count":545,"open_issues_count":4,"forks_count":55,"subscribers_count":26,"default_branch":"master","last_synced_at":"2025-03-29T21:06:44.487Z","etag":null,"topics":["codec","encoder","encoding","h264","h264-svc","mini","minimal","single-header","single-header-lib","svc","video","video-codec","x264"],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lieff.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}},"created_at":"2018-09-20T19:18:46.000Z","updated_at":"2025-03-26T03:34:57.000Z","dependencies_parsed_at":"2022-11-14T11:19:00.024Z","dependency_job_id":null,"html_url":"https://github.com/lieff/minih264","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lieff%2Fminih264","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lieff%2Fminih264/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lieff%2Fminih264/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lieff%2Fminih264/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lieff","download_url":"https://codeload.github.com/lieff/minih264/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247406088,"owners_count":20933803,"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":["codec","encoder","encoding","h264","h264-svc","mini","minimal","single-header","single-header-lib","svc","video","video-codec","x264"],"created_at":"2024-08-01T22:00:58.770Z","updated_at":"2025-04-05T22:06:54.509Z","avatar_url":"https://github.com/lieff.png","language":"C","readme":"minih264\n==========\n\n[![Build Status](https://travis-ci.org/lieff/minih264.svg)](https://travis-ci.org/lieff/minih264)\n\nSmall, but yet reasonably fast H264/SVC encoder single-header library with SSE/NEON optimizations.\nDecoder can be popped up in future.\n\nDisclaimer: code highly experimental.\n\n## Comparison with [x264](https://www.videolan.org/developers/x264.html)\n\nRough comparison with x264 on an i7-6700K:\n\n`x264 -I 30 --profile baseline --preset veryfast --tune zerolatency -b 0 -r 1 --qp 33 --ipratio 1.0 --qcomp 1.0 -o x264.264 --fps 30 vectors/foreman.cif --input-res 352x288 --slices 1 --threads 1`\n\nvs\n\n`./h264enc_x64 vectors/foreman.cif`\n\n| x264         | minih264 |\n| ------------ | -------- |\n| source: ~4.6mb | 409kb |\n| binary: 1.2mb | 100kb |\n| time: 0,282s | 0,503s |\n| out size: 320kb | 391kb  |\n\nPSNR:\n```\nx264:     PSNR y:32.774824 u:38.874450 v:39.926132 average:34.084281 min:31.842667 max:36.630286\nminih264: PSNR y:33.321686 u:38.858879 v:39.955914 average:34.574459 min:32.389171 max:37.174073\n```\n\nFirst intra frame screenshot (left-to-right: original 152064, minih264 5067, x264 5297 bytes):\n\n![Intra screenshot](images/intra.png?raw=true)\n\nYou can compare results in motion using ffplay/mpv players on vectors/out_ref.264 and vectors/x264.264 .\n\n## Usage\n\nTBD\n\n## SVC\n\nMinih264 supports both spatial and temporal layers. Spatial layers are almost same as encode 2 independent AVC streams except for Intra frames prediction.\nFollowing diagram shows minih264 SVC scheme for two spatial layers:\n\n![SVC diargam](images/svc.png?raw=true)\n\nThat's because P frames spatial prediction are almost useless in practice. But for Intra frames there is a ~20% benefit in full resolution frame size.\nNote that decoder must have both base layer I frame _and_ full resolution SVC I frame to decode whole sequence of next P frames in full resolution.\n\n## Limitations\n\nThe following major features are not supported compared to x264 (baseline):\n\n * Trellis quantization.\n * Select prediction mode using Sum of Absolute Transform Differences (SATD).\n * 4x4 motion compensation.\n\n## Interesting links\n\n * https://www.videolan.org/developers/x264.html\n * https://www.openh264.org/\n * https://github.com/cisco/openh264\n * http://iphome.hhi.de/suehring/tml/\n * https://github.com/oneam/h264bsd\n * https://github.com/fhunleth/hollowcore-h264\n * https://github.com/digetx/h264_decoder\n * https://github.com/lspbeyond/p264decoder\n * https://github.com/jcasal-homer/HomerHEVC\n * https://github.com/ultravideo/kvazaar\n * https://github.com/neocoretechs/h264j\n * https://github.com/jcodec/jcodec\n","funding_links":[],"categories":["C","Maths"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flieff%2Fminih264","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flieff%2Fminih264","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flieff%2Fminih264/lists"}