#flash #rtmp #flv #byte #amf0

scuffle-amf0

A pure-rust implementation of AMF0 encoder and decoder

5 releases

Uses new Rust 2024

new 0.2.2 May 17, 2025
0.2.1 May 15, 2025
0.2.0 Apr 27, 2025
0.1.1 Feb 21, 2025
0.0.2 Feb 9, 2025

#188 in Video

Download history 344/week @ 2025-02-09 134/week @ 2025-02-16 23/week @ 2025-02-23 18/week @ 2025-03-02 4/week @ 2025-03-09 3/week @ 2025-04-06 3/week @ 2025-04-13 137/week @ 2025-04-27 18/week @ 2025-05-04 185/week @ 2025-05-11

340 downloads per month
Used in 3 crates (2 directly)

MIT/Apache

185KB
4.5K SLoC

scuffle-amf0

[!WARNING]
This crate is under active development and may not be stable.

License: MIT OR Apache-2.0 docs.rs crates.io GitHub Actions: ci Codecov


A pure-rust implementation of AMF0 encoder and decoder.

This crate provides serde support for serialization and deserialization of AMF0 data.

See the changelog for a full release history.

Feature flags

  • serde — Enables serde support
  • docs — Enables changelog and documentation of feature flags

Specification

Name Version Link Comments
Action Message Format – AMF 0 - https://rtmp.veriskope.com/pdf/amf0-file-format-specification.pdf Refered to as ‘AMF0 spec’ in this documentation

Limitations

  • Does not support AMF0 references.
  • Does not support the AVM+ Type Marker. (see AMF 0 spec, 3.1)

Example

// Decode a string value from bytes
let value: String = scuffle_amf0::from_slice(bytes)?;

// .. do something with the value

// Encode a value into a writer
scuffle_amf0::to_writer(&mut writer, &value)?;

License

This project is licensed under the MIT or Apache-2.0 license. You can choose between one of them if you use this work.

SPDX-License-Identifier: MIT OR Apache-2.0

Dependencies

~0.6–1.8MB
~34K SLoC