Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ssis/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
RTSP Gstreamer h265服务器/客户端_Gstreamer_Rtsp_H.265 - Fatal编程技术网

RTSP Gstreamer h265服务器/客户端

RTSP Gstreamer h265服务器/客户端,gstreamer,rtsp,h.265,Gstreamer,Rtsp,H.265,如何编写一个管道来流式传输RTSP上编码的videotestsrc h265,以及另一个管道来播放前者 据我所知,这应该是一个有效的服务器 gst-launch-1.0 -v videotestsrc ! video/x-raw,width=1280,height=720 ! x265enc ! rtph265pay ! udpsink host=127.0.0.1 port=5000 输出是 Setting pipeline to PAUSED ... Pipeline is PREROLL

如何编写一个管道来流式传输RTSP上编码的videotestsrc h265,以及另一个管道来播放前者

据我所知,这应该是一个有效的服务器

gst-launch-1.0 -v videotestsrc ! video/x-raw,width=1280,height=720 ! x265enc ! rtph265pay ! udpsink host=127.0.0.1 port=5000
输出是

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstX265Enc:x265enc0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
Redistribute latency...
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ framerate\=\(fraction\)30/1\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive"
/GstPipeline:pipeline0/GstX265Enc:x265enc0.GstPad:src: caps = "video/x-h265\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ tier\=\(string\)main\,\ profile\=\(string\)main\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
/GstPipeline:pipeline0/GstRtpH265Pay:rtph265pay0.GstPad:sink: caps = "video/x-h265\,\ stream-format\=\(string\)byte-stream\,\ alignment\=\(string\)au\,\ level\=\(string\)3.1\,\ tier\=\(string\)main\,\ profile\=\(string\)main\,\ width\=\(int\)1280\,\ height\=\(int\)720\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ framerate\=\(fraction\)30/1"
/GstPipeline:pipeline0/GstRtpH265Pay:rtph265pay0.GstPad:src: caps = "application/x-rtp\,\ media\=\(string\)video\,\ payload\=\(int\)96\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H265\,\ ssrc\=\(uint\)2573237941\,\ timestamp-offset\=\(uint\)1713951204\,\ seqnum-offset\=\(uint\)27727\,\ a-framerate\=\(string\)30"
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = "application/x-rtp\,\ media\=\(string\)video\,\ payload\=\(int\)96\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H265\,\ ssrc\=\(uint\)2573237941\,\ timestamp-offset\=\(uint\)1713951204\,\ seqnum-offset\=\(uint\)27727\,\ a-framerate\=\(string\)30"
/GstPipeline:pipeline0/GstRtpH265Pay:rtph265pay0.GstPad:src: caps = "application/x-rtp\,\ media\=\(string\)video\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H265\,\ sprop-parameter-sets\=\(string\)\"QAEMAf//AWAAAAMAkAAAAwAAAwBdlZgJAA\\\=\\\=\\\,QgEBAWAAAAMAkAAAAwAAAwBdoAKAgC0WWVmkkyuAQAAAAwBAAAAHggA\\\=\\\,RAHBcrRiQAA\\\=\"\,\ payload\=\(int\)96\,\ seqnum-offset\=\(uint\)27727\,\ timestamp-offset\=\(uint\)1713951204\,\ ssrc\=\(uint\)2573237941\,\ a-framerate\=\(string\)30"
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = "application/x-rtp\,\ media\=\(string\)video\,\ clock-rate\=\(int\)90000\,\ encoding-name\=\(string\)H265\,\ sprop-parameter-sets\=\(string\)\"QAEMAf//AWAAAAMAkAAAAwAAAwBdlZgJAA\\\=\\\=\\\,QgEBAWAAAAMAkAAAAwAAAwBdoAKAgC0WWVmkkyuAQAAAAwBAAAAHggA\\\=\\\,RAHBcrRiQAA\\\=\"\,\ payload\=\(int\)96\,\ seqnum-offset\=\(uint\)27727\,\ timestamp-offset\=\(uint\)1713951204\,\ ssrc\=\(uint\)2573237941\,\ a-framerate\=\(string\)30"
/GstPipeline:pipeline0/GstRtpH265Pay:rtph265pay0: timestamp = 1713951204
/GstPipeline:pipeline0/GstRtpH265Pay:rtph265pay0: seqnum = 27727
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
所以我试过了

gst-launch-1.0 udpsrc uri=udp://127.0.0.1:5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H265, payload=(int)96, seqnum-offset=(uint)27727, timestamp-offset=(uint)1713951204, ssrc=(uint)2573237941, a-framerate=(string)30" ! rtph265depay ! vaapidecode ! vaapipostproc ! vaapisink
但是没有运气

libva info: VA-API version 0.39.3
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_39
libva info: va_openDriver() returns 0
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'pipeline0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)NULL;
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0: No valid frames decoded before end of stream
Additional debug info:
gstvideodecoder.c(1167): gst_video_decoder_sink_event_default (): /GstPipeline:pipeline0/GstVaapiDecode:vaapidecode0:
no valid frames found
Execution ended after 0:00:00.025823038
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

尝试在解码之前添加解析器,如:
gst-launch-1.0 udpsrc uri=udp://127.0.0.1:5000 caps=“应用程序/x-rtp,媒体=(字符串)视频,时钟速率=(int)90000,编码名称=(字符串)H265,有效负载=(int)96,seqnum偏移=(uint)27727,时间戳偏移=(uint)1713951204,ssrc=(uint)2573237941,a帧速=(字符串)30”!rtph265depay!h265parse!瓦皮德!瓦皮布洛克!vaapisink


注意depay和decode之间的
h265parse
元素

您是否尝试调试管道以查看是哪个部分导致了问题?尝试使用a-v运行管道,然后添加!在每个元素之后进行假想,直到管道不再工作,以确定是哪个元素导致了问题。现在我没有收到任何错误,但播放并没有真正开始。使用GST_DEBUG=2,我得到很多0:00:20.071134377 12142 0xb2c230 WARN h265parse gsth265parse.c:981:GST_h265_parse_handle_frame:还没有SPS/PPS,nal类型:0 Slice_TRAIL_N,大小:7590将被丢弃0:00:20.104555777 12142 0xb2c230 WARN h265parse现在发生了什么?在vaapisink上渲染任何内容吗?还是黑屏?