iOS H264 decode error: Cannot render remote video

177 views
Skip to first unread message

Balu Swarna

unread,
Aug 10, 2023, 2:15:35 PM8/10/23
to discuss-webrtc
Hi, 

I am currently developing a WebRTC app to stream video from an IoT camera. I am receiving video stream but am seeing frame decode  errors. 

The library is adding two supported H264 codecs to the offer

(webrtc_video_engine.cc:1157): SetRecvParameters: {codecs: [VideoCodec[96:H264], VideoCodec[97:rtx], VideoCodec[98:H264], VideoCodec[99:rtx], VideoCodec[100:VP8], VideoCodec[101:rtx], VideoCodec[127:red], VideoCodec[124:rtx], VideoCodec[125:ulpfec]]

Offer snippet

m=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 127 124 125

a=rtpmap:96 H264/90000

a=rtcp-fb:96 goog-remb

a=rtcp-fb:96 transport-cc

a=rtcp-fb:96 ccm fir

a=rtcp-fb:96 nack

a=rtcp-fb:96 nack pli

a=fmtp:96 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640c1f

a=rtpmap:98 H264/90000

a=rtcp-fb:98 goog-remb

a=rtcp-fb:98 transport-cc

a=rtcp-fb:98 ccm fir

a=rtcp-fb:98 nack

a=rtcp-fb:98 nack pli

a=fmtp:98 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f

And in the answer, I receive that 98 is ok

Answer:

m=video 36104 UDP/TLS/RTP/SAVPF 98

a=rtpmap:98 H264/90000

a=fmtp:98 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f

a=rtcp-fb:98 nack

a=rtcp-fb:98 nack pli

a=rtcp-fb:98 ccm fir

a=rtcp-fb:98 transport-cc

a=msid:baf428250775e86de0d2b6deaf61c637 ddd4440b0ac73e1b78fb1b07f506f8bd

a=ssrc:2914360942 cname:baf428250775e86de0d2b6deaf61c637


As you can see I am receiving video stream id as well. But when it comes to rendereing I am seeing errors in library logs

(rtp_video_stream_receiver2.cc:1137): Found out of band supplied codec parameters for payload type: 98

(decoder_database.cc:144): Initializing decoder with payload type '98'.

(generic_decoder.cc:216): Decoder implementation: VideoToolbox

(RTCVideoDecoderH264.mm:59): Failed to decode frame. Status: -12909

(RTCVideoDecoderH264.mm:108): Last frame decode failed.

(generic_decoder.cc:253): Failed to decode frame with timestamp 2046995909, error code: -1

(RTCVideoDecoderH264.mm:59): Failed to decode frame. Status: -12909

(video_receive_stream2.cc:745): No decodable frame in 200 ms, requesting keyframe.

(video_receive_stream2.cc:745): No decodable frame in 200 ms, requesting keyframe.

(video_receive_stream2.cc:745): No decodable frame in 200 ms, requesting keyframe.

As a result, the remote video stream is not rendered. Please suggest

Carl Meyer

unread,
Sep 30, 2023, 4:10:41 AM9/30/23
to discuss-webrtc
Hi

I might be running into a similar problem on my implementation (sounds similar to what your are trying to do). 

Sorry if I can not offer a solution, but could i ask how you are seeing these error messages as I would love to do the same on my implementation so we can see if we might be running into the same problem? 

Luis Guillermo Bultet Ibles

unread,
Jun 2, 2025, 1:36:49 AMJun 2
to discuss...@googlegroups.com
No, I keep this error msgs, to learning bcoz my response ranking isn't so low... im working in other abstraction layer, good luck.

--
This list falls under the WebRTC Code of Conduct - https://webrtc.org/support/code-of-conduct.
---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/dfa9b3bc-6ae4-4926-b3c4-47b606ecaac4n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages