WEBRTC and MSE not working on one single android phone #5506
Replies: 3 comments 4 replies
-
It's likely a device issue which just can't handle playing back. As far as mse goes you can open chrome and in one tab have frigate open, in the other tab you can open chrome://media-internals which is an MSE debugger you can use to see why playback is not working. |
Beta Was this translation helpful? Give feedback.
-
Thanks, it's the newest phone in my household, so I would be surprised if it couldn't handle it (or maybe I'm misinterpreting?). I checked the MSE with media-internals and I see an error "Unable to allocate codec" which is the likely culprit. {
"time": 2746.0610000006855,
"key": "error",
"value": "video decoder reinitialization failed"
},
{
"time": 2746.375,
"key": "error",
"value": {
"cause": {
"code": 1,
"data": {},
"group": "DecoderStatus",
"message": "Unable to allocate codec",
"stack": [
{
"file": "media/gpu/android/media_codec_video_decoder.cc",
"line": 1192
}
]
},
"code": 3,
"data": {},
"group": "PipelineStatus",
"message": "",
"stack": [
{
"file": "media/renderers/video_renderer_impl.cc",
"line": 590
}
]
}
}, I have no clue how to parse this though, so help would be appreciated. There's a bunch of debug messages before that that look like this: {
"time": 2585.89999999851,
"key": "debug",
"value": "Media segment did not contain any coded frames for track 2, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2586.1180000007153,
"key": "debug",
"value": "Media segment did not contain any coded frames for track 1, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2586.3130000010133,
"key": "debug",
"value": "Media segment did not contain any coded frames for track 1, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2586.8790000006557,
"key": "debug",
"value": "ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite."
}, The full log is as follows (minus a few personal bits just to be sure): {
"7:0": {
"id": "7:0",
"properties": {
"render_id": 7,
"player_id": 0,
"created": "2023-02-16 12:09:42.641 UTC",
"origin_url": "http://x.x.x.x:5000/",
"kFrameUrl": "http://x.x.x.x:5000/cameras/camera_name",
"kFrameTitle": "Frigate",
"url": "therwasanurlhere",
"kTextTracks": [],
"info": "Effective playback rate changed from 0 to 1",
"kRendererName": "RendererImpl",
"pipeline_state": "kStopped",
"kVideoTracks": [
{
"alpha mode": "is_opaque",
"codec": "h264",
"coded size": "2560x1440",
"color space": {
"matrix": "BT709",
"primaries": "BT709",
"range": "LIMITED",
"transfer": "BT709"
},
"encryption scheme": "Unencrypted",
"has extra data": false,
"hdr metadata": "unset",
"natural size": "2560x1440",
"orientation": "0°",
"profile": "h264 main",
"visible rect": "0,0 2560x1440"
}
],
"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": true,
"profile": "unknown",
"sample format": "Signed 16-bit",
"samples per second": 16000,
"seek preroll": "0us"
}
],
"kIsAudioDecryptingDemuxerStream": false,
"kAudioDecoderName": "FFmpegAudioDecoder",
"kIsPlatformAudioDecoder": false,
"debug": "(Log limit reached. Further similar entries may be suppressed): ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite.",
"kIsVideoDecryptingDemuxerStream": false,
"kVideoDecoderName": "MediaCodecVideoDecoder",
"kIsPlatformVideoDecoder": true,
"duration": "unknown",
"warning": "video decoder fallback after initial decode error.",
"error": {
"cause": {
"code": 1,
"data": {},
"group": "DecoderStatus",
"message": "Unable to allocate codec",
"stack": [
{
"file": "media/gpu/android/media_codec_video_decoder.cc",
"line": 1192
}
]
},
"code": 3,
"data": {},
"group": "PipelineStatus",
"message": "",
"stack": [
{
"file": "media/renderers/video_renderer_impl.cc",
"line": 590
}
]
},
"audio_buffering_state": {
"state": "BUFFERING_HAVE_ENOUGH"
},
"event": "kPlay"
},
"allEvents": [
{
"time": 0,
"key": "created",
"value": "2023-02-16 12:09:42.641 UTC"
},
{
"time": 5.535999998450279,
"key": "origin_url",
"value": "therwasanurlhere"
},
{
"time": 5.5480000004172325,
"key": "kFrameUrl",
"value": "therwasanurlhere"
},
{
"time": 5.550999999046326,
"key": "kFrameTitle",
"value": "Frigate"
},
{
"time": 6.100999999791384,
"key": "url",
"value": "therwasanurlhere"
},
{
"time": 6.114000000059605,
"key": "kTextTracks",
"value": []
},
{
"time": 6.147999998182058,
"key": "info",
"value": "ChunkDemuxer"
},
{
"time": 6.179000001400709,
"key": "kRendererName",
"value": "RendererImpl"
},
{
"time": 23.93800000101328,
"key": "pipeline_state",
"value": "kStarting"
},
{
"time": 41.1440000012517,
"key": "kVideoTracks",
"value": [
{
"alpha mode": "is_opaque",
"codec": "h264",
"coded size": "2560x1440",
"color space": {
"matrix": "BT709",
"primaries": "BT709",
"range": "LIMITED",
"transfer": "BT709"
},
"encryption scheme": "Unencrypted",
"has extra data": false,
"hdr metadata": "unset",
"natural size": "2560x1440",
"orientation": "0°",
"profile": "h264 main",
"visible rect": "0,0 2560x1440"
}
]
},
{
"time": 41.19099999964237,
"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": true,
"profile": "unknown",
"sample format": "Signed 16-bit",
"samples per second": 16000,
"seek preroll": "0us"
}
]
},
{
"time": 55.537999998778105,
"key": "kIsAudioDecryptingDemuxerStream",
"value": false
},
{
"time": 55.54399999976158,
"key": "kAudioDecoderName",
"value": "FFmpegAudioDecoder"
},
{
"time": 55.546999998390675,
"key": "kIsPlatformAudioDecoder",
"value": false
},
{
"time": 55.58100000023842,
"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: 16000, sample_format: Signed 16-bit, bytes_per_frame: 2, seek_preroll: 0us, codec_delay: 0, has extra data: true, 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": 55.64000000059605,
"key": "debug",
"value": "Video rendering in low delay mode."
},
{
"time": 68.80599999800324,
"key": "kIsVideoDecryptingDemuxerStream",
"value": false
},
{
"time": 68.84899999946356,
"key": "kVideoDecoderName",
"value": "MediaCodecVideoDecoder"
},
{
"time": 68.85099999979138,
"key": "kIsPlatformVideoDecoder",
"value": true
},
{
"time": 68.89000000059605,
"key": "info",
"value": "Selected MediaCodecVideoDecoder for video decoding, config: codec: h264, profile: h264 main, level: not available, alpha_mode: is_opaque, coded size: [2560,1440], visible rect: [0,0,2560,1440], natural size: [2560,1440], has extra data: false, encryption scheme: Unencrypted, rotation: 0°, flipped: 0, color space: {primaries:BT709, transfer:BT709, matrix:BT709, range:LIMITED}"
},
{
"time": 68.9400000013411,
"key": "pipeline_state",
"value": "kPlaying"
},
{
"time": 41.28700000047684,
"key": "duration",
"value": "unknown"
},
{
"time": 2581.1880000010133,
"key": "debug",
"value": "Media segment did not contain any coded frames for track 2, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2581.9259999990463,
"key": "debug",
"value": "Media segment did not contain any coded frames for track 1, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2583.1319999992847,
"key": "debug",
"value": "ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite."
},
{
"time": 2583.1939999982715,
"key": "debug",
"value": "Media segment did not contain any coded frames for track 2, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2584.0309999994934,
"key": "debug",
"value": "ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite."
},
{
"time": 2584.0889999978244,
"key": "debug",
"value": "Media segment did not contain any coded frames for track 2, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2584.3090000003576,
"key": "debug",
"value": "Media segment did not contain any coded frames for track 1, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2584.9939999990165,
"key": "debug",
"value": "ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite."
},
{
"time": 2585.032999999821,
"key": "debug",
"value": "Media segment did not contain any coded frames for track 2, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2585.8559999987483,
"key": "debug",
"value": "ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite."
},
{
"time": 2585.89999999851,
"key": "debug",
"value": "Media segment did not contain any coded frames for track 2, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2586.1180000007153,
"key": "debug",
"value": "Media segment did not contain any coded frames for track 1, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2586.3130000010133,
"key": "debug",
"value": "Media segment did not contain any coded frames for track 1, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2586.8790000006557,
"key": "debug",
"value": "ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite."
},
{
"time": 2586.9089999981225,
"key": "debug",
"value": "(Log limit reached. Further similar entries may be suppressed): Media segment did not contain any coded frames for track 2, mismatching initialization segment. Therefore, MSE coded frame processing may not interoperably detect discontinuities in appended media."
},
{
"time": 2587.195000000298,
"key": "warning",
"value": "Failed to reconcile encoded audio times with decoded output."
},
{
"time": 2587.4910000003874,
"key": "debug",
"value": "ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite."
},
{
"time": 2588.214999999851,
"key": "debug",
"value": "ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite."
},
{
"time": 2665.7080000005662,
"key": "debug",
"value": "ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite."
},
{
"time": 2667.7580000013113,
"key": "debug",
"value": "ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite."
},
{
"time": 2691.0109999999404,
"key": "debug",
"value": "(Log limit reached. Further similar entries may be suppressed): ISO-BMFF container metadata for video frame indicates that the frame is a keyframe, but the video frame contents indicate the opposite."
},
{
"time": 2744.054999999702,
"key": "info",
"value": "Entering Terminal State: Unable to allocate codec"
},
{
"time": 2745.004999998957,
"key": "warning",
"value": "video decoder fallback after initial decode error."
},
{
"time": 2745.5,
"key": "info",
"value": "Cannot select VpxVideoDecoder for video decoding"
},
{
"time": 2745.940000001341,
"key": "info",
"value": "Cannot select Dav1dVideoDecoder for video decoding"
},
{
"time": 2746.0610000006855,
"key": "error",
"value": "video decoder reinitialization failed"
},
{
"time": 2746.375,
"key": "error",
"value": {
"cause": {
"code": 1,
"data": {},
"group": "DecoderStatus",
"message": "Unable to allocate codec",
"stack": [
{
"file": "media/gpu/android/media_codec_video_decoder.cc",
"line": 1192
}
]
},
"code": 3,
"data": {},
"group": "PipelineStatus",
"message": "",
"stack": [
{
"file": "media/renderers/video_renderer_impl.cc",
"line": 590
}
]
}
},
{
"time": 2747.022999998182,
"key": "pipeline_state",
"value": "kStopping"
},
{
"time": 2748.9739999994636,
"key": "pipeline_state",
"value": "kStopped"
},
{
"time": 2590.5209999978542,
"key": "audio_buffering_state",
"value": {
"state": "BUFFERING_HAVE_ENOUGH"
}
},
{
"time": 53011.86299999803,
"key": "info",
"value": "Effective playback rate changed from 0 to 1"
},
{
"time": 53014.32999999821,
"key": "event",
"value": "kPlay"
}
],
"lastRendered": 0,
"firstTimestamp_": 23130626.423
}
} |
Beta Was this translation helpful? Give feedback.
-
Just wanted to add that I have this problem too. Firefox works. Chrome it's random, sometimes it does, sometimes it doesn't. Jpeg always works though |
Beta Was this translation helpful? Give feedback.
-
I have a pretty weird issue where on one phone I can't see any webRTC or MSE streams. They don't work in the web interface and they don't work in the home assistant app. MJPEG appears to be working fine. Normally you'd expect a setting to be the issue, but all other phones I tried work fine. Sadly, this is my own phone, so it is a pretty big issue.
It doesn't appear to be an issue with frigate or go2rtc, especially because it already happened in the previous version Frigate version when I used webRTC and no go2rtc. However, every so often it actually suddenly would work then, but that would be about 1 in 10 times or so.
Does anyone have any clue what the cause is or even how I would go around debugging this issue? I can't seem to find any lead by googling.
Beta Was this translation helpful? Give feedback.
All reactions