-
Notifications
You must be signed in to change notification settings - Fork 483
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for roles in files containing multiple audio stream. #91
base: master
Are you sure you want to change the base?
Conversation
There's already an (undocumented) interface for setting the roles: |
Maybe I'm mistaken, but if I have 2 audio streams in my source file that have the same bitrate (±10%) and the same language (and obviously the same codec), they become undistinguishable because the key of the dict is adaptation_set_name = ('audio', track.language, track.codec_family) so AddDescriptor never gets to be applied to individual streams, only to a group of them. And furthermore, despite having wildly different roles (one is commentary, one is the actual soundtrack)(and to complicate the matter, I have them in both english and french, and each in 2 qualities), they finish in the same Adaptation set at the end which is not the intended output. What I want in the end is something along the lines of : <MPD>
<Period>
<!-- video -->
<AdaptationSet mimeType="video/mp4">
<Representation bandwidth="228964"></Representation>
<Representation bandwidth="113904"></Representation>
</AdaptationSet>
<!-- audio -->
<AdaptationSet mimeType="video/mp4" lang="en" mimeType="audio/mp4">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
<Representation audioSamplingRate="48000"></Representation>
<Representation audioSamplingRate="16000"></Representation>
</AdaptationSet>
<AdaptationSet mimeType="video/mp4" lang="en" mimeType="audio/mp4">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="commentary"/>
<Representation audioSamplingRate="48000"></Representation>
<Representation audioSamplingRate="16000"></Representation>
</AdaptationSet>
<AdaptationSet mimeType="video/mp4" lang="fr" mimeType="audio/mp4">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="main"/>
<Representation audioSamplingRate="48000"></Representation>
<Representation audioSamplingRate="16000"></Representation>
</AdaptationSet>
<AdaptationSet mimeType="video/mp4" lang="fr" mimeType="audio/mp4">
<Role schemeIdUri="urn:mpeg:dash:role:2011" value="commentary"/>
<Representation audioSamplingRate="48000"></Representation>
<Representation audioSamplingRate="16000"></Representation>
</AdaptationSet>
</Period>
</MPD> |
I see what you mean. I was planning on adding support for grouping tracks together (not just for audio, but for alternate video angles too), using a unified mechanism. That would handle this case of multiple versions (with different roles) of audio tracks with the same language. I should have that feature ready fairly soon. |
That would be great ! Let me know, I'll make the changes on my side. |
Hi @barbibulle, do you know if your universal grouping mechanism is still scheduled in a near future ? If you're busy at the moment, to do hesitate to contact me and maybe we can discuss what you intended to do and I can implement it. best and thanks for the great work and updates on the rest of the code. |
Is this feature implemented? If yes, give an example please, I can not find (or understand) from the documentation. |
Yes, the current version allows you to specify labels on the audio sources, which can be used tp keep multiple tracks with the same language and codec and bitrate. Is that what you're looking for? I can give an example if that's the case. |
I am looking for command, that allows grouping of DASH/HLS audio for different quality videos (e.g. stereo for low quality video, surround for high quality video) If possible, please, give an example command. |
Hi, I also need this option for viewpoints. Can you publish a sample how to use it?
With the solution above I only have one video adaptation set with a viewpoint declaration. But i need multiple video adaptation sets with different viewpoint declarations :) Cheers |
@barbibulle could you provide an example for this case that you mentioned(multiple track with same language and specify label) |
Can you provide an example? |
I had the same problem, but with a single MP4 file with many audio tracks. Since this issue seems stagnated, I just modified mp4-dash.py to take into consideration the number of channels, because in our case is the difference between the same language tracks (stereo and 5.1). Anyways, some info on how to use attributes would be very helpful in the documentation. |
Specify either via
--role-map 1:main,2:main,3:commentary,4:commentary
or
--role-map-file roles.json
with
roles.json
containing :The output is compatible with DashJS player.