Shaka Packager is a command line tool provided by Google to package content for DASH and HLS streaming.
To install Shaka Packager simply pick an option available here.
In this guide we will review how to create on-demand DASH streams that work well with Radiant Media Player. Feel free to also browse our AV1 documentation.
Before we can use Shaka Packager we need to transcode our content in various/codecs renditions. Shaka Packager is not a transcoder, only a segmenter. Prepare your content with your favourite encoder or refer to our FFmpeg guide to produce MP4 or WebM files that can be used as input for Shaka Packager.
A complete tutorial for using Shaka Packager with more advanced options is available here.
To DASH content for on-demand delivery - 7 renditions in this example from 180p to 2160p in a WebM container (typically VP9/opus or AV1/opus):
packager \ in=out-180p.webm,stream=audio,output=audio.webm \ in=out-180p.webm,stream=video,output=180p.webm \ in=out-270p.webm,stream=video,output=270p.webm \ in=out-360p.webm,stream=video,output=360p.webm \ in=out-540p.webm,stream=video,output=540p.webm \ in=out-720p.webm,stream=video,output=720p.webm \ in=out-1080p.webm,stream=video,output=1080p.webm \ in=out-1440p.webm,stream=video,output=1440p.webm \ in=out-2160p.webm,stream=video,output=2160p.webm \ --mpd_output manifest.mpd
First we specify an entry for our audio stream (audio.webm) then entries for each video stream (7 video renditions).
An example of DASH manifest with AV1/Opus in WebM container generated with the above command line can be found here:
https://www.radiantmediaplayer.com/media/dash/4k-vp9/manifest.mpd
To DASH content for on-demand delivery - 7 renditions in this example from 180p to 2160p in a WebM container (typically VP9/opus or AV1/opus) with a fallback to AVC/AAC in MP4 container:
packager \ in=out-180p.mp4,stream=audio,output=audio.mp4 \ in=out-180p.mp4,stream=video,output=180p.mp4 \ in=out-270p.mp4,stream=video,output=270p.mp4 \ in=out-360p.mp4,stream=video,output=360p.mp4 \ in=out-540p.mp4,stream=video,output=540p.mp4 \ in=out-720p.mp4,stream=video,output=720p.mp4 \ in=out-1080p.mp4,stream=video,output=1080p.mp4 \ in=out-1440p.mp4,stream=video,output=1440p.mp4 \ in=out-2160p.mp4,stream=video,output=2160p.mp4 \ in=out-180p.webm,stream=audio,output=audio.webm \ in=out-180p.webm,stream=video,output=180p.webm \ in=out-270p.webm,stream=video,output=270p.webm \ in=out-360p.webm,stream=video,output=360p.webm \ in=out-540p.webm,stream=video,output=540p.webm \ in=out-720p.webm,stream=video,output=720p.webm \ in=out-1080p.webm,stream=video,output=1080p.webm \ in=out-1440p.webm,stream=video,output=1440p.webm \ in=out-2160p.webm,stream=video,output=2160p.webm \ --mpd_output manifest.mpd
First we specify entries for our first codec pair (H.264 video with AAC audio - for large compatibility): 1 audio stream (audio.mp4) and 7 video streams - then we specify our second codec pair (AV1 video and Opus audio for best performance on latest browsers): 1 audio stream (audio.web) and 7 video streams as well.
An example of DASH manifest with H.264/AAC in MP4 container and AV1/opus in WebM container generated with the above command line can be found here:
https://www.radiantmediaplayer.com/media/dash/4k-av1-avc/manifest.mpd
©2015-2024 Radiant Media Player. All Rights Reserved.