mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
node_modules
This commit is contained in:
parent
6fa46f4e34
commit
680eb33f0d
4375 changed files with 1042080 additions and 6 deletions
237
node_modules/mpd-parser/src/playlist-merge.js
generated
vendored
Normal file
237
node_modules/mpd-parser/src/playlist-merge.js
generated
vendored
Normal file
|
@ -0,0 +1,237 @@
|
|||
import { forEachMediaGroup } from '@videojs/vhs-utils/es/media-groups';
|
||||
import { findIndex, union } from './utils/list';
|
||||
|
||||
const SUPPORTED_MEDIA_TYPES = ['AUDIO', 'SUBTITLES'];
|
||||
// allow one 60fps frame as leniency (arbitrarily chosen)
|
||||
const TIME_FUDGE = 1 / 60;
|
||||
|
||||
/**
|
||||
* Given a list of timelineStarts, combines, dedupes, and sorts them.
|
||||
*
|
||||
* @param {TimelineStart[]} timelineStarts - list of timeline starts
|
||||
*
|
||||
* @return {TimelineStart[]} the combined and deduped timeline starts
|
||||
*/
|
||||
export const getUniqueTimelineStarts = (timelineStarts) => {
|
||||
return union(timelineStarts, ({ timeline }) => timeline)
|
||||
.sort((a, b) => (a.timeline > b.timeline) ? 1 : -1);
|
||||
};
|
||||
|
||||
/**
|
||||
* Finds the playlist with the matching NAME attribute.
|
||||
*
|
||||
* @param {Array} playlists - playlists to search through
|
||||
* @param {string} name - the NAME attribute to search for
|
||||
*
|
||||
* @return {Object|null} the matching playlist object, or null
|
||||
*/
|
||||
export const findPlaylistWithName = (playlists, name) => {
|
||||
for (let i = 0; i < playlists.length; i++) {
|
||||
if (playlists[i].attributes.NAME === name) {
|
||||
return playlists[i];
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets a flattened array of media group playlists.
|
||||
*
|
||||
* @param {Object} manifest - the main manifest object
|
||||
*
|
||||
* @return {Array} the media group playlists
|
||||
*/
|
||||
export const getMediaGroupPlaylists = (manifest) => {
|
||||
let mediaGroupPlaylists = [];
|
||||
|
||||
forEachMediaGroup(manifest, SUPPORTED_MEDIA_TYPES, (properties, type, group, label) => {
|
||||
mediaGroupPlaylists = mediaGroupPlaylists.concat(properties.playlists || []);
|
||||
});
|
||||
|
||||
return mediaGroupPlaylists;
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the playlist's media sequence numbers.
|
||||
*
|
||||
* @param {Object} config - options object
|
||||
* @param {Object} config.playlist - the playlist to update
|
||||
* @param {number} config.mediaSequence - the mediaSequence number to start with
|
||||
*/
|
||||
export const updateMediaSequenceForPlaylist = ({ playlist, mediaSequence }) => {
|
||||
playlist.mediaSequence = mediaSequence;
|
||||
playlist.segments.forEach((segment, index) => {
|
||||
segment.number = playlist.mediaSequence + index;
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Updates the media and discontinuity sequence numbers of newPlaylists given oldPlaylists
|
||||
* and a complete list of timeline starts.
|
||||
*
|
||||
* If no matching playlist is found, only the discontinuity sequence number of the playlist
|
||||
* will be updated.
|
||||
*
|
||||
* Since early available timelines are not supported, at least one segment must be present.
|
||||
*
|
||||
* @param {Object} config - options object
|
||||
* @param {Object[]} oldPlaylists - the old playlists to use as a reference
|
||||
* @param {Object[]} newPlaylists - the new playlists to update
|
||||
* @param {Object} timelineStarts - all timelineStarts seen in the stream to this point
|
||||
*/
|
||||
export const updateSequenceNumbers = ({ oldPlaylists, newPlaylists, timelineStarts }) => {
|
||||
newPlaylists.forEach((playlist) => {
|
||||
playlist.discontinuitySequence = findIndex(
|
||||
timelineStarts,
|
||||
({ timeline }) => timeline === playlist.timeline
|
||||
);
|
||||
|
||||
// Playlists NAMEs come from DASH Representation IDs, which are mandatory
|
||||
// (see ISO_23009-1-2012 5.3.5.2).
|
||||
//
|
||||
// If the same Representation existed in a prior Period, it will retain the same NAME.
|
||||
const oldPlaylist = findPlaylistWithName(oldPlaylists, playlist.attributes.NAME);
|
||||
|
||||
if (!oldPlaylist) {
|
||||
// Since this is a new playlist, the media sequence values can start from 0 without
|
||||
// consequence.
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO better support for live SIDX
|
||||
//
|
||||
// As of this writing, mpd-parser does not support multiperiod SIDX (in live or VOD).
|
||||
// This is evident by a playlist only having a single SIDX reference. In a multiperiod
|
||||
// playlist there would need to be multiple SIDX references. In addition, live SIDX is
|
||||
// not supported when the SIDX properties change on refreshes.
|
||||
//
|
||||
// In the future, if support needs to be added, the merging logic here can be called
|
||||
// after SIDX references are resolved. For now, exit early to prevent exceptions being
|
||||
// thrown due to undefined references.
|
||||
if (playlist.sidx) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Since we don't yet support early available timelines, we don't need to support
|
||||
// playlists with no segments.
|
||||
const firstNewSegment = playlist.segments[0];
|
||||
const oldMatchingSegmentIndex = findIndex(oldPlaylist.segments, (oldSegment) =>
|
||||
Math.abs(oldSegment.presentationTime - firstNewSegment.presentationTime) <
|
||||
TIME_FUDGE);
|
||||
|
||||
// No matching segment from the old playlist means the entire playlist was refreshed.
|
||||
// In this case the media sequence should account for this update, and the new segments
|
||||
// should be marked as discontinuous from the prior content, since the last prior
|
||||
// timeline was removed.
|
||||
if (oldMatchingSegmentIndex === -1) {
|
||||
updateMediaSequenceForPlaylist({
|
||||
playlist,
|
||||
mediaSequence: oldPlaylist.mediaSequence + oldPlaylist.segments.length
|
||||
});
|
||||
playlist.segments[0].discontinuity = true;
|
||||
playlist.discontinuityStarts.unshift(0);
|
||||
|
||||
// No matching segment does not necessarily mean there's missing content.
|
||||
//
|
||||
// If the new playlist's timeline is the same as the last seen segment's timeline,
|
||||
// then a discontinuity can be added to identify that there's potentially missing
|
||||
// content. If there's no missing content, the discontinuity should still be rather
|
||||
// harmless. It's possible that if segment durations are accurate enough, that the
|
||||
// existence of a gap can be determined using the presentation times and durations,
|
||||
// but if the segment timing info is off, it may introduce more problems than simply
|
||||
// adding the discontinuity.
|
||||
//
|
||||
// If the new playlist's timeline is different from the last seen segment's timeline,
|
||||
// then a discontinuity can be added to identify that this is the first seen segment
|
||||
// of a new timeline. However, the logic at the start of this function that
|
||||
// determined the disconinuity sequence by timeline index is now off by one (the
|
||||
// discontinuity of the newest timeline hasn't yet fallen off the manifest...since
|
||||
// we added it), so the disconinuity sequence must be decremented.
|
||||
//
|
||||
// A period may also have a duration of zero, so the case of no segments is handled
|
||||
// here even though we don't yet support early available periods.
|
||||
if ((!oldPlaylist.segments.length && playlist.timeline > oldPlaylist.timeline) ||
|
||||
(oldPlaylist.segments.length && playlist.timeline >
|
||||
oldPlaylist.segments[oldPlaylist.segments.length - 1].timeline)) {
|
||||
playlist.discontinuitySequence--;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// If the first segment matched with a prior segment on a discontinuity (it's matching
|
||||
// on the first segment of a period), then the discontinuitySequence shouldn't be the
|
||||
// timeline's matching one, but instead should be the one prior, and the first segment
|
||||
// of the new manifest should be marked with a discontinuity.
|
||||
//
|
||||
// The reason for this special case is that discontinuity sequence shows how many
|
||||
// discontinuities have fallen off of the playlist, and discontinuities are marked on
|
||||
// the first segment of a new "timeline." Because of this, while DASH will retain that
|
||||
// Period while the "timeline" exists, HLS keeps track of it via the discontinuity
|
||||
// sequence, and that first segment is an indicator, but can be removed before that
|
||||
// timeline is gone.
|
||||
const oldMatchingSegment = oldPlaylist.segments[oldMatchingSegmentIndex];
|
||||
|
||||
if (oldMatchingSegment.discontinuity && !firstNewSegment.discontinuity) {
|
||||
firstNewSegment.discontinuity = true;
|
||||
playlist.discontinuityStarts.unshift(0);
|
||||
playlist.discontinuitySequence--;
|
||||
}
|
||||
|
||||
updateMediaSequenceForPlaylist({
|
||||
playlist,
|
||||
mediaSequence: oldPlaylist.segments[oldMatchingSegmentIndex].number
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Given an old parsed manifest object and a new parsed manifest object, updates the
|
||||
* sequence and timing values within the new manifest to ensure that it lines up with the
|
||||
* old.
|
||||
*
|
||||
* @param {Array} oldManifest - the old main manifest object
|
||||
* @param {Array} newManifest - the new main manifest object
|
||||
*
|
||||
* @return {Object} the updated new manifest object
|
||||
*/
|
||||
export const positionManifestOnTimeline = ({ oldManifest, newManifest }) => {
|
||||
// Starting from v4.1.2 of the IOP, section 4.4.3.3 states:
|
||||
//
|
||||
// "MPD@availabilityStartTime and Period@start shall not be changed over MPD updates."
|
||||
//
|
||||
// This was added from https://github.com/Dash-Industry-Forum/DASH-IF-IOP/issues/160
|
||||
//
|
||||
// Because of this change, and the difficulty of supporting periods with changing start
|
||||
// times, periods with changing start times are not supported. This makes the logic much
|
||||
// simpler, since periods with the same start time can be considerred the same period
|
||||
// across refreshes.
|
||||
//
|
||||
// To give an example as to the difficulty of handling periods where the start time may
|
||||
// change, if a single period manifest is refreshed with another manifest with a single
|
||||
// period, and both the start and end times are increased, then the only way to determine
|
||||
// if it's a new period or an old one that has changed is to look through the segments of
|
||||
// each playlist and determine the presentation time bounds to find a match. In addition,
|
||||
// if the period start changed to exceed the old period end, then there would be no
|
||||
// match, and it would not be possible to determine whether the refreshed period is a new
|
||||
// one or the old one.
|
||||
const oldPlaylists = oldManifest.playlists.concat(getMediaGroupPlaylists(oldManifest));
|
||||
const newPlaylists = newManifest.playlists.concat(getMediaGroupPlaylists(newManifest));
|
||||
|
||||
// Save all seen timelineStarts to the new manifest. Although this potentially means that
|
||||
// there's a "memory leak" in that it will never stop growing, in reality, only a couple
|
||||
// of properties are saved for each seen Period. Even long running live streams won't
|
||||
// generate too many Periods, unless the stream is watched for decades. In the future,
|
||||
// this can be optimized by mapping to discontinuity sequence numbers for each timeline,
|
||||
// but it may not become an issue, and the additional info can be useful for debugging.
|
||||
newManifest.timelineStarts = getUniqueTimelineStarts([oldManifest.timelineStarts,
|
||||
newManifest.timelineStarts]);
|
||||
|
||||
updateSequenceNumbers({
|
||||
oldPlaylists,
|
||||
newPlaylists,
|
||||
timelineStarts: newManifest.timelineStarts
|
||||
});
|
||||
|
||||
return newManifest;
|
||||
};
|
477
node_modules/mpd-parser/test/manifests/multiperiod-startnumber-removed-periods.js
generated
vendored
Normal file
477
node_modules/mpd-parser/test/manifests/multiperiod-startnumber-removed-periods.js
generated
vendored
Normal file
|
@ -0,0 +1,477 @@
|
|||
export const parsedManifest = {
|
||||
allowCache: true,
|
||||
discontinuityStarts: [],
|
||||
duration: 0,
|
||||
endList: true,
|
||||
timelineStarts: [
|
||||
{ start: 100, timeline: 100},
|
||||
{ start: 103, timeline: 103},
|
||||
{ start: 107, timeline: 107},
|
||||
{ start: 111, timeline: 111}
|
||||
],
|
||||
mediaGroups: {
|
||||
'AUDIO': {
|
||||
audio: {
|
||||
'en (main)': {
|
||||
autoselect: true,
|
||||
default: true,
|
||||
language: 'en',
|
||||
playlists: [
|
||||
{
|
||||
attributes: {
|
||||
'BANDWIDTH': 129262,
|
||||
'CODECS': 'mp4a.40.5',
|
||||
'NAME': 'v0',
|
||||
'PROGRAM-ID': 1
|
||||
},
|
||||
endList: false,
|
||||
mediaSequence: 7,
|
||||
discontinuitySequence: 2,
|
||||
discontinuityStarts: [0],
|
||||
timelineStarts: [
|
||||
{ start: 111, timeline: 111}
|
||||
],
|
||||
resolvedUri: '',
|
||||
segments: [
|
||||
{
|
||||
discontinuity: true,
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/audio/v0/init.mp4',
|
||||
uri: 'init.mp4'
|
||||
},
|
||||
presentationTime: 111,
|
||||
number: 7,
|
||||
resolvedUri: 'http://example.com/audio/v0/862.m4f',
|
||||
timeline: 111,
|
||||
uri: '862.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/audio/v0/init.mp4',
|
||||
uri: 'init.mp4'
|
||||
},
|
||||
presentationTime: 112,
|
||||
number: 8,
|
||||
resolvedUri: 'http://example.com/audio/v0/863.m4f',
|
||||
timeline: 111,
|
||||
uri: '863.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/audio/v0/init.mp4',
|
||||
uri: 'init.mp4'
|
||||
},
|
||||
presentationTime: 113,
|
||||
number: 9,
|
||||
resolvedUri: 'http://example.com/audio/v0/864.m4f',
|
||||
timeline: 111,
|
||||
uri: '864.m4f'
|
||||
}
|
||||
],
|
||||
targetDuration: 1,
|
||||
timeline: 111,
|
||||
uri: ''
|
||||
}
|
||||
],
|
||||
uri: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
'CLOSED-CAPTIONS': {},
|
||||
'SUBTITLES': {},
|
||||
'VIDEO': {}
|
||||
},
|
||||
minimumUpdatePeriod: 2000,
|
||||
playlists: [
|
||||
{
|
||||
attributes: {
|
||||
'AUDIO': 'audio',
|
||||
'BANDWIDTH': 2942295,
|
||||
'CODECS': 'avc1.4d001f',
|
||||
'NAME': 'D',
|
||||
'PROGRAM-ID': 1,
|
||||
'RESOLUTION': {
|
||||
height: 720,
|
||||
width: 1280
|
||||
},
|
||||
'SUBTITLES': 'subs'
|
||||
},
|
||||
endList: false,
|
||||
mediaSequence: 7,
|
||||
discontinuitySequence: 2,
|
||||
discontinuityStarts: [0],
|
||||
timelineStarts: [
|
||||
{ start: 111, timeline: 111}
|
||||
],
|
||||
resolvedUri: '',
|
||||
segments: [
|
||||
{
|
||||
discontinuity: true,
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/D/D_init.mp4',
|
||||
uri: 'D_init.mp4'
|
||||
},
|
||||
presentationTime: 111,
|
||||
number: 7,
|
||||
resolvedUri: 'http://example.com/video/D/D862.m4f',
|
||||
timeline: 111,
|
||||
uri: 'D862.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/D/D_init.mp4',
|
||||
uri: 'D_init.mp4'
|
||||
},
|
||||
presentationTime: 112,
|
||||
number: 8,
|
||||
resolvedUri: 'http://example.com/video/D/D863.m4f',
|
||||
timeline: 111,
|
||||
uri: 'D863.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/D/D_init.mp4',
|
||||
uri: 'D_init.mp4'
|
||||
},
|
||||
presentationTime: 113,
|
||||
number: 9,
|
||||
resolvedUri: 'http://example.com/video/D/D864.m4f',
|
||||
timeline: 111,
|
||||
uri: 'D864.m4f'
|
||||
}
|
||||
],
|
||||
targetDuration: 1,
|
||||
timeline: 111,
|
||||
uri: ''
|
||||
},
|
||||
{
|
||||
attributes: {
|
||||
'AUDIO': 'audio',
|
||||
'BANDWIDTH': 4267536,
|
||||
'CODECS': 'avc1.640020',
|
||||
'NAME': 'E',
|
||||
'PROGRAM-ID': 1,
|
||||
'RESOLUTION': {
|
||||
height: 720,
|
||||
width: 1280
|
||||
},
|
||||
'SUBTITLES': 'subs'
|
||||
},
|
||||
endList: false,
|
||||
mediaSequence: 7,
|
||||
discontinuitySequence: 2,
|
||||
timelineStarts: [
|
||||
{ start: 111, timeline: 111}
|
||||
],
|
||||
discontinuityStarts: [0],
|
||||
resolvedUri: '',
|
||||
segments: [
|
||||
{
|
||||
discontinuity: true,
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/E/E_init.mp4',
|
||||
uri: 'E_init.mp4'
|
||||
},
|
||||
presentationTime: 111,
|
||||
number: 7,
|
||||
resolvedUri: 'http://example.com/video/E/E862.m4f',
|
||||
timeline: 111,
|
||||
uri: 'E862.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/E/E_init.mp4',
|
||||
uri: 'E_init.mp4'
|
||||
},
|
||||
presentationTime: 112,
|
||||
number: 8,
|
||||
resolvedUri: 'http://example.com/video/E/E863.m4f',
|
||||
timeline: 111,
|
||||
uri: 'E863.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/E/E_init.mp4',
|
||||
uri: 'E_init.mp4'
|
||||
},
|
||||
presentationTime: 113,
|
||||
number: 9,
|
||||
resolvedUri: 'http://example.com/video/E/E864.m4f',
|
||||
timeline: 111,
|
||||
uri: 'E864.m4f'
|
||||
}
|
||||
],
|
||||
targetDuration: 1,
|
||||
timeline: 111,
|
||||
uri: ''
|
||||
},
|
||||
{
|
||||
attributes: {
|
||||
'AUDIO': 'audio',
|
||||
'BANDWIDTH': 5256859,
|
||||
'CODECS': 'avc1.640020',
|
||||
'NAME': 'F',
|
||||
'PROGRAM-ID': 1,
|
||||
'RESOLUTION': {
|
||||
height: 720,
|
||||
width: 1280
|
||||
},
|
||||
'SUBTITLES': 'subs'
|
||||
},
|
||||
endList: false,
|
||||
mediaSequence: 7,
|
||||
discontinuitySequence: 2,
|
||||
timelineStarts: [
|
||||
{ start: 111, timeline: 111}
|
||||
],
|
||||
discontinuityStarts: [0],
|
||||
resolvedUri: '',
|
||||
segments: [
|
||||
{
|
||||
discontinuity: true,
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/F/F_init.mp4',
|
||||
uri: 'F_init.mp4'
|
||||
},
|
||||
presentationTime: 111,
|
||||
number: 7,
|
||||
resolvedUri: 'http://example.com/video/F/F862.m4f',
|
||||
timeline: 111,
|
||||
uri: 'F862.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/F/F_init.mp4',
|
||||
uri: 'F_init.mp4'
|
||||
},
|
||||
presentationTime: 112,
|
||||
number: 8,
|
||||
resolvedUri: 'http://example.com/video/F/F863.m4f',
|
||||
timeline: 111,
|
||||
uri: 'F863.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/F/F_init.mp4',
|
||||
uri: 'F_init.mp4'
|
||||
},
|
||||
presentationTime: 113,
|
||||
number: 9,
|
||||
resolvedUri: 'http://example.com/video/F/F864.m4f',
|
||||
timeline: 111,
|
||||
uri: 'F864.m4f'
|
||||
}
|
||||
],
|
||||
targetDuration: 1,
|
||||
timeline: 111,
|
||||
uri: ''
|
||||
},
|
||||
{
|
||||
attributes: {
|
||||
'AUDIO': 'audio',
|
||||
'BANDWIDTH': 240781,
|
||||
'CODECS': 'avc1.4d000d',
|
||||
'NAME': 'A',
|
||||
'PROGRAM-ID': 1,
|
||||
'RESOLUTION': {
|
||||
height: 234,
|
||||
width: 416
|
||||
},
|
||||
'SUBTITLES': 'subs'
|
||||
},
|
||||
endList: false,
|
||||
mediaSequence: 7,
|
||||
discontinuitySequence: 2,
|
||||
timelineStarts: [
|
||||
{ start: 111, timeline: 111}
|
||||
],
|
||||
discontinuityStarts: [0],
|
||||
resolvedUri: '',
|
||||
segments: [
|
||||
{
|
||||
discontinuity: true,
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/A/A_init.mp4',
|
||||
uri: 'A_init.mp4'
|
||||
},
|
||||
presentationTime: 111,
|
||||
number: 7,
|
||||
resolvedUri: 'http://example.com/video/A/A862.m4f',
|
||||
timeline: 111,
|
||||
uri: 'A862.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/A/A_init.mp4',
|
||||
uri: 'A_init.mp4'
|
||||
},
|
||||
presentationTime: 112,
|
||||
number: 8,
|
||||
resolvedUri: 'http://example.com/video/A/A863.m4f',
|
||||
timeline: 111,
|
||||
uri: 'A863.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/A/A_init.mp4',
|
||||
uri: 'A_init.mp4'
|
||||
},
|
||||
presentationTime: 113,
|
||||
number: 9,
|
||||
resolvedUri: 'http://example.com/video/A/A864.m4f',
|
||||
timeline: 111,
|
||||
uri: 'A864.m4f'
|
||||
}
|
||||
],
|
||||
targetDuration: 1,
|
||||
timeline: 111,
|
||||
uri: ''
|
||||
},
|
||||
{
|
||||
attributes: {
|
||||
'AUDIO': 'audio',
|
||||
'BANDWIDTH': 494354,
|
||||
'CODECS': 'avc1.4d001e',
|
||||
'NAME': 'B',
|
||||
'PROGRAM-ID': 1,
|
||||
'RESOLUTION': {
|
||||
height: 360,
|
||||
width: 640
|
||||
},
|
||||
'SUBTITLES': 'subs'
|
||||
},
|
||||
endList: false,
|
||||
mediaSequence: 7,
|
||||
discontinuitySequence: 2,
|
||||
timelineStarts: [
|
||||
{ start: 111, timeline: 111}
|
||||
],
|
||||
discontinuityStarts: [0],
|
||||
resolvedUri: '',
|
||||
segments: [
|
||||
{
|
||||
discontinuity: true,
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/B/B_init.mp4',
|
||||
uri: 'B_init.mp4'
|
||||
},
|
||||
presentationTime: 111,
|
||||
number: 7,
|
||||
resolvedUri: 'http://example.com/video/B/B862.m4f',
|
||||
timeline: 111,
|
||||
uri: 'B862.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/B/B_init.mp4',
|
||||
uri: 'B_init.mp4'
|
||||
},
|
||||
presentationTime: 112,
|
||||
number: 8,
|
||||
resolvedUri: 'http://example.com/video/B/B863.m4f',
|
||||
timeline: 111,
|
||||
uri: 'B863.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/B/B_init.mp4',
|
||||
uri: 'B_init.mp4'
|
||||
},
|
||||
presentationTime: 113,
|
||||
number: 9,
|
||||
resolvedUri: 'http://example.com/video/B/B864.m4f',
|
||||
timeline: 111,
|
||||
uri: 'B864.m4f'
|
||||
}
|
||||
],
|
||||
targetDuration: 1,
|
||||
timeline: 111,
|
||||
uri: ''
|
||||
},
|
||||
{
|
||||
attributes: {
|
||||
'AUDIO': 'audio',
|
||||
'BANDWIDTH': 1277155,
|
||||
'CODECS': 'avc1.4d001f',
|
||||
'NAME': 'C',
|
||||
'PROGRAM-ID': 1,
|
||||
'RESOLUTION': {
|
||||
height: 540,
|
||||
width: 960
|
||||
},
|
||||
'SUBTITLES': 'subs'
|
||||
},
|
||||
endList: false,
|
||||
mediaSequence: 7,
|
||||
discontinuitySequence: 2,
|
||||
timelineStarts: [
|
||||
{ start: 111, timeline: 111}
|
||||
],
|
||||
discontinuityStarts: [0],
|
||||
resolvedUri: '',
|
||||
segments: [
|
||||
{
|
||||
discontinuity: true,
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/C/C_init.mp4',
|
||||
uri: 'C_init.mp4'
|
||||
},
|
||||
presentationTime: 111,
|
||||
number: 7,
|
||||
resolvedUri: 'http://example.com/video/C/C862.m4f',
|
||||
timeline: 111,
|
||||
uri: 'C862.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/C/C_init.mp4',
|
||||
uri: 'C_init.mp4'
|
||||
},
|
||||
presentationTime: 112,
|
||||
number: 8,
|
||||
resolvedUri: 'http://example.com/video/C/C863.m4f',
|
||||
timeline: 111,
|
||||
uri: 'C863.m4f'
|
||||
},
|
||||
{
|
||||
duration: 1,
|
||||
map: {
|
||||
resolvedUri: 'http://example.com/video/C/C_init.mp4',
|
||||
uri: 'C_init.mp4'
|
||||
},
|
||||
presentationTime: 113,
|
||||
number: 9,
|
||||
resolvedUri: 'http://example.com/video/C/C864.m4f',
|
||||
timeline: 111,
|
||||
uri: 'C864.m4f'
|
||||
}
|
||||
],
|
||||
targetDuration: 1,
|
||||
timeline: 111,
|
||||
uri: ''
|
||||
}
|
||||
],
|
||||
segments: [],
|
||||
suggestedPresentationDelay: 6,
|
||||
uri: ''
|
||||
};
|
185
node_modules/mpd-parser/test/manifests/multiperiod-startnumber-removed-periods.mpd
generated
vendored
Normal file
185
node_modules/mpd-parser/test/manifests/multiperiod-startnumber-removed-periods.mpd
generated
vendored
Normal file
|
@ -0,0 +1,185 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MPD
|
||||
xmlns:cenc="urn:mpeg:cenc:2013"
|
||||
availabilityStartTime="2021-03-18T20:00:36Z"
|
||||
maxSegmentDuration="PT2S"
|
||||
minBufferTime="PT2S"
|
||||
minimumUpdatePeriod="PT2S"
|
||||
profiles="urn:mpeg:dash:profile:isoff-live:2011"
|
||||
publishTime="2021-03-18T20:32:55Z"
|
||||
suggestedPresentationDelay="PT6S"
|
||||
timeShiftBufferDepth="PT180.000S"
|
||||
type="dynamic"
|
||||
xmlns="urn:mpeg:dash:schema:mpd:2011">
|
||||
<Period id="111" start="PT111S">
|
||||
<AdaptationSet
|
||||
audioSamplingRate="48000"
|
||||
contentType="audio"
|
||||
group="1"
|
||||
lang="en"
|
||||
mimeType="audio/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
|
||||
<Representation
|
||||
bandwidth="129262"
|
||||
codecs="mp4a.40.5"
|
||||
id="v0">
|
||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
|
||||
<BaseURL>http://example.com/audio/v0/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="init.mp4"
|
||||
media="$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
<AdaptationSet
|
||||
contentType="video"
|
||||
id="1"
|
||||
maxFrameRate="60.0"
|
||||
maxHeight="720"
|
||||
maxWidth="1280"
|
||||
mimeType="video/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<SupplementalProperty schemeIdUri="urn:mpeg:dash:adaptation-set-switching:2016" value="2" />
|
||||
<Representation
|
||||
bandwidth="2942295"
|
||||
codecs="avc1.4d001f"
|
||||
frameRate="30.0"
|
||||
height="720"
|
||||
id="D"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/D/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="4267536"
|
||||
codecs="avc1.640020"
|
||||
frameRate="60.0"
|
||||
height="720"
|
||||
id="E"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/E/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="5256859"
|
||||
codecs="avc1.640020"
|
||||
frameRate="60.0"
|
||||
height="720"
|
||||
id="F"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/F/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
<AdaptationSet
|
||||
contentType="video"
|
||||
id="2"
|
||||
maxFrameRate="30.0"
|
||||
maxHeight="540"
|
||||
maxWidth="960"
|
||||
mimeType="video/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<Representation
|
||||
bandwidth="240781"
|
||||
codecs="avc1.4d000d"
|
||||
frameRate="30.0"
|
||||
height="234"
|
||||
id="A"
|
||||
scanType="progressive"
|
||||
width="416">
|
||||
<BaseURL>http://example.com/video/A/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="494354"
|
||||
codecs="avc1.4d001e"
|
||||
frameRate="30.0"
|
||||
height="360"
|
||||
id="B"
|
||||
scanType="progressive"
|
||||
width="640">
|
||||
<BaseURL>http://example.com/video/B/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="1277155"
|
||||
codecs="avc1.4d001f"
|
||||
frameRate="30.0"
|
||||
height="540"
|
||||
id="C"
|
||||
scanType="progressive"
|
||||
width="960">
|
||||
<BaseURL>http://example.com/video/C/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
</Period>
|
||||
<UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-iso:2014" value="http://example.com//utcservertime" />
|
||||
</MPD>
|
1100
node_modules/mpd-parser/test/manifests/multiperiod-startnumber.js
generated
vendored
Normal file
1100
node_modules/mpd-parser/test/manifests/multiperiod-startnumber.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
647
node_modules/mpd-parser/test/manifests/multiperiod-startnumber.mpd
generated
vendored
Normal file
647
node_modules/mpd-parser/test/manifests/multiperiod-startnumber.mpd
generated
vendored
Normal file
|
@ -0,0 +1,647 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<MPD
|
||||
xmlns:cenc="urn:mpeg:cenc:2013"
|
||||
availabilityStartTime="2021-03-18T20:00:36Z"
|
||||
maxSegmentDuration="PT2S"
|
||||
minBufferTime="PT2S"
|
||||
minimumUpdatePeriod="PT2S"
|
||||
profiles="urn:mpeg:dash:profile:isoff-live:2011"
|
||||
publishTime="2021-03-18T20:32:55Z"
|
||||
suggestedPresentationDelay="PT6S"
|
||||
timeShiftBufferDepth="PT180.000S"
|
||||
type="dynamic"
|
||||
xmlns="urn:mpeg:dash:schema:mpd:2011">
|
||||
<Period id="100" start="PT100S">
|
||||
<AdaptationSet
|
||||
audioSamplingRate="48000"
|
||||
contentType="audio"
|
||||
group="1"
|
||||
lang="en"
|
||||
mimeType="audio/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
|
||||
<Representation bandwidth="129262" codecs="mp4a.40.5" id="v0">
|
||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
|
||||
<BaseURL>http://example.com/audio/1</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="init.mp4"
|
||||
media="$Number%03d$.m4f"
|
||||
presentationTimeOffset="9000000"
|
||||
startNumber="500"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9000000" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
<AdaptationSet
|
||||
contentType="video"
|
||||
id="1"
|
||||
maxFrameRate="60.0"
|
||||
maxHeight="720"
|
||||
maxWidth="1280"
|
||||
mimeType="video/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<Representation
|
||||
bandwidth="2942295"
|
||||
codecs="avc1.4d001f"
|
||||
frameRate="30.0"
|
||||
height="720"
|
||||
id="D"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/D/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9000000"
|
||||
startNumber="500"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9000000" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="4267536"
|
||||
codecs="avc1.640020"
|
||||
frameRate="60.0"
|
||||
height="720"
|
||||
id="E"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/E/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9000000"
|
||||
startNumber="500"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9000000" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="5256859"
|
||||
codecs="avc1.640020"
|
||||
frameRate="60.0"
|
||||
height="720"
|
||||
id="F"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/E/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9000000"
|
||||
startNumber="500"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9000000" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
<AdaptationSet
|
||||
contentType="video"
|
||||
id="2"
|
||||
maxFrameRate="30.0"
|
||||
maxHeight="540"
|
||||
maxWidth="960"
|
||||
mimeType="video/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<Representation
|
||||
bandwidth="240781"
|
||||
codecs="avc1.4d000d"
|
||||
frameRate="30.0"
|
||||
height="234"
|
||||
id="A"
|
||||
scanType="progressive"
|
||||
width="416">
|
||||
<BaseURL>http://example.com/video/A/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9000000"
|
||||
startNumber="500"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9000000" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="494354"
|
||||
codecs="avc1.4d001e"
|
||||
frameRate="30.0"
|
||||
height="360"
|
||||
id="B"
|
||||
scanType="progressive"
|
||||
width="640">
|
||||
<BaseURL>http://example.com/video/B/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9000000"
|
||||
startNumber="500"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9000000" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="1277155"
|
||||
codecs="avc1.4d001e"
|
||||
frameRate="30.0"
|
||||
height="540"
|
||||
id="C"
|
||||
scanType="progressive"
|
||||
width="960">
|
||||
<BaseURL>http://example.com/video/E/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9000000"
|
||||
startNumber="500"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9000000" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
</Period>
|
||||
<Period id="103" start="PT103S">
|
||||
<AdaptationSet
|
||||
audioSamplingRate="48000"
|
||||
contentType="audio"
|
||||
group="1"
|
||||
lang="en"
|
||||
mimeType="audio/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
|
||||
<Representation
|
||||
bandwidth="128352"
|
||||
codecs="mp4a.40.5"
|
||||
id="v0">
|
||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
|
||||
<BaseURL>http://example.com/audio/v0/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="init.mp4"
|
||||
media="$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
<AdaptationSet
|
||||
contentType="video"
|
||||
mimeType="video/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<Representation
|
||||
bandwidth="2723305"
|
||||
codecs="avc1.4d001f"
|
||||
frameRate="30.0"
|
||||
height="720"
|
||||
id="D"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/D/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="2062244"
|
||||
codecs="avc1.640020"
|
||||
frameRate="60.0"
|
||||
height="720"
|
||||
id="E"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/E/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="2215557"
|
||||
codecs="avc1.640020"
|
||||
frameRate="60.0"
|
||||
height="720"
|
||||
id="F"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/F/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="200480"
|
||||
codecs="avc1.4d000d"
|
||||
frameRate="30.0"
|
||||
height="234"
|
||||
id="A"
|
||||
scanType="progressive"
|
||||
width="416">
|
||||
<BaseURL>http://example.com/video/A/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="411478"
|
||||
codecs="avc1.4d001e"
|
||||
frameRate="30.0"
|
||||
height="360"
|
||||
id="B"
|
||||
scanType="progressive"
|
||||
width="640">
|
||||
<BaseURL>http://example.com/video/B/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="1048480"
|
||||
codecs="avc1.4d001f"
|
||||
frameRate="30.0"
|
||||
height="540"
|
||||
id="C"
|
||||
scanType="progressive"
|
||||
width="960">
|
||||
<BaseURL>http://example.com/video/C/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
</Period>
|
||||
<Period id="107" start="PT107S">
|
||||
<AdaptationSet
|
||||
audioSamplingRate="48000"
|
||||
contentType="audio"
|
||||
group="1"
|
||||
lang="en"
|
||||
mimeType="audio/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
|
||||
<Representation
|
||||
bandwidth="128352"
|
||||
codecs="mp4a.40.5"
|
||||
id="v0">
|
||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
|
||||
<BaseURL>http://example.com/audio/v0/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="init.mp4"
|
||||
media="$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
<AdaptationSet
|
||||
contentType="video"
|
||||
mimeType="video/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<Representation
|
||||
bandwidth="2723305"
|
||||
codecs="avc1.4d001f"
|
||||
frameRate="30.0"
|
||||
height="720"
|
||||
id="D"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/D/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="2062244"
|
||||
codecs="avc1.640020"
|
||||
frameRate="60.0"
|
||||
height="720"
|
||||
id="E"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/E/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="2215557"
|
||||
codecs="avc1.640020"
|
||||
frameRate="60.0"
|
||||
height="720"
|
||||
id="F"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/F/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="200480"
|
||||
codecs="avc1.4d000d"
|
||||
frameRate="30.0"
|
||||
height="234"
|
||||
id="A"
|
||||
scanType="progressive"
|
||||
width="416">
|
||||
<BaseURL>http://example.com/video/A/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="411478"
|
||||
codecs="avc1.4d001e"
|
||||
frameRate="30.0"
|
||||
height="360"
|
||||
id="B"
|
||||
scanType="progressive"
|
||||
width="640">
|
||||
<BaseURL>http://example.com/video/B/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="1048480"
|
||||
codecs="avc1.4d001f"
|
||||
frameRate="30.0"
|
||||
height="540"
|
||||
id="C"
|
||||
scanType="progressive"
|
||||
width="960">
|
||||
<BaseURL>http://example.com/video/C/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
startNumber="0"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="180000" r="1" t="0" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
</Period>
|
||||
<Period id="111" start="PT111S">
|
||||
<AdaptationSet
|
||||
audioSamplingRate="48000"
|
||||
contentType="audio"
|
||||
group="1"
|
||||
lang="en"
|
||||
mimeType="audio/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main" />
|
||||
<Representation
|
||||
bandwidth="129262"
|
||||
codecs="mp4a.40.5"
|
||||
id="v0">
|
||||
<AudioChannelConfiguration schemeIdUri="urn:mpeg:dash:23003:3:audio_channel_configuration:2011" value="2" />
|
||||
<BaseURL>http://example.com/audio/v0/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="init.mp4"
|
||||
media="$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
<AdaptationSet
|
||||
contentType="video"
|
||||
id="1"
|
||||
maxFrameRate="60.0"
|
||||
maxHeight="720"
|
||||
maxWidth="1280"
|
||||
mimeType="video/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<SupplementalProperty schemeIdUri="urn:mpeg:dash:adaptation-set-switching:2016" value="2" />
|
||||
<Representation
|
||||
bandwidth="2942295"
|
||||
codecs="avc1.4d001f"
|
||||
frameRate="30.0"
|
||||
height="720"
|
||||
id="D"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/D/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="4267536"
|
||||
codecs="avc1.640020"
|
||||
frameRate="60.0"
|
||||
height="720"
|
||||
id="E"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/E/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="5256859"
|
||||
codecs="avc1.640020"
|
||||
frameRate="60.0"
|
||||
height="720"
|
||||
id="F"
|
||||
scanType="progressive"
|
||||
width="1280">
|
||||
<BaseURL>http://example.com/video/F/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
<AdaptationSet
|
||||
contentType="video"
|
||||
id="2"
|
||||
maxFrameRate="30.0"
|
||||
maxHeight="540"
|
||||
maxWidth="960"
|
||||
mimeType="video/mp4"
|
||||
segmentAlignment="true"
|
||||
startWithSAP="1">
|
||||
<Representation
|
||||
bandwidth="240781"
|
||||
codecs="avc1.4d000d"
|
||||
frameRate="30.0"
|
||||
height="234"
|
||||
id="A"
|
||||
scanType="progressive"
|
||||
width="416">
|
||||
<BaseURL>http://example.com/video/A/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="494354"
|
||||
codecs="avc1.4d001e"
|
||||
frameRate="30.0"
|
||||
height="360"
|
||||
id="B"
|
||||
scanType="progressive"
|
||||
width="640">
|
||||
<BaseURL>http://example.com/video/B/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
<Representation
|
||||
bandwidth="1277155"
|
||||
codecs="avc1.4d001f"
|
||||
frameRate="30.0"
|
||||
height="540"
|
||||
id="C"
|
||||
scanType="progressive"
|
||||
width="960">
|
||||
<BaseURL>http://example.com/video/C/</BaseURL>
|
||||
<SegmentTemplate
|
||||
initialization="$RepresentationID$_init.mp4"
|
||||
media="$RepresentationID$$Number%03d$.m4f"
|
||||
presentationTimeOffset="9989999"
|
||||
startNumber="862"
|
||||
timescale="90000">
|
||||
<SegmentTimeline>
|
||||
<S d="90000" r="2" t="9989999" />
|
||||
</SegmentTimeline>
|
||||
</SegmentTemplate>
|
||||
</Representation>
|
||||
</AdaptationSet>
|
||||
</Period>
|
||||
<UTCTiming schemeIdUri="urn:mpeg:dash:utc:http-iso:2014" value="http://example.com//utcservertime" />
|
||||
</MPD>
|
1040
node_modules/mpd-parser/test/playlist-merge.test.js
generated
vendored
Normal file
1040
node_modules/mpd-parser/test/playlist-merge.test.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue