playdash
Parse MPEG-DASH manifests for progressive, seekable streaming playback.
This crate lets you play MPEG-DASH streams with seeking.
Installation
[]
= "0.1"
Streaming
DashManifest::stream returns a StreamReader that implements std::io::Read and
std::io::Seek, so it can feed an MP4 demuxer or playback system.
use Read;
use Duration;
use DashManifest;
#
Rodio playback
The rodio feature adds DashSource, a ready-to-use rodio source for rodio and symphonia.
[]
= { = "0.1", = ["rodio"] }
= { = "0.22", = false, = ["playback"] }
use ;
use ;
#
Buffer progress
StreamReader::buffer returns a handle that reports how much of the stream its cache holds, in fragments, bytes and media time. DashSource::buffer reports the same for a rodio source.
use ;
#
Encrypted streams
The encryption feature decrypts ISO Common Encryption (cenc and cbcs) in pure Rust, given
content keys you already hold. It does not talk to a DRM licence server or CDM.
[]
= { = "0.1", = ["encryption", "rodio"] }
use ;
#
Limitations
-
Hierarchical
sidxindexes are not supported. -
Multi-period playback and live (
type="dynamic") manifests are not yet supported. -
DRM systems such as Widevine and FairPlay are not supported. The encryption feature accepts content keys supplied by the caller; it does not acquire licenses. Widevine support is planned.
Example player
See the example player source on GitHub.
Example Usage:
# Big Buck Bunny, HE-AAC, SegmentTemplate with $Number$
# Envivio, AAC-LC, 48 kHz, SegmentTemplate with $Number$
# Shaka Player's "Angel One", AAC-LC, SegmentBase (sidx index)
# DASH-IF test vector, Elephants Dream, HE-AAC, SegmentBase; audio is listed first
License
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.