{"id":19602334,"url":"https://github.com/scottlamb/moonfire-ffmpeg","last_synced_at":"2025-10-28T23:41:00.001Z","repository":{"id":57640215,"uuid":"250737538","full_name":"scottlamb/moonfire-ffmpeg","owner":"scottlamb","description":"Rust wrapper around select parts of the ffmpeg libraries","archived":false,"fork":false,"pushed_at":"2022-04-12T19:43:38.000Z","size":142,"stargazers_count":5,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-23T08:51:29.455Z","etag":null,"topics":["ffmpeg","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/moonfire-ffmpeg","language":"Rust","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/scottlamb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-03-28T07:25:48.000Z","updated_at":"2024-11-10T23:48:03.000Z","dependencies_parsed_at":"2022-09-05T05:31:34.893Z","dependency_job_id":null,"html_url":"https://github.com/scottlamb/moonfire-ffmpeg","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottlamb%2Fmoonfire-ffmpeg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottlamb%2Fmoonfire-ffmpeg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottlamb%2Fmoonfire-ffmpeg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scottlamb%2Fmoonfire-ffmpeg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scottlamb","download_url":"https://codeload.github.com/scottlamb/moonfire-ffmpeg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251177993,"owners_count":21548143,"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":["ffmpeg","rust"],"created_at":"2024-11-11T09:23:35.409Z","updated_at":"2025-10-28T23:40:54.982Z","avatar_url":"https://github.com/scottlamb.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# moonfire-ffmpeg\n\n**Maintenance status:** inactive. May or may not become active again.\n\nA Rust wrapper around select parts of [ffmpeg](http://www.ffmpeg.org/) needed\nfor Moonfire NVR:\n\n*   ~~basic streaming: connecting to a RTSP stream.~~\n    Moonfire NVR now uses a pure-Rust RTSP library,\n    [Retina](https://crates.io/crates/retina).\n*   future video analytics: decoding H.264 (likely also H.265 eventually; and\n    eventually with hardware acceleration), converting its colorspace to RGB,\n    and downscaling it to feed to\n    [moonfire-tflite](https://github.com/scottlamb/moonfire-tflite).\n\nThere's a much more full-featured [ffmpeg](https://crates.io/crates/ffmpeg)\ncrate. A few reasons I use my own instead though:\n\n*   the ffmpeg crate isn't actively maintained. (There are some forks though.\n    Maybe [ffmpeg4](https://crates.io/crates/ffmpeg4) is what you're looking\n    for.)\n*   building moonfire-ffmpeg doesn't need bindgen, which can be a pain to\n    install on some platforms. (See its\n    [requirements](https://rust-lang.github.io/rust-bindgen/requirements.html).)\n    Instead, moonfire-ffmpeg uses a very thin C wrapper around ffmpeg to avoid\n    baking in (possibly version-specific) details of the ffmpeg ABI such as\n    struct layouts.\n*   moonfire-ffmpeg checks ABI compatibility between the ffmpeg it was\n    compiled with and the ffmpeg it's actually running with, which is\n    important for making it fool-proof with shared libraries. I think the\n    ffmpeg crate is more intended to be used with a static library.\n*   moonfire-ffmpeg exposes a few very specific pieces of the ffmpeg API that\n    I needed and the ffmpeg crate doesn't, such as reading non-understood\n    parameters to `avcodec_open2`.\n*   moonfire-ffmpeg is licensed under MIT and Apache-2.0, vs the ffmpeg\n    crate's WTFPL. I consider this an advantage for moonfire-ffmpeg because\n    WTFPL [scares away](https://opensource.google/docs/thirdparty/licenses/#wtfpl-not-allowed)\n    some people and companies.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottlamb%2Fmoonfire-ffmpeg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscottlamb%2Fmoonfire-ffmpeg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscottlamb%2Fmoonfire-ffmpeg/lists"}