2

我正在尝试让 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)
4

1 回答 1

1

确保您没有设置:

loadRequestData.media.hlsSegmentFormat

对于 TS,我必须设置:

loadRequestData.media.hlsSegmentFormat = cast.framework.messages.HlsSegmentFormat.TS;

但是对于 fmp4,我将其注释掉了。

于 2020-07-30T11:48:48.793 回答