{"id":18652954,"url":"https://github.com/chromeos/cros-codecs","last_synced_at":"2025-04-05T04:12:17.250Z","repository":{"id":157048881,"uuid":"590294569","full_name":"chromeos/cros-codecs","owner":"chromeos","description":"A lightweight, simple, low-dependency, and hopefully safe crate for hardware-accelerated video decoding and encoding on Linux. (read-only mirror of https://android.googlesource.com/platform/system/cros-codecs/)","archived":false,"fork":false,"pushed_at":"2025-03-10T15:42:56.000Z","size":4670,"stargazers_count":34,"open_issues_count":33,"forks_count":12,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-29T03:08:48.335Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chromeos.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2023-01-18T04:21:13.000Z","updated_at":"2025-03-10T15:43:00.000Z","dependencies_parsed_at":"2023-09-25T06:00:16.644Z","dependency_job_id":"8d31f92b-2bd0-435b-bb08-7cd373adb6b1","html_url":"https://github.com/chromeos/cros-codecs","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chromeos%2Fcros-codecs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chromeos%2Fcros-codecs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chromeos%2Fcros-codecs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chromeos%2Fcros-codecs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chromeos","download_url":"https://codeload.github.com/chromeos/cros-codecs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284951,"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":[],"created_at":"2024-11-07T07:09:32.353Z","updated_at":"2025-04-05T04:12:17.226Z","avatar_url":"https://github.com/chromeos.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cros-codecs\n\n[\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/cros-codecs\"\u003e](https://crates.io/crates/cros-codecs)\n[\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/docsrs/cros-codecs\"\u003e](https://docs.rs/cros-codecs/latest/cros_codecs/)\n\nA lightweight, simple, low-dependency, and hopefully safe crate for\nhardware-accelerated video decoding and encoding on Linux.\n\nIt is developed for use in ChromeOS (particularly\n[crosvm](https://github.com/google/crosvm)), but has no dependency to ChromeOS\nand should be usable anywhere.\n\n## Current features\n\n- Simple decoder API,\n- VAAPI decoder support (using\n  [cros-libva](https://github.com/chromeos/cros-libva)) for H.264, H.265, VP8,\n  VP9 and AV1,\n- VAAPI encoder support for H.264, VP9 and AV1,\n- Stateful V4L2 encoder support.\n\n## Planned features\n\n- Stateful V4L2 decoder support,\n- Stateless V4L2 decoder support,\n- Support for more encoder codecs,\n- C API to be used in non-Rust projects.\n\n## Non-goals\n\n- Support for systems other than Linux.\n\n## Example programs\n\nThe `ccdec` example program can decode an encoded stream and write the decoded\nframes to a file. As such it can be used for testing purposes.\n\n```shell\n$ cargo build --examples\n$ ./target/debug/examples/ccdec --help\nUsage: ccdec \u003cinput\u003e [--output \u003coutput\u003e] --input-format \u003cinput-format\u003e [--output-format \u003coutput-format\u003e] [--compute-md5 \u003ccompute-md5\u003e]\n\nSimple player using cros-codecs\n\nPositional Arguments:\n  input             input file\n\nOptions:\n  --output          output file to write the decoded frames to\n  --input-format    input format to decode from.\n  --output-format   pixel format to decode into. Default: i420\n  --compute-md5     whether to display the MD5 of the decoded stream, and at\n                    which granularity (stream or frame)\n  --help            display usage information\n```\n\n## Testing\n\nFluster can be used for testing, using the `ccdec` example program described\nabove. [This branch](https://github.com/Gnurou/fluster/tree/cros-codecs)\ncontains support for cros-codecs testing. Just make sure the `ccdec` binary is\nin your `PATH`, and run Fluster using one of the `ccdec` decoders, e.g.\n\n```shell\npython fluster.py run -d ccdec-H.264 -ts JVT-AVC_V1\n```\n\n## Credits\n\nThe majority of the code in the initial commit has been written by Daniel\nAlmeida as a VAAPI backend for crosvm, before being split into this crate.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchromeos%2Fcros-codecs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchromeos%2Fcros-codecs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchromeos%2Fcros-codecs/lists"}