hls.js icon indicating copy to clipboard operation
hls.js copied to clipboard

Playback stops after failed retries with 403

Open daveisfera opened this issue 1 year ago • 6 comments

What version of Hls.js are you using?

1.5.14

What browser (including version) are you using?

Chrome 129.0.6668.72 and Safari 18.0

What OS (including version) are you using?

macOS 15.0

Test stream

No response

Configuration

{}

Additional player setup steps

Using https://hlsjs.video-dev.org/demo/ for a minimal reproducer and has to be an actual live stream so a 403 response can be sent for a very short period of time and then a 200/206 returned once it's available

Checklist

  • [X] The issue observed is not already reported by searching on Github under https://github.com/video-dev/hls.js/issues
  • [X] The issue occurs in the stable client (latest release) on https://hlsjs.video-dev.org/demo and not just on my page
  • [X] The issue occurs in the latest client (main branch) on https://hlsjs-dev.video-dev.org/demo and not just on my page
  • [X] The stream has correct Access-Control-Allow-Origin headers (CORS)
  • [X] There are no network errors such as 404s in the browser console when trying to play the stream

Steps to reproduce

  1. Open
  2. Load an EVENT or LIVE stream
  3. Start playback
  4. Observe that if a segment returns a 403 because it's not yet available, then 6 retries happen immediately and the stream playback fails, but if a slight delay happened between retries, then they would be successful and the playback could continue

Expected behaviour

There would be a slight delay between the retries so it was more meaningful. This is the behavior of both Safari and Video.js

What actually happened?

Immediate retries that all fail and the playback stops

Console output

17.025 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video24.m4s
17.091 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video24.m4s
17.156 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video24.m4s
17.226 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video24.m4s
27.016 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.087 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.157 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.228 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.301 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.373 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.446 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.447 | A network error occurred: fragLoadError

(you can see that it almost failed the first time but one of the last retries worked and then the second time all of the retries failed and the playback was stopped)



### Chrome media internals output

_No response_

daveisfera avatar Oct 04 '24 20:10 daveisfera

Chrome media internals output

