begeekmyfriend/yasea

Error in decoding the stream when using Hardware Encoder

hamzanaeemcowlar opened this issue · 2 comments

Hello,

I am encountering an issue where the saved rtmp stream cannot be played by ffplay, resulting in the following error message:

[h264 @ 0x7f4c4e5cd780] decode_slice_header error
[h264 @ 0x7f4c4e5cd780] no frame!
[h264 @ 0x7f4c4e5cd780] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x7f4c4e5cd780] decode_slice_header error
[h264 @ 0x7f4c4e5cd780] no frame!
[mpegts @ 0x7f4c50cfa800] decoding for stream 0 failed

My device is a Radxa Rock 5B, and I am using the "c2.rk.avc.encoder" hardware encoder. I have attempted to resolve the issue by changing the iFrameinterval to 0, but the problem persists. However, when I use a software decoder, the issue is resolved. Unfortunately, my requirements necessitate the use of the hardware encoder. Can you provide assistance with this matter?

@begeekmyfriend

(I used google Translate to write chinese, So, that it is easy for you to understand)

你好,

我遇到保存的rtmp流无法用ffplay播放的问题,导致出现如下错误信息:

[h264 @ 0x7f4c4e5cd780] decode_slice_header error
[h264 @ 0x7f4c4e5cd780] no frame!
[h264 @ 0x7f4c4e5cd780] non-existing PPS 0 referenced
Last message repeated 1 times
[h264 @ 0x7f4c4e5cd780] decode_slice_header error
[h264 @ 0x7f4c4e5cd780] no frame!
[mpegts @ 0x7f4c50cfa800] decoding for stream 0 failed

我的设备是 Radxa Rock 5B,我使用的是“c2.rk.avc.encoder”硬件编码器。我试图通过将 iFrameinterval 更改为 0 来解决问题,但问题仍然存在。但是,当我使用软件解码器时,问题就解决了。不幸的是,我的要求需要使用硬件编码器。你能就此事提供帮助吗?

@begeekmyfriend

Hi, sorry for my late reply. I am not quite familiar with c2.rk.avc.encoder ported on Rock 5B platform. You need to rewrite SrsEncoder.java maybe to fit the custom SDK.