Closed padenot closed 2 years ago
Is this for media files that include multiple audio tracks, e.g., for different languages?
How would the user select which track to decode with decodeAudioData()
, which does not provide a means to select a specific track in the media file to be decoded?
I think the answer is that you can't select the track, and decodeAudioData
won't be changed to allow for that. Use WebCodecs if you need this kind of control.
I think the answer is that you can't select the track, and
decodeAudioData
won't be changed to allow for that.
Then this issue is moot, no?
Since decodeAudioData
won't be changed there is no reason to specify which audio track decodeAudioData
uses, that will always be the first track, or whatever implementers decide.
Use WebCodecs if you need this kind of control.
WebCodecs offers no such functionality.
I would be hesitant to suggest WebCodecs as some form of all-encompassing API solution for media, codecs, and track solutions for requirements or bugs, especially if you have not tested the code yourself before recommending a given API is pecified or has the capability to solve specific issues, e.g.,
WebCodecs 'opus' implementation is not playable at media players, nor decoded by native applications, that I am aware of, https://bugs.chromium.org/p/chromium/issues/detail?id=1180089.
The decoded frame of an encoded audio data object exceeds the expected input for MediaStreamTrackGenerator
, which is not specified, yet. The only way to find that out is to actually test the implementation. No solution for that overflow, only a note without solution, might make the specification https://bugs.chromium.org/p/chromium/issues/detail?id=1184070#c39, https://github.com/w3c/mediacapture-transform/issues/20, https://bugs.chromium.org/p/chromium/issues/detail?id=1199377.
I think what @padenot is saying is that we need to codify what track is used. We won't supply a way for the user to specify the track.
@padenot can provide more info about WebCodecs; I have not looked its capabilities.
7/22 Teleconf: write the spec text for the behavior which picks the first track.
Closed per #2376.
At least Firefox and Chrome both pick the first track, respectively:
https://searchfox.org/mozilla-central/source/dom/media/webaudio/MediaBufferDecoder.cpp#257 https://source.chromium.org/chromium/chromium/src/+/main:media/filters/audio_file_reader.cc;l=71;drc=570d2d089d1d822d8b29111ea92d7e2e12cce67b;bpv=1;bpt=1