{"id":49081131,"url":"https://github.com/stan-smith/aml-gst-rs","last_synced_at":"2026-04-20T13:14:19.584Z","repository":{"id":348050854,"uuid":"1168643627","full_name":"stan-smith/aml-gst-rs","owner":"stan-smith","description":"GStreamer HW encoder/decoder plugin for Amlogic A311D2 (VIM4)","archived":false,"fork":false,"pushed_at":"2026-03-02T16:44:12.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-03-30T16:42:06.465Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stan-smith.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-27T16:22:14.000Z","updated_at":"2026-03-02T16:45:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/stan-smith/aml-gst-rs","commit_stats":null,"previous_names":["stan-smith/aml-gst-rs"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/stan-smith/aml-gst-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stan-smith%2Faml-gst-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stan-smith%2Faml-gst-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stan-smith%2Faml-gst-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stan-smith%2Faml-gst-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stan-smith","download_url":"https://codeload.github.com/stan-smith/aml-gst-rs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stan-smith%2Faml-gst-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32048566,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T11:35:06.609Z","status":"ssl_error","status_checked_at":"2026-04-20T11:34:48.899Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-04-20T13:14:18.365Z","updated_at":"2026-04-20T13:14:19.576Z","avatar_url":"https://github.com/stan-smith.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"aml-gst-rs\n\nGStreamer plugin providing hardware-accelerated video encoding and decoding\nfor Amlogic A311D2 SoCs (Khadas VIM4). Wraps the amvenc_* API from\nlibamvenc.so and the V4L2 stateful decoder.\n\nElements:\n\n  amlvenc_rs - H265/H264 hardware encoder\n    codec     h265 (default) or h264\n    bitrate   100000-50000000 (default 2000000), changeable during playback\n    gop       1-1000 (default 30)\n\n  amlvdec_rs - H264 hardware decoder\n    framerate 1-240 (default 25)\n    Wraps v4l2h264dec and fixes two kernel driver bugs:\n    - framerate=0/1 in output caps\n    - NV12 height alignment (1080 -\u003e 1088) causing wrong UV plane offset\n\nBuild (natively on the target):\n\n  cargo build --release\n  sudo cp target/release/libgstamlvenc.so \\\n    /usr/lib/aarch64-linux-gnu/gstreamer-1.0/libgstamlvenc_rs.so\n  rm -f ~/.cache/gstreamer-1.0/registry.*.bin\n\nRequires Rust 1.70+, GStreamer 1.20+ dev libraries, and libamvenc.so\non the target system.\n\nUsage:\n\n  # Encode test pattern to H265\n  gst-launch-1.0 videotestsrc num-buffers=300 \\\n    ! video/x-raw,format=NV12,width=1920,height=1080,framerate=25/1 \\\n    ! amlvenc_rs codec=h265 bitrate=2000000 \\\n    ! filesink location=out.h265\n\n  # HW transcode H264 to H265\n  gst-launch-1.0 filesrc location=input.h264 \\\n    ! h264parse ! amlvdec_rs framerate=25 \\\n    ! amlvenc_rs codec=h265 bitrate=2000000 \\\n    ! filesink location=out.h265\n\n  # RTSP camera transcode\n  gst-launch-1.0 rtspsrc location=rtsp://... latency=100 \\\n    ! rtph264depay ! h264parse \\\n    ! amlvdec_rs framerate=25 \\\n    ! amlvenc_rs codec=h265 \\\n    ! filesink location=out.h265\n\nPerformance (1080p NV12, 2Mbps H265, 1000 frames):\n\n  Encode-only:  11.3s wall, 2.3s CPU (matches aml_enc_test)\n  HW transcode: 15.7s wall, 9.0s CPU (decode + encode)\n  Per-frame:    15.7ms encode, 2.5x real-time headroom at 25fps\n\nThe V4L2 decoder driver accounts for most of the transcode overhead\n(8.5ms/frame in ioctl calls). The encoder itself has no measurable\noverhead vs the vendor CLI tool.\n\nKnown issues:\n\n  If the encoder process is killed (SIGKILL, timeout, OOM), the VPU\n  hardware enters a broken state that persists until reboot. Always\n  stop pipelines with SIGINT. Delete /tmp/vpu_mutex.map after crashes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstan-smith%2Faml-gst-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstan-smith%2Faml-gst-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstan-smith%2Faml-gst-rs/lists"}