{"id":22352704,"url":"https://github.com/koushiro/flvparse","last_synced_at":"2025-07-30T07:32:52.215Z","repository":{"id":43397616,"uuid":"150286188","full_name":"koushiro/flvparse","owner":"koushiro","description":"A FLV format parsing library written in Rust with nom.","archived":false,"fork":false,"pushed_at":"2023-09-05T01:37:56.000Z","size":10888,"stargazers_count":8,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-30T08:36:24.220Z","etag":null,"topics":["flv","flv-parser","nom","parse","rust"],"latest_commit_sha":null,"homepage":"","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/koushiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-25T15:14:52.000Z","updated_at":"2024-04-04T13:29:46.000Z","dependencies_parsed_at":"2022-09-16T16:43:24.162Z","dependency_job_id":null,"html_url":"https://github.com/koushiro/flvparse","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koushiro%2Fflvparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koushiro%2Fflvparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koushiro%2Fflvparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/koushiro%2Fflvparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/koushiro","download_url":"https://codeload.github.com/koushiro/flvparse/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228109004,"owners_count":17870921,"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":["flv","flv-parser","nom","parse","rust"],"created_at":"2024-12-04T12:26:59.343Z","updated_at":"2024-12-04T12:27:00.337Z","avatar_url":"https://github.com/koushiro.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# flvparse\n\n[![ga-svg]][ga-url]\n[![crates-svg]][crates-url]\n[![docs-svg]][docs-url]\n[![codecov-svg]][codecov-url]\n[![deps-svg]][deps-url]\n\n[ga-svg]: https://github.com/koushiro/flvparse/workflows/build/badge.svg\n[ga-url]: https://github.com/koushiro/flvparse/actions\n[crates-svg]: https://img.shields.io/crates/v/flvparse\n[crates-url]: https://crates.io/crates/flvparse\n[docs-svg]: https://docs.rs/flvparse/badge.svg\n[docs-url]: https://docs.rs/flvparse\n[codecov-svg]: https://img.shields.io/codecov/c/github/koushiro/flvparse\n[codecov-url]: https://codecov.io/gh/koushiro/flvparse\n[deps-svg]: https://deps.rs/repo/github/koushiro/flvparse/status.svg\n[deps-url]: https://deps.rs/repo/github/koushiro/flvparse\n\nA FLV format parsing library written in Rust with [nom](https://github.com/Geal/nom).\n\n## Usage\n\n### Quick start\n\n```toml\n[dependencies]\nflvparse = \"0.1\"\n```\n\n```rust\nfn main() {\n    let bytes = include_bytes!(\"assets/test.flv\");\n    let flv = flvparse::FlvFile::parse(bytes).unwrap();\n    // ...\n}\n```\n\n### Example\n\nSee [example](cmd/src/main.rs) for details.\n\n```\ncd cmd\ncargo run -- --input ../assets/test.flv\n\n+-----------------+-----------+\n| FLV File Header |           |\n+-----------------+-----------+\n| Signature (3B)  | 46 4c 56  |\n| Version (1B)    | 1         |\n| Flags (1B)      | 0000 0101 |\n| DataOffset (4B) | 9         |\n+-----------------+-----------+\n+------------------+-------------------+------------------+------------------+\n| Total tag number | Script tag number | Video tag number | Audio tag number |\n+------------------+-------------------+------------------+------------------+\n| 13041            | 1                 | 4668             | 8372             |\n+------------------+-------------------+------------------+------------------+\n```\n\n```\ncd cmd\ncargo run -- --input ../assets/test.flv -p\n+-----------------+-----------+\n| FLV File Header |           |\n+-----------------+-----------+\n| Signature (3B)  | 46 4c 56  |\n| Version (1B)    | 1         |\n| Flags (1B)      | 0000 0101 |\n| DataOffset (4B) | 9         |\n+-----------------+-----------+\n+---------------+--------------+---------------+----------------+---------------+\n| FLV File Body |              |               |                |               |\n+---------------+--------------+---------------+----------------+---------------+\n| Index         | TagType (1B) | DataSize (3B) | Timestamp (4B) | StreamID (3B) |\n| 1             | Script       | 1030          | 0              | 0             |\n| 2             | Video        | 48            | 0              | 0             |\n| 3             | Audio        | 7             | 0              | 0             |\n| 4             | Video        | 2831          | 0              | 0             |\n| ...                                                                           |\n| 13039         | Audio        | 15            | 194494         | 0             |\n| 13040         | Audio        | 15            | 194517         | 0             |\n| 13041         | Video        | 5             | 194375         | 0             |\n+---------------+--------------+---------------+----------------+---------------+\n+------------------+-------------------+------------------+------------------+\n| Total tag number | Script tag number | Video tag number | Audio tag number |\n+------------------+-------------------+------------------+------------------+\n| 13041            | 1                 | 4668             | 8372             |\n+------------------+-------------------+------------------+------------------+\n```\n\n### Related structure\n\n```\nFlvFile\n├──FlvFileHeader\n└──FlvFileBody\n   ├──u32 -- first previous tag size\n   └──Vec\u003c(FlvTag, u32)\u003e\n    \nFlvTag\n├──FlvTagHeader\n└──FlvTagData\n\nFlvTagData\n└──ScriptTag/VideoTag/AudioTag\n```\n\n## License\n\nLicensed under either of\n\n- [Apache License, Version 2.0](LICENSE-APACHE)\n- [MIT License](LICENSE-MIT)\n\nat your option.\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoushiro%2Fflvparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkoushiro%2Fflvparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkoushiro%2Fflvparse/lists"}