{
  "28:0": {
    "id": "28:0",
    "properties": {
      "render_id": 28,
      "player_id": 0,
      "created": "2024-10-04 20:51:42.523568 UTC",
      "origin_url": "https://hlsjs.video-dev.org/",
      "kFrameUrl": "https://hlsjs.video-dev.org/demo/",
      "kFrameTitle": "hls.js demo",
      "url": "blob:https://hlsjs.video-dev.org/b138eae6-b5e7-461f-96e2-6130362934e7",
      "info": "Selected VideoToolboxVideoDecoder for video decoding, config: codec: h264, profile: h264 high, level: not available, alpha_mode: is_opaque, coded size: [1280,720], visible rect: [0,0,1280,720], natural size: [1280,720], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}",
      "kRendererName": "RendererImpl",
      "pipeline_state": "kStopped",
      "kAudioTracks": [
        {
          "bytes per channel": 2,
          "bytes per frame": 4,
          "channel layout": "STEREO",
          "channels": 2,
          "codec": "aac",
          "codec delay": 0,
          "discard decoder delay": false,
          "encryption scheme": "Unencrypted",
          "has extra data": false,
          "profile": "unknown",
          "sample format": "Signed 16-bit",
          "samples per second": 44100,
          "seek preroll": "0us"
        }
      ],
      "kVideoTracks": [
        {
          "alpha mode": "is_opaque",
          "codec": "h264",
          "coded size": "1280x720",
          "color space": {
            "matrix": "BT709",
            "primaries": "BT709",
            "range": "LIMITED",
            "transfer": "BT709"
          },
          "encryption scheme": "Unencrypted",
          "has extra data": false,
          "hdr metadata": "unset",
          "natural size": "1280x720",
          "orientation": "0°",
          "profile": "h264 high",
          "visible rect": "0,0 1280x720"
        }
      ],
      "kIsAudioDecryptingDemuxerStream": false,
      "kAudioDecoderName": "FFmpegAudioDecoder",
      "kIsPlatformAudioDecoder": false,
      "kIsVideoDecryptingDemuxerStream": false,
      "kVideoDecoderName": "VideoToolboxVideoDecoder",
      "kIsPlatformVideoDecoder": true,
      "dimensions": "1280x720",
      "kResolution": "1280x720",
      "duration": 79.956577,
      "pipeline_buffering_state": {
        "for_suspended_start": false,
        "state": "BUFFERING_HAVE_ENOUGH"
      },
      "debug": "Skipping audio splice trimming at PTS=10007777us. Found only 22us of overlap, need at least 1000us. Multiple occurrences may result in loss of A/V sync.",
      "event": "kWebMediaPlayerDestroyed"
    },
    "allEvents": [
      {
        "time": 0,
        "key": "created",
        "value": "2024-10-04 20:51:42.523568 UTC"
      },
      {
        "time": 0.6099999845027924,
        "key": "origin_url",
        "value": "https://hlsjs.video-dev.org/"
      },
      {
        "time": 0.6229999959468842,
        "key": "kFrameUrl",
        "value": "https://hlsjs.video-dev.org/demo/"
      },
      {
        "time": 0.6279999911785126,
        "key": "kFrameTitle",
        "value": "hls.js demo"
      },
      {
        "time": 0.7359999716281891,
        "key": "url",
        "value": "blob:https://hlsjs.video-dev.org/b138eae6-b5e7-461f-96e2-6130362934e7"
      },
      {
        "time": 0.7739999890327454,
        "key": "info",
        "value": "ChunkDemuxer"
      },
      {
        "time": 0.785999983549118,
        "key": "kRendererName",
        "value": "RendererImpl"
      },
      {
        "time": 2.3969999849796295,
        "key": "pipeline_state",
        "value": "kStarting"
      },
      {
        "time": 394.1439999938011,
        "key": "kAudioTracks",
        "value": [
          {
            "bytes per channel": 2,
            "bytes per frame": 4,
            "channel layout": "STEREO",
            "channels": 2,
            "codec": "aac",
            "codec delay": 0,
            "discard decoder delay": false,
            "encryption scheme": "Unencrypted",
            "has extra data": false,
            "profile": "unknown",
            "sample format": "Signed 16-bit",
            "samples per second": 44100,
            "seek preroll": "0us"
          }
        ]
      },
      {
        "time": 399.186999976635,
        "key": "kVideoTracks",
        "value": [
          {
            "alpha mode": "is_opaque",
            "codec": "h264",
            "coded size": "1280x720",
            "color space": {
              "matrix": "BT709",
              "primaries": "BT709",
              "range": "LIMITED",
              "transfer": "BT709"
            },
            "encryption scheme": "Unencrypted",
            "has extra data": false,
            "hdr metadata": "unset",
            "natural size": "1280x720",
            "orientation": "0°",
            "profile": "h264 high",
            "visible rect": "0,0 1280x720"
          }
        ]
      },
      {
        "time": 476.60599997639656,
        "key": "kIsAudioDecryptingDemuxerStream",
        "value": false
      },
      {
        "time": 476.6089999973774,
        "key": "kAudioDecoderName",
        "value": "FFmpegAudioDecoder"
      },
      {
        "time": 476.6099999845028,
        "key": "kIsPlatformAudioDecoder",
        "value": false
      },
      {
        "time": 476.6259999871254,
        "key": "info",
        "value": "Selected FFmpegAudioDecoder for audio decoding, config: codec: aac, profile: unknown, bytes_per_channel: 2, channel_layout: STEREO, channels: 2, samples_per_second: 44100, sample_format: Signed 16-bit, bytes_per_frame: 4, seek_preroll: 0us, codec_delay: 0, has extra data: false, encryption scheme: Unencrypted, discard decoder delay: false, target_output_channel_layout: STEREO, target_output_sample_format: Unknown sample format, has aac extra data: true"
      },
      {
        "time": 476.7029999792576,
        "key": "info",
        "value": "Cannot select DecryptingVideoDecoder for video decoding"
      },
      {
        "time": 477.1879999935627,
        "key": "kIsVideoDecryptingDemuxerStream",
        "value": false
      },
      {
        "time": 477.1889999806881,
        "key": "kVideoDecoderName",
        "value": "VideoToolboxVideoDecoder"
      },
      {
        "time": 477.2069999873638,
        "key": "kIsPlatformVideoDecoder",
        "value": true
      },
      {
        "time": 477.2329999804497,
        "key": "info",
        "value": "Selected VideoToolboxVideoDecoder for video decoding, config: codec: h264, profile: h264 high, level: not available, alpha_mode: is_opaque, coded size: [1280,720], visible rect: [0,0,1280,720], natural size: [1280,720], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"
      },
      {
        "time": 477.255999982357,
        "key": "pipeline_state",
        "value": "kPlaying"
      },
      {
        "time": 589.6429999768734,
        "key": "dimensions",
        "value": "1280x720"
      },
      {
        "time": 589.647999972105,
        "key": "kResolution",
        "value": "1280x720"
      },
      {
        "time": 147.36999997496605,
        "key": "duration",
        "value": 634.584
      },
      {
        "time": 596.5909999907017,
        "key": "pipeline_buffering_state",
        "value": {
          "for_suspended_start": false,
          "state": "BUFFERING_HAVE_ENOUGH"
        }
      },
      {
        "time": 1024.3659999966621,
        "key": "debug",
        "value": "Skipping audio splice trimming at PTS=10007777us. Found only 22us of overlap, need at least 1000us. Multiple occurrences may result in loss of A/V sync."
      },
      {
        "time": 3733.1129999756813,
        "key": "duration",
        "value": 79.956577
      },
      {
        "time": 3734.5889999866486,
        "key": "event",
        "value": "kWebMediaPlayerDestroyed"
      },
      {
        "time": 3734.5909999907017,
        "key": "pipeline_state",
        "value": "kStopping"
      },
      {
        "time": 3735.031999975443,
        "key": "pipeline_state",
        "value": "kStopped"
      }
    ],
    "lastRendered": 0,
    "firstTimestamp_": 180440940.772
  },
  "28:1": {
    "id": "28:1",
    "properties": {
      "render_id": 28,
      "player_id": 1,
      "created": "2024-10-04 20:51:46.264813 UTC",
      "origin_url": "https://hlsjs.video-dev.org/",
      "kFrameUrl": "https://hlsjs.video-dev.org/demo/",
      "kFrameTitle": "hls.js demo",
      "url": "blob:https://hlsjs.video-dev.org/3d66c9a4-62ff-447f-91f7-79f5816c25fb",
      "info": "Effective playback rate changed from 0 to 1",
      "kRendererName": "RendererImpl",
      "pipeline_state": "kStopped",
      "duration": 1948.234,
      "kVideoTracks": [
        {
          "alpha mode": "is_opaque",
          "codec": "h264",
          "coded size": "1280x720",
          "color space": {
            "matrix": "BT709",
            "primaries": "BT709",
            "range": "LIMITED",
            "transfer": "BT709"
          },
          "encryption scheme": "Unencrypted",
          "has extra data": false,
          "hdr metadata": "unset",
          "natural size": "1280x720",
          "orientation": "0°",
          "profile": "h264 high",
          "visible rect": "0,0 1280x720"
        }
      ],
      "kAudioTracks": [
        {
          "bytes per channel": 2,
          "bytes per frame": 2,
          "channel layout": "MONO",
          "channels": 1,
          "codec": "aac",
          "codec delay": 0,
          "discard decoder delay": false,
          "encryption scheme": "Unencrypted",
          "has extra data": false,
          "profile": "unknown",
          "sample format": "Signed 16-bit",
          "samples per second": 8000,
          "seek preroll": "0us"
        }
      ],
      "kIsAudioDecryptingDemuxerStream": false,
      "kAudioDecoderName": "FFmpegAudioDecoder",
      "kIsPlatformAudioDecoder": false,
      "debug": "Video rendering in low delay mode.",
      "kIsVideoDecryptingDemuxerStream": false,
      "kVideoDecoderName": "VideoToolboxVideoDecoder",
      "kIsPlatformVideoDecoder": true,
      "seek_target": 1864.884199,
      "dimensions": "1280x720",
      "kResolution": "1280x720",
      "event": "kWebMediaPlayerDestroyed",
      "pipeline_buffering_state": {
        "for_suspended_start": false,
        "state": "BUFFERING_HAVE_ENOUGH"
      },
      "video_buffering_state": {
        "state": "BUFFERING_HAVE_ENOUGH"
      },
      "kVideoPlaybackRoughness": 60.215,
      "kVideoPlaybackFreezing": 1.597911,
      "kFramerate": 28
    },
    "allEvents": [
      {
        "time": 0,
        "key": "created",
        "value": "2024-10-04 20:51:46.264813 UTC"
      },
      {
        "time": 0.09099999070167542,
        "key": "origin_url",
        "value": "https://hlsjs.video-dev.org/"
      },
      {
        "time": 0.09399998188018799,
        "key": "kFrameUrl",
        "value": "https://hlsjs.video-dev.org/demo/"
      },
      {
        "time": 0.09799998998641968,
        "key": "kFrameTitle",
        "value": "hls.js demo"
      },
      {
        "time": 0.13999998569488525,
        "key": "url",
        "value": "blob:https://hlsjs.video-dev.org/3d66c9a4-62ff-447f-91f7-79f5816c25fb"
      },
      {
        "time": 0.16599997878074646,
        "key": "info",
        "value": "ChunkDemuxer"
      },
      {
        "time": 0.17299997806549072,
        "key": "kRendererName",
        "value": "RendererImpl"
      },
      {
        "time": 0.19999998807907104,
        "key": "pipeline_state",
        "value": "kStarting"
      },
      {
        "time": 1740.0959999859333,
        "key": "duration",
        "value": 1897.879
      },
      {
        "time": 3560.6669999957085,
        "key": "kVideoTracks",
        "value": [
          {
            "alpha mode": "is_opaque",
            "codec": "h264",
            "coded size": "1280x720",
            "color space": {
              "matrix": "BT709",
              "primaries": "BT709",
              "range": "LIMITED",
              "transfer": "BT709"
            },
            "encryption scheme": "Unencrypted",
            "has extra data": false,
            "hdr metadata": "unset",
            "natural size": "1280x720",
            "orientation": "0°",
            "profile": "h264 high",
            "visible rect": "0,0 1280x720"
          }
        ]
      },
      {
        "time": 3560.777999997139,
        "key": "kAudioTracks",
        "value": [
          {
            "bytes per channel": 2,
            "bytes per frame": 2,
            "channel layout": "MONO",
            "channels": 1,
            "codec": "aac",
            "codec delay": 0,
            "discard decoder delay": false,
            "encryption scheme": "Unencrypted",
            "has extra data": false,
            "profile": "unknown",
            "sample format": "Signed 16-bit",
            "samples per second": 8000,
            "seek preroll": "0us"
          }
        ]
      },
      {
        "time": 3564.3909999728203,
        "key": "kIsAudioDecryptingDemuxerStream",
        "value": false
      },
      {
        "time": 3564.393999993801,
        "key": "kAudioDecoderName",
        "value": "FFmpegAudioDecoder"
      },
      {
        "time": 3564.3949999809265,
        "key": "kIsPlatformAudioDecoder",
        "value": false
      },
      {
        "time": 3564.405000001192,
        "key": "info",
        "value": "Selected FFmpegAudioDecoder for audio decoding, config: codec: aac, profile: unknown, bytes_per_channel: 2, channel_layout: MONO, channels: 1, samples_per_second: 8000, sample_format: Signed 16-bit, bytes_per_frame: 2, seek_preroll: 0us, codec_delay: 0, has extra data: false, encryption scheme: Unencrypted, discard decoder delay: false, target_output_channel_layout: STEREO, target_output_sample_format: Unknown sample format, has aac extra data: true"
      },
      {
        "time": 3564.434999972582,
        "key": "debug",
        "value": "Video rendering in low delay mode."
      },
      {
        "time": 3564.4529999792576,
        "key": "info",
        "value": "Cannot select DecryptingVideoDecoder for video decoding"
      },
      {
        "time": 3592.247999995947,
        "key": "kIsVideoDecryptingDemuxerStream",
        "value": false
      },
      {
        "time": 3592.2509999871254,
        "key": "kVideoDecoderName",
        "value": "VideoToolboxVideoDecoder"
      },
      {
        "time": 3592.2599999904633,
        "key": "kIsPlatformVideoDecoder",
        "value": true
      },
      {
        "time": 3592.272999972105,
        "key": "info",
        "value": "Selected VideoToolboxVideoDecoder for video decoding, config: codec: h264, profile: h264 high, level: not available, alpha_mode: is_opaque, coded size: [1280,720], visible rect: [0,0,1280,720], natural size: [1280,720], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"
      },
      {
        "time": 3592.2879999876022,
        "key": "pipeline_state",
        "value": "kPlaying"
      },
      {
        "time": 3625.1089999973774,
        "key": "seek_target",
        "value": 1864.884199
      },
      {
        "time": 3625.1519999802113,
        "key": "pipeline_state",
        "value": "kSeeking"
      },
      {
        "time": 3625.344999998808,
        "key": "pipeline_state",
        "value": "kPlaying"
      },
      {
        "time": 3656.660999983549,
        "key": "dimensions",
        "value": "1280x720"
      },
      {
        "time": 3656.6659999787807,
        "key": "kResolution",
        "value": "1280x720"
      },
      {
        "time": 3656.7909999787807,
        "key": "info",
        "value": "Effective playback rate changed from 0 to 1"
      },
      {
        "time": 3656.8579999804497,
        "key": "event",
        "value": "kPlay"
      },
      {
        "time": 3656.7289999723434,
        "key": "pipeline_buffering_state",
        "value": {
          "for_suspended_start": false,
          "state": "BUFFERING_HAVE_ENOUGH"
        }
      },
      {
        "time": 5052.675999999046,
        "key": "video_buffering_state",
        "value": {
          "reason": "DEMUXER_UNDERFLOW",
          "state": "BUFFERING_HAVE_NOTHING"
        }
      },
      {
        "time": 6696.174999982119,
        "key": "video_buffering_state",
        "value": {
          "state": "BUFFERING_HAVE_ENOUGH"
        }
      },
      {
        "time": 6814.826999992132,
        "key": "duration",
        "value": 1898.186
      },
      {
        "time": 12905.000999987125,
        "key": "duration",
        "value": 1907.875
      },
      {
        "time": 12980.543999999762,
        "key": "duration",
        "value": 1908.17
      },
      {
        "time": 23099.552999973297,
        "key": "duration",
        "value": 1917.88
      },
      {
        "time": 23157.41599997878,
        "key": "duration",
        "value": 1918.154
      },
      {
        "time": 33160.028999984264,
        "key": "duration",
        "value": 1927.882
      },
      {
        "time": 33213.100999981165,
        "key": "duration",
        "value": 1928.138
      },
      {
        "time": 42914.14099997282,
        "key": "duration",
        "value": 1930.186
      },
      {
        "time": 42914.25499999523,
        "key": "duration",
        "value": 1938.122
      },
      {
        "time": 52832.964999973774,
        "key": "duration",
        "value": 1947.883
      },
      {
        "time": 53029.803999990225,
        "key": "duration",
        "value": 1948.234
      },
      {
        "time": 53916.581999987364,
        "key": "pipeline_state",
        "value": "kStopping"
      },
      {
        "time": 53916.58499997854,
        "key": "event",
        "value": "kWebMediaPlayerDestroyed"
      },
      {
        "time": 53916.653999984264,
        "key": "kVideoPlaybackRoughness",
        "value": 60.215
      },
      {
        "time": 53916.65599998832,
        "key": "kVideoPlaybackFreezing",
        "value": 1.597911
      },
      {
        "time": 53916.65699997544,
        "key": "kFramerate",
        "value": 28
      },
      {
        "time": 53917.19099998474,
        "key": "pipeline_state",
        "value": "kStopped"
      }
    ],
    "lastRendered": 0,
    "firstTimestamp_": 180444682.08
  },
  "28:2": {
    "id": "28:2",
    "properties": {
      "render_id": 28,
      "player_id": 2,
      "created": "2024-10-04 20:52:40.199778 UTC",
      "origin_url": "https://hlsjs.video-dev.org/",
      "kFrameUrl": "https://hlsjs.video-dev.org/demo/",
      "kFrameTitle": "hls.js demo",
      "url": "blob:https://hlsjs.video-dev.org/dcae33cf-c172-4ca5-a29c-236fa0a5e90d",
      "info": "Effective playback rate changed from 0 to 1",
      "kRendererName": "RendererImpl",
      "pipeline_state": "kPlaying",
      "duration": 194.418,
      "kVideoTracks": [
        {
          "alpha mode": "is_opaque",
          "codec": "h264",
          "coded size": "1280x720",
          "color space": {
            "matrix": "BT709",
            "primaries": "BT709",
            "range": "LIMITED",
            "transfer": "BT709"
          },
          "encryption scheme": "Unencrypted",
          "has extra data": false,
          "hdr metadata": "unset",
          "natural size": "1280x720",
          "orientation": "0°",
          "profile": "h264 high",
          "visible rect": "0,0 1280x720"
        }
      ],
      "kAudioTracks": [
        {
          "bytes per channel": 2,
          "bytes per frame": 2,
          "channel layout": "MONO",
          "channels": 1,
          "codec": "aac",
          "codec delay": 0,
          "discard decoder delay": false,
          "encryption scheme": "Unencrypted",
          "has extra data": false,
          "profile": "unknown",
          "sample format": "Signed 16-bit",
          "samples per second": 8000,
          "seek preroll": "0us"
        }
      ],
      "kIsAudioDecryptingDemuxerStream": false,
      "kAudioDecoderName": "FFmpegAudioDecoder",
      "kIsPlatformAudioDecoder": false,
      "debug": "Video rendering in low delay mode.",
      "kIsVideoDecryptingDemuxerStream": false,
      "kVideoDecoderName": "VideoToolboxVideoDecoder",
      "kIsPlatformVideoDecoder": true,
      "seek_target": 119.9483,
      "dimensions": "1280x720",
      "kResolution": "1280x720",
      "event": "kPause",
      "pipeline_buffering_state": {
        "for_suspended_start": false,
        "state": "BUFFERING_HAVE_ENOUGH"
      }
    },
    "allEvents": [
      {
        "time": 0,
        "key": "created",
        "value": "2024-10-04 20:52:40.199778 UTC"
      },
      {
        "time": 0.09400001168251038,
        "key": "origin_url",
        "value": "https://hlsjs.video-dev.org/"
      },
      {
        "time": 0.09799998998641968,
        "key": "kFrameUrl",
        "value": "https://hlsjs.video-dev.org/demo/"
      },
      {
        "time": 0.10100001096725464,
        "key": "kFrameTitle",
        "value": "hls.js demo"
      },
      {
        "time": 0.15900000929832458,
        "key": "url",
        "value": "blob:https://hlsjs.video-dev.org/dcae33cf-c172-4ca5-a29c-236fa0a5e90d"
      },
      {
        "time": 0.1850000023841858,
        "key": "info",
        "value": "ChunkDemuxer"
      },
      {
        "time": 0.1940000057220459,
        "key": "kRendererName",
        "value": "RendererImpl"
      },
      {
        "time": 0.8039999902248383,
        "key": "pipeline_state",
        "value": "kStarting"
      },
      {
        "time": 1061.1780000030994,
        "key": "duration",
        "value": 152.947
      },
      {
        "time": 2111.8810000121593,
        "key": "kVideoTracks",
        "value": [
          {
            "alpha mode": "is_opaque",
            "codec": "h264",
            "coded size": "1280x720",
            "color space": {
              "matrix": "BT709",
              "primaries": "BT709",
              "range": "LIMITED",
              "transfer": "BT709"
            },
            "encryption scheme": "Unencrypted",
            "has extra data": false,
            "hdr metadata": "unset",
            "natural size": "1280x720",
            "orientation": "0°",
            "profile": "h264 high",
            "visible rect": "0,0 1280x720"
          }
        ]
      },
      {
        "time": 2111.9469999969006,
        "key": "kAudioTracks",
        "value": [
          {
            "bytes per channel": 2,
            "bytes per frame": 2,
            "channel layout": "MONO",
            "channels": 1,
            "codec": "aac",
            "codec delay": 0,
            "discard decoder delay": false,
            "encryption scheme": "Unencrypted",
            "has extra data": false,
            "profile": "unknown",
            "sample format": "Signed 16-bit",
            "samples per second": 8000,
            "seek preroll": "0us"
          }
        ]
      },
      {
        "time": 2115.8779999911785,
        "key": "kIsAudioDecryptingDemuxerStream",
        "value": false
      },
      {
        "time": 2115.8819999992847,
        "key": "kAudioDecoderName",
        "value": "FFmpegAudioDecoder"
      },
      {
        "time": 2115.88299998641,
        "key": "kIsPlatformAudioDecoder",
        "value": false
      },
      {
        "time": 2115.895000010729,
        "key": "info",
        "value": "Selected FFmpegAudioDecoder for audio decoding, config: codec: aac, profile: unknown, bytes_per_channel: 2, channel_layout: MONO, channels: 1, samples_per_second: 8000, sample_format: Signed 16-bit, bytes_per_frame: 2, seek_preroll: 0us, codec_delay: 0, has extra data: false, encryption scheme: Unencrypted, discard decoder delay: false, target_output_channel_layout: STEREO, target_output_sample_format: Unknown sample format, has aac extra data: true"
      },
      {
        "time": 2115.918000012636,
        "key": "debug",
        "value": "Video rendering in low delay mode."
      },
      {
        "time": 2115.9410000145435,
        "key": "info",
        "value": "Cannot select DecryptingVideoDecoder for video decoding"
      },
      {
        "time": 2127.300000011921,
        "key": "kIsVideoDecryptingDemuxerStream",
        "value": false
      },
      {
        "time": 2127.3179999887943,
        "key": "kVideoDecoderName",
        "value": "VideoToolboxVideoDecoder"
      },
      {
        "time": 2127.319000005722,
        "key": "kIsPlatformVideoDecoder",
        "value": true
      },
      {
        "time": 2127.333999991417,
        "key": "info",
        "value": "Selected VideoToolboxVideoDecoder for video decoding, config: codec: h264, profile: h264 high, level: not available, alpha_mode: is_opaque, coded size: [1280,720], visible rect: [0,0,1280,720], natural size: [1280,720], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"
      },
      {
        "time": 2127.3499999940395,
        "key": "pipeline_state",
        "value": "kPlaying"
      },
      {
        "time": 2145.099000006914,
        "key": "seek_target",
        "value": 119.9483
      },
      {
        "time": 2145.1349999904633,
        "key": "pipeline_state",
        "value": "kSeeking"
      },
      {
        "time": 2145.365999996662,
        "key": "pipeline_state",
        "value": "kPlaying"
      },
      {
        "time": 2191.8289999961853,
        "key": "dimensions",
        "value": "1280x720"
      },
      {
        "time": 2191.8689999878407,
        "key": "kResolution",
        "value": "1280x720"
      },
      {
        "time": 2192.044999986887,
        "key": "info",
        "value": "Effective playback rate changed from 0 to 1"
      },
      {
        "time": 2192.1189999878407,
        "key": "event",
        "value": "kPlay"
      },
      {
        "time": 2191.9490000009537,
        "key": "pipeline_buffering_state",
        "value": {
          "for_suspended_start": false,
          "state": "BUFFERING_HAVE_ENOUGH"
        }
      },
      {
        "time": 3749.4320000112057,
        "key": "duration",
        "value": 153.298
      },
      {
        "time": 12422.488999992609,
        "key": "duration",
        "value": 164.415
      },
      {
        "time": 12490.150999993086,
        "key": "duration",
        "value": 164.722
      },
      {
        "time": 23329.868000000715,
        "key": "duration",
        "value": 184.416
      },
      {
        "time": 23725.83899998665,
        "key": "duration",
        "value": 184.69
      },
      {
        "time": 33525.04699999094,
        "key": "duration",
        "value": 194.418
      },
      {
        "time": 46743.09400001168,
        "key": "event",
        "value": "kPause"
      }
    ],
    "lastRendered": 0,
    "firstTimestamp_": 180498617.956
  }
}

