簡體   English   中英

在Ubuntu中使用Gstreamer通過RTP協議流式傳輸Mp4視頻

[英]Streaming Mp4 video through RTP protocol using Gstreamer in Ubuntu

我試圖從本地目錄中獲取視頻文件,從服務器啟用流並從客戶端捕獲這些幀。我使用了以下管道:

服務器端:

gst-launch -v  filesrc location=/home/gokul/Videos/Econ_TestVideo/radioactive.mp4 ! qtdemux ! rtpmp4vpay ! udpsink host=192.168.7.61 port=5000 sync=true


Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstRtpMP4VPay:rtpmp4vpay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d8800f528045a1443000001b24c61766335332e33352e30, payload=(int)96, ssrc=(uint)3003638799, clock-base=(uint)1542273545, seqnum-base=(uint)49176
/GstPipeline:pipeline0/GstRtpMP4VPay:rtpmp4vpay0.GstPad:sink: caps = video/mpeg, mpegversion=(int)4, systemstream=(boolean)false, profile=(string)simple, level=(string)1, codec_data=(buffer)000001b001000001b58913000001000000012000c48d8800f528045a1443000001b24c61766335332e33352e30, width=(int)1280, height=(int)720, framerate=(fraction)91/3, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstRtpMP4VPay:rtpmp4vpay0: timestamp = 1542273545
/GstPipeline:pipeline0/GstRtpMP4VPay:rtpmp4vpay0: seqnum = 49176
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d8800f528045a1443000001b24c61766335332e33352e30, payload=(int)96, ssrc=(uint)3003638799, clock-base=(uint)1542273545, seqnum-base=(uint)49176
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

客戶端:

gst-launch -v udpsrc port=5000 caps="application/x-rtp" ! rtpmp4vdepay ! mpeg4videoparse ! queue ! ffdec_mpeg4 ! ffmpegcolorspace !  xvimagesink


Setting pipeline to PAUSED ...
/GstPipeline:pipeline0/GstUDPSrc:udpsrc0.GstPad:src: caps = application/x-rtp, media=(string)video, payload=(int)96, clock-rate=(int)1, encoding-name=(string)MP4V-ES
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

設置完這些后,我看不到任何顯示(甚至沒有啟動應用程序屏幕)

要添加到上述信息中,我正在Ubuntu-12.04的命令行中運行這些命令

以下是接收器的管道

發件人:

gst-launch-1.0 -v filesrc位置= video.mp4! 解碼器! x264enc! rtph264pay! udpsink主機= 192.168.1.159端口= 5000

將使用接收器端的此上限輸出CAPS:

caps =“ application / x-rtp,media = video,時鍾速率= 90000,編碼名稱= H264,有效負載= 96,ssrc = 3394826012,timestamp-offset = 2215812541,seqnum-offset = 46353”

接收器:

gst-launch-1.0 -v udpsrc port = 5000 caps =“ application / x-rtp,media = video,時鍾速率= 90000,編碼名稱= H264,有效負載= 96,ssrc = 3394826012,timestamp-offset = 2215812541, seqnum-offset = 46353“! rtph264depay! 解碼器! 視頻轉換! autovideosink sync = false

因此,您將能夠流式傳輸並且視頻將變得流暢,干凈。 在上面的管道中,如果您使用的是gst-launch-0.10,則將ffmpegcolorspace替換為videoconvert

最后我將能夠在啟動屏幕上看到一些視頻。我使用了以下管道。但是視頻不清楚。

服務器:

gst-launch-0.10 -v filesrc location = / home / gokul / video.mp4! qtdemux name = d! 排隊! rtpmp4vpay! udpsink端口= 5000

客戶:

gst-launch-0.10 udpsrc port = 5000 caps =“ application / x-rtp,media =(string)video,Clock-rate =(int)90000,encoding-name =(string)MP4V-ES,profile-level-id =(字符串)243,配置=(字符串)000001b0f3000001b50ee040c0cf0000010000000120008440fa282fa0f0a21f,有效負載=(int)96,ssrc =(uint)4291479415,clock-base =(uint)4002140493,seqnum-base =(uint)57180“! rtpmp4vdepay! ffdec_mpeg4! xvimagesink sync = false

因此,有人可以建議我如何通過修改一些管道參數來增強客戶端的視頻圖像。

暫無
暫無

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

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