Reputation: 187
For MPEG DASH streaming, I have audio.mpd and video.mpd separately for a video.mp4 file generated using following command.
MP4Box -dash 5000 -frag 5000 -rap -bs-switching no -profile dashavc264:live -segment-name ./video/$2_segment_ -out ./mpds/$2_video.mpd $2.mp4#video
MP4Box -dash 5000 -frag 5000 -rap -bs-switching no -profile dashavc264:live -segment-name ./audio/$2_segment_ -out ./mpds/$2_audio.mpd $2.mp4#audio
Each mpd plays separately in dash.js. Is it possible to play them together using dash.js?
Or is there any way to merge both using MP4Box?
Upvotes: 1
Views: 1994
Reputation: 461
2 options:
MPD are XML. So you can easily post-process them to merge. Practically the MPD should be nearly identical. Insert both <AdaptationSet>
s in a new MPD under <Period>
.
Alternately execute the following command-line to make it in one pass: MP4Box -dash 5000 -frag 5000 -rap -bs-switching no -profile dashavc264:live -segment-name $2_segment_ -out ./mpds/$2_video.mpd $2.mp4#video:baseURL=video $2.mp4#audio:baseURL=audio
Upvotes: 2