daveisfera avatar Oct 04 '24 20:10 daveisfera

Hi @daveisfera. Have you tried dev ( https://hlsjs-dev.video-dev.org/demo/)? Is the behavior the same?

The media internals are not useful in this case (hls.js is deciding what to load, not the browser's decoder/renderer). We need hls.js console logs (config: debug: true) to understand the error/retry attempts being made. Please update the description.

robwalch avatar Oct 05 '24 18:10 robwalch

Hi @daveisfera. Have you tried dev ( https://hlsjs-dev.video-dev.org/demo/)? Is the behavior the same?

The media internals are not useful in this case (hls.js is deciding what to load, not the browser's decoder/renderer). We need hls.js console logs (config: debug: true) to understand the error/retry attempts being made. Please update the description.

Yes, I tried the dev site with the same outcome. I included the console output and if I'm understanding that test page correctly, then debug: true is on by default so that should be in the output.

daveisfera avatar Oct 07 '24 02:10 daveisfera

that should be in the output.

17.025 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video24.m4s
17.091 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video24.m4s
17.156 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video24.m4s
17.226 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video24.m4s
27.016 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.087 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.157 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.228 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.301 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.373 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.446 | Error while loading fragment https://mytest.s3.amazonaws.com/dljtest/video/video25.m4s
27.447 | A network error occurred: fragLoadError

There should be more than just errors. Maybe you're filtering some of the console output?

robwalch avatar Oct 07 '24 02:10 robwalch

Here are some related issues about the retry policy for 4xx errors that may contain some helpful information:

  • #5647
  • #6323

robwalch avatar Oct 07 '24 20:10 robwalch

Yes, I had noticed those issues, but those are a 404 response and I understand that S3 will respond with a 403 for both a missing file and a permission denied, so the 403 is very similar to a 404 in this case, but there technically is a difference and the short retry time of HLS.js is causing a problem here that is handled correctly by Safari and Video.js.

Here's the logs from a run that ran into the issue: hlsjs.video-dev.org-1729030566007.log

daveisfera avatar Oct 15 '24 22:10 daveisfera