I have a problem with a certain HLS streaming setup. So far, my setup is that I'm using a video rendition of the stream which contains all the different audio alternatives as stream in the name .mp4
. According to the specs, this should be possible by setting up my HLS master manifest like so:
我对某个HLS流设置有问题。到目前为止,我的设置是我正在使用流的视频再现,其中包含名称.mp4中的所有不同的音频替代品。根据规范,这可以通过如下设置我的HLS主清单来实现:
#EXTM3U
#EXT-X-VERSION:3
#EXT-X-ALLOW-CACHE:NO
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",CODECS="mp4a.40.5",LANGUAGE="deu",NAME="Deutsch",DEFAULT=YES,AUTOSELECT=YES
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",CODECS="mp4a.40.5",LANGUAGE="spa",NAME="Español",DEFAULT=NO
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",CODECS="mp4a.40.5",LANGUAGE="eng",NAME="English",DEFAULT=NO
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1391346,RESOLUTION=1022x574,CODECS="avc1.4d001f,mp4a.40.5",AUDIO="aac"
0009_orig/manifest.m3u8
However, testing this on an iPad, the video player offered me the different languages, but after choosing them, the player did not actually switch the language.
然而,在iPad上进行测试时,视频播放器为我提供了不同的语言,但在选择它们之后,播放器实际上并没有切换语言。
My guess is that the player is not able to actually find the corresponding track in the original stream. Is this even possible? Can I set this information in the manifest?
我的猜测是玩家无法在原始流中找到相应的曲目。这甚至可能吗?我可以在清单中设置此信息吗?
1 个解决方案
#1
UPDATE: The answer below applies to the version 3 of the protocol. The IETF draft you linked is for version 7. If the device supports version 7 you may be able to use a muxed media file although I haven't tried it yet. Use #EXT-X-VERSION:7
instead.
更新:以下答案适用于协议的版本3。您链接的IETF草案适用于版本7.如果设备支持版本7,您可以使用多路复用媒体文件,但我还没有尝试过。使用#EXT-X-VERSION:7代替。
According to developer.apple.com:
根据developer.apple.com的说法:
Alternate Audio and Video Renditions
备用音频和视频再现
The audio tracks contain unmuxed (signals have not been combined) audio segments. The master playlist file controls the playback.
音轨包含未复用(信号尚未组合)的音频段。主播放列表文件控制播放。
I take it this means you have to provide the URI for a single audio stream:
我认为这意味着您必须为单个音频流提供URI:
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="Deutsch", \
DEFAULT=NO,AUTOSELECT=YES,LANGUAGE="de", \
URI="main/german-audio.m3u8"
#1
UPDATE: The answer below applies to the version 3 of the protocol. The IETF draft you linked is for version 7. If the device supports version 7 you may be able to use a muxed media file although I haven't tried it yet. Use #EXT-X-VERSION:7
instead.
更新:以下答案适用于协议的版本3。您链接的IETF草案适用于版本7.如果设备支持版本7,您可以使用多路复用媒体文件,但我还没有尝试过。使用#EXT-X-VERSION:7代替。
According to developer.apple.com:
根据developer.apple.com的说法:
Alternate Audio and Video Renditions
备用音频和视频再现
The audio tracks contain unmuxed (signals have not been combined) audio segments. The master playlist file controls the playback.
音轨包含未复用(信号尚未组合)的音频段。主播放列表文件控制播放。
I take it this means you have to provide the URI for a single audio stream:
我认为这意味着您必须为单个音频流提供URI:
#EXT-X-MEDIA:TYPE=AUDIO,GROUP-ID="aac",NAME="Deutsch", \
DEFAULT=NO,AUTOSELECT=YES,LANGUAGE="de", \
URI="main/german-audio.m3u8"