我正试图让fmp4 HLS在新的Chromecast上播放(我相信是第三代,而不是Ultra(。
我已经尝试过使用x264和h264库使用ffmpeg对内容进行编码。主配置文件最初给了我一个不支持编解码器的错误,从hls清单中删除编解码器列表修复了这个问题。
切换到基线(这并不理想(不会导致编解码器错误。
然后两者(在删除编解码器定义或使用基线后(都会给出以下错误:
Uncaught Error: Unable to derive timescale
at Xl (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:344)
at Y.$e (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:337)
at Y.k.processSegment (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:340)
at Am.k.processSegment (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:384)
at Mj.$e (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:238)
at Wj (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:236)
at Oj (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:240)
at Mj.fd (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:239)
at Nc (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:39)
at wi.Mc.dispatchEvent (www.gstatic.com/cast/sdk/libs/mediaplayer/1.0.0/media_player.js:38)
确保您没有设置:
loadRequestData.media.hlsSegmentFormat
对于TS,我必须设置:
loadRequestData.media.hlsSegmentFormat = cast.framework.messages.HlsSegmentFormat.TS;
但对于fmp4,我对此进行了评论。