Chromecast HLS: Unable to derive timescale

355 Views Asked by At

I'm trying to get fmp4 HLS playing back on a new Chromecast (3rd gen I believe, not Ultra).

I've tried encoding the content with ffmpeg using both x264 and h264 libraries. The main profile initially gives me a codec not supported error, remove the codec list from the hls manifest fixes this issue.

Switching to baseline (which is not ideal) doesn't give the codec error.

Both then (after removing the codec definitions or using baseline) give the following error:

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)
1

There are 1 best solutions below

1
On BEST ANSWER

Make sure you're not setting:

loadRequestData.media.hlsSegmentFormat

For TS I had to set:

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

But for fmp4 I commented this out.