硬件:地平线X3 module,2g内存,带Wi-Fi
云台:a8mini云翼相机
云台rtsp地址:rtsp://192.168.144.25:8554/main.264 系统版本:已下载最新镜像并更新所有的软件包
Python示例的解析rtsp流的程序/app/pydevdemo/08decodertspstream/decodertspstream.py可以正常运行,但c语言示例的rtsp2display.c程序无法运行,显示错误似乎是与SPS和PPS有关。
这就很奇怪,既然Python程序都能正常解析,那么码流是包含了SPS和PPS信息的。 但是非常奇怪的是,在我多次尝试运行中,有两三次是正常解析了,然后我退出去再运行,又开始报错了。
这里我修改了一下,保存并解析第一个帧。然后退出。
这是以下报错和第一个帧的数据:
sunrise@ubuntu /a/c/rtsp2display> sudo ./rtsp2display -i rtsp://192.168.144.25:8554/main.264 -t tcp
avformat_open_input ok!
avformat_find_stream_info ok!
Input #0, rtsp, from 'rtsp://192.168.144.25:8554/main.264':
Metadata:
title : LIVE555 Streaming Media v2019.08.12
comment : LIVE555 Streaming Media v2019.08.12
Duration: N/A, start: 0.279989, bitrate: N/A
Stream #0:0: Video: h264 (High), yuv420p(progressive), 1920x1080, 25 fps, 25 tbr, 90k tbn, 50 tbc
av_dump_format ok!
rtsp_w:1920,rtsp_h:1080
display_w:1920,dispaly_h:1080
libiar: hb_disp_set_timing done!
Setting VPS channel-2: src_w:1920, src_h:1080; dst_w:1920, dst_h:1080;
sp_open_vps success!
start av_read_frame
end av_read_frame
read frame 1 times
video_st_index
pkt.size=2765, pkt.pts=25199, pkt.data=0x999bb500.
write_first_frame_loh
[ERROR]["multimedia"][src/vdi/linux/vdi_osal.c:174] [ERROR][474.08880][6189:6211][VideoDecoder] DecodeHeader:1568 FAILED TO DEC_PIC_HDR: ret(1), SEQERR(00005000)
[ERROR]["multimedia"][src/vdi/linux/vdi_osal.c:174] [ERROR][474.08888][6189:6211][COMPONENT] Component wave_decoder will be terminated.
sunrise@ubuntu /a/c/rtsp2display>