簡體   English   中英

rtsp h264流的gstreamer管道

[英]gstreamer pipeline for a rtsp h264 stream

我是gstreamer的新手,無法為下面的示例弄清楚如何創建工作管道。 我想從網絡攝像機解碼h264流。

gst-launch rtspsrc location=rtsp://172.16.112.124/axis-media/media.amp  latency=0 ! decodebin ! autovideosink -vvv

這玩的很好,但我需要一個自建的管線。 感謝幫助!

Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: latency = 0
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0: buffer-mode = slave (1)
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: timeout = 5000000
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: buffer-size = 0
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstUDPSrc:udpsrc0: timeout = 0
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:src: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstTypeFindElement:typefind.GstPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_2308308883_96: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0.GstGhostPad:recv_rtp_src_0_2308308883_96.GstProxyPad:proxypad6: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstRTSPSrc:rtspsrc0/GstRtpBin:rtpbin0.GstGhostPad:recv_rtp_src_0_2308308883_96.GstProxyPad:proxypad5: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:sink.GstProxyPad:proxypad0: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstRtpH264Depay:rtph264depay0.GstPad:src: caps = video/x-h264
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)420029, sprop-parameter-sets=(string)\"Z0IAKeNQKD9gLcBAQGkHiRFQ\\,aM48gA\\=\\=\", a-framerate=(string)30.0, a-transform=(string)\"1\\,0\\,0\\;0\\,1\\,0\\;0\\,0\\,1\", clock-base=(uint)1627931333, seqnum-base=(uint)55492, npt-start=(guint64)0, play-speed=(double)1, play-scale=(double)1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_h264:ffdec_h2640.GstPad:sink: caps = video/x-h264
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0/ffdec_h264:ffdec_h2640.GstPad:src: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstD3DVideoSink:autovideosink0-actual-sink-d3dvideo.GstPad:sink: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstDecodeBin:decodebin0.GstGhostPad:src0.GstProxyPad:proxypad7: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0.GstGhostPad:sink.GstProxyPad:proxypad1: caps = video/x-raw-yuv, width=(int)320, height=(int)240, framerate=(fraction)25/1, format=(fourcc)I420, interlaced=(boolean)false, pixel-aspect-ratio=(fraction)1/1
WARNING: from element /GstPipeline:pipeline0/GstAutoVideoSink:autovideosink0/GstD3DVideoSink:autovideosink0-actual-sink-d3dvideo: A lot of buffers are being dropped.
Additional debug info:

您可以找到decodebin創建的管道,然后手動創建。

從gstreamer SDK文檔- 基本教程11

GStreamer具有輸出圖形文件的功能。 這些是.dot文件,可通過GraphViz等免費程序讀取,它們描述了管道的拓撲以及每個鏈接中協商的上限。

要獲取.dot文件,只需將GST_DEBUG_DUMP_DOT_DIR環境變量設置為指向要放置文件的文件夾。 gst-launch會在每次狀態更改時創建一個.dot文件,因此您可以看到caps協商的演變。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM