GStreamer推RTP流至VLC失败,请求排查原因
发送端GStreamer管道
appsrc ! videoconvert ! videoscale ! video/x-raw,format=BGR,width=2448,height=2048,framerate=21/1 ! videoconvert ! openh264enc ! h264parse ! rtph264pay ! udpsink host=127.0.0.1 port=10001
GStreamer接收端正常播放情况
我用以下命令在Windows PowerShell中接收流,约30秒后"Direct3D11 renderer"窗口能正常播放视频:
Powershell > ./gst-launch-1.0.exe udpsrc address=127.0.0.1 port=10001 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96" ! rtph264depay ! h264parse ! openh264dec ! queue ! autovideosink
PowerShell输出内容如下:
Use Windows high-resolution clock, precision: 1 ms
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Got context from element 'autovideosink0': gst.d3d11.device.handle=context, device=(GstD3D11Device)"(GstD3D11Device)\ d3d11device2", adapter=(uint)0, adapter-luid=(gint64)86769, device-id=(uint)5567, vendor-id=(uint)4098, hardware=(boolean)true, description=(string)"AMD\ Radeon(TM)\ 780M";
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
VLC播放异常情况
我创建了如下SDP文件,尝试用VLC播放该流时,VLC仅能连接成功,但没有视频输出,还会暂停:
v=0 o=- 0 0 IN IP4 127.0.0.1 s=GStreamer H264 stream c=IN IP4 127.0.0.1 m=video 10001 RTP/AVP 96 a=rtpmap:96 H264/90000
疑问
请问这一问题的原因是什么?
内容的提问来源于stack exchange,提问作者wsys

