ossrs / srs

SRS is a simple, high-efficiency, real-time video server supporting RTMP, WebRTC, HLS, HTTP-FLV, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
24.74k stars 5.28k forks source link

HEVC decode av stream failed-demux hevc VPS/SPS/PPS : requires 23 only 0 bytes" #3943

Closed tangwenixng closed 3 months ago

tangwenixng commented 5 months ago

Describe the bug use ffmpeg push rtsp stream of hevc format to srs server , the log show :

"serve error code=3099(HevcDecode)(HEVC decode av stream failed) : service cycle : rtmp: stream service : rtmp: receive thread : handle publish message : rtmp : consume message : rtmp: consume video : format consume video : demux hevc VPS/SPS/PPS : requires 23 only 0 bytes"

Version 6.0.101

To Reproduce Steps to reproduce the behavior:

  1. use docker startup server: docker run --rm -it -p 19851:1985 -p 19351:1935 -p 8180:8080 registry.cn-hangzhou.aliyuncs.com/ossrs/srs:6.0.101 ./objs/srs -c conf/hevc.flv.conf
  2. then push hevc stream to server: docker run --rm -it -w /usr/local/srs/objs/ffmpeg/bin registry.cn-hangzhou.aliyuncs.com/ossrs/srs:6.0.101 ./ffmpeg -rtsp_transport tcp -i 'rtsp://user:Gyjc1234!@10.129.117.51/media/video0' -loglevel info -c:v copy -an -flvflags no_duration_filesize -map 0:v -f flv 'rtmp://172.26.29.103:19351/Prd_stream/407lq'

Expected behavior expect rtmp stream is living

Screenshots

image

Additional context

winlinvip commented 5 months ago

The content failed to parse, which seems to be an issue with the stream of content.

TRANS_BY_GPT4

tangwenixng commented 5 months ago

The content failed to parse, which seems to be an issue with the stream of content.

TRANS_BY_GPT4

image

FFmpeg log shows 'VPS 0 does not exist,' whether it might be the cause of this.

tangwenixng commented 5 months ago

I try dump raw rtsp data to file, use command : ./ffmpeg -i 'rtsp://user:Gyjc1234!@10.129.117.51/media/video0' -c copy -f rawvideo -y output.raw ,

and then use this file push to srs server: ffmpeg -i /root/output.raw -c:v copy -an -f flv rtmp://172.26.29.103:19351/gy/test, result is ok, stream is living

winlinvip commented 3 months ago

Yes, I believe your stream content is quite unique and contains problems. So, if you could use ffmpeg to convert it to a raw image and then transcode it for live streaming, it might work better. If successful, this could be a more effective solution.