Expand description
A Rust library for downloading media content from a DASH MPD manifest, as used for on-demand replay of TV content and video streaming services.
DASH (dynamic adaptive streaming over HTTP), also called MPEG-DASH, is a technology used for media streaming over the web, commonly used for video on demand (VOD) services. The Media Presentation Description (MPD) is a description of the resources (manifest or “playlist”) forming a streaming service, that a DASH client uses to determine which assets to request in order to perform adaptive streaming of the content. DASH MPD manifests can be used both with content encoded as MPEG and as WebM.
The DASH format is formally defined in ISO/IEC standard 23009-1:2022. This version of the standard is available for free online. XML schema files are available for no cost from ISO. When MPD files in practical use diverge from the formal standard, this library prefers to interoperate with existing practice.
This library provides support for downloading content (audio or video) described by an MPD
manifest. This involves selecting the alternative with the most appropriate encoding (in terms
of bitrate, codec, etc.), fetching segments of the content using HTTP or HTTPS requests (this
functionality depends on the reqwest crate) and muxing audio and video segments together
§DASH features supported
- VOD (static) stream manifests
- Multi-period content
- XLink elements (only with actuate=onLoad semantics, resolve-to-zero supported)
- All forms of segment index info: SegmentBase@indexRange, SegmentTimeline, SegmentTemplate@duration, SegmentTemplate@index, SegmentList
- Media containers of types supported by mkvmerge, ffmpeg, VLC and MP4Box (this includes Matroska, ISO-BMFF / CMAF / MP4, WebM, MPEG-2 TS)
- Subtitles: support for WebVTT, SRT, STPP, TTML, tx3g and SMIL streams, either provided as a single media stream or as a fragmented MP4 stream.
§Limitations / unsupported features
- Dynamic MPD manifests, that are used for live streaming/OTT TV
- XLink with actuate=onRequest semantics
- Application of MPD patches
Re-exports§
pub use crate::fetch::DashDownloader;pub use crate::fetch::ProgressObserver;pub use crate::fetch::parse_resolving_xlinks;
Modules§
- decryption
- Support for decrypting media content
- fetch
- Support for downloading content from DASH MPD media streams.
- ffmpeg
- Muxing support using mkvmerge/ffmpeg/vlc/mp4box as a subprocess.
- media
- If library feature
libavis enabled, muxing support (combining audio and video streams, which are often separated out in DASH streams) is provided by ffmpeg’s libav library, via theac_ffmpegcrate. Otherwise, muxing is implemented by callingmkvmerge,ffmpegorvlcas a subprocess. - sidx
- Parsing sidx boxes in ISOBMFF containers and WebM Cue information.
- stpp
- Support for the STPP subtitle format
- subtitles
- Support for extracting and converting subtitle tracks
- vtt
- Support for the VTT subtitle format