拿个MPD内容举个例子:
RVZFTlRJRD0yNUY0LFZFUlNJT049MTUsRkxBRz0wLFNUQVJUVElNRT1FNkJDMTE1OTU3LERVUkFUSU9OPTUyMzUsU1RBVFVTPTQsREVTQ180RD02NDY1NzUwRDQ4NjE3NzYxNjk2OTIwNDY2OTc2NjUyRDMwNDIwNTQyNjU3MjY1Njk3NDIwNjZGQzcyMjA2NTY5NkUyMDUzNzA2OTY1NkMzRjhBNDM3MjY5NkQ2NTJENTM2NTcyNjk2NTJDMjA1NTUzNDEyMDMyMzAzMTM2OEE0MTZDNzQ2NTcyNzM2NjcyNjU2OTY3NjE2MjY1M0EyMDYxNjIyMDMxMzIsREVTQ19CQj0xNyxERVNDX0JDPTU3
<AdaptationSet id&#61;"1" group&#61;"1" contentType&#61;"audio" segmentAlignment&#61;"true" audioSamplingRate&#61;"48000" mimeType&#61;"audio/mp4" codecs&#61;"mp4a.40.2" startWithSAP&#61;"1">
<SegmentTemplate timescale&#61;"48000" initialization&#61;"KabelEins_SD-$RepresentationID$.dash" media&#61;"KabelEins_SD-$RepresentationID$-$Time$.dash">
<AdaptationSet id&#61;"2" group&#61;"2" contentType&#61;"video" par&#61;"16:9" minBandwidth&#61;"576400" maxBandwidth&#61;"2276800" maxWidth&#61;"960" maxHeight&#61;"540" minFrameRate&#61;"25" maxFrameRate&#61;"50" segmentAlignment&#61;"true" sar&#61;"1:1" mimeType&#61;"video/mp4" startWithSAP&#61;"1">
蓝色部分是EIT信息&#xff0c;base64解密之后息的是&#xff1a;EVENTID&#61;25F4,VERSION&#61;15,FLAG&#61;0,STARTTIME&#61;E6BC115957,DURATION&#61;5235,STATUS&#61;4,DESC_4D&#61;6465750D48617761696920466976652D3042054265726569742066FC722065696E20537069656C3F8A4372696D652D53657269652C2055534120323031368A416C7465727366726569676162653A206162203132,DESC_BB&#61;17,DESC_BC&#61;57
红色部分是加密信息&#xff0c;里面有playready 和 widevine 加密default_KID&#61;"C8EFFF27-6E1A-D9E6-693F-3E0B64C8EFEC" kid信息。
紫色部分是音频分片信息 绿色是视频信息
来看音频信息&#xff1a;
<SegmentTemplate timescale&#61;"48000" initialization&#61;"KabelEins_SD-$RepresentationID$.dash" media&#61;"KabelEins_SD-$RepresentationID$-$Time$.dash">
timescale 时间精度&#xff0c;也就是1秒的分辨率
initialization 初始化分片格式 KabelEins_SD-$RepresentationID$.dash 根据后面的RepresentationID audio_129713_deu&#61;129200可知道该音频的初始化分片为 KabelEins_SD-audio_129713_deu&#61;129200.dash
media 媒体文件名称KabelEins_SD-$RepresentationID$-$Time$.dash 根据后面的RepresentationID audio_129713_deu&#61;129200和 SegmentTimeline 值可以知道实际分片&#xff1a;
t 开始时间 d duration 实际分片时间是 d/timscale &#61; 8s &#xff0c;r repeat &#xff0c;那么当前mpd文件 有三个分片 time 为&#xff1a;
76646543257932/76646543257932&#43;384000&#61;76646543641932/76646543257932&#43;384000&#43;384000&#61;76646544025932
KabelEins_SD-audio_129713_deu&#61;129200-76646543257932.dash
KabelEins_SD-audio_129713_deu&#61;129200-76646543641932.dash
KabelEins_SD-audio_129713_deu&#61;129200-76646544025932.dash
同理可以推出视频信息&#xff0c;那么针对该MPD内容我们可以得出如下的信息&#xff1a;
1.dash流里有eit信息
2.dash流为加密流含有两种加密 playready 和 widevine
3.音频流只有一个格式分片 初始化分片&#xff08;主要用于解码器预载&#xff09;KabelEins_SD-audio_129713_deu&#61;129200.dash 音频分片有三个 KabelEins_SD-audio_129713_deu&#61;129200-76646543257932.dash/KabelEins_SD-audio_129713_deu&#61;129200-76646543641932.dash/KabelEins_SD-audio_129713_deu&#61;129200-76646544025932.dash 每个分片时长8s
4.视频流有多个带宽&#xff0c;分片时长为8s &#xff1a;
初始化分片 KabelEins_SD-video&#61;576400.dash 分片信息 KabelEins_SD-video&#61;576400-958081790714.dash/KabelEins_SD-video&#61;576400-958081795514.dash/KabelEins_SD-video&#61;576400-958081800314.dash/KabelEins_SD-video&#61;576400-958081805114.dash/KabelEins_SD-video&#61;576400-958081809914.dash
初始化分片 KabelEins_SD-video&#61;1138400.dash 分片信息 KabelEins_SD-video&#61;1138400-958081790714.dash/KabelEins_SD-video&#61;1138400-958081795514.dash/KabelEins_SD-video&#61;1138400-958081800314.dash/KabelEins_SD-video&#61;1138400-958081805114.dash /KabelEins_SD-video&#61;576400-958081809914.dash
初始化分片 KabelEins_SD-video&#61;2276800.dash 分片信息 KabelEins_SD-video&#61;2276800-958081790714.dash/KabelEins_SD-video&#61;2276800-958081795514.dash/KabelEins_SD-video&#61;2276800-958081800314.dash/KabelEins_SD-video&#61;2276800-958081805114.dash/KabelEins_SD-video&#61;576400-958081809914.dash