gst-launch rtp с использованием udp - PullRequest
0 голосов
/ 19 января 2020

Я изучаю Gstreamer, и для начала я использую инструмент gst-launch для потоковой передачи видеофайла по сети с использованием элементов udpsink и udpsr c.

После ознакомления с документацией Gstreamer и читая другие комментарии stackoverflow, я получил команду, чтобы прочитать файл mp4 и отправить его в udpsink без видимых ошибок, и другую команду, использующую udpsr c для использования потоковых данных и отправки их в xvimagesink для визуализации, но windows, который должен открыться в результате того, что xvimagesink не открывается.

Может ли кто-нибудь помочь мне решить эту проблему, пожалуйста?

Я копирую здесь две команды gst-launch I Я использую, и журналы для производителя и потребителя.

gst-launch-1.0 -v filesrc location = ./x264_sample_file.mp4 ! qtdemux ! video/x-h264 ! rtph264pay ! udpsink host=127.0.0.1 port=9001


gst-launch-1.0 -v udpsrc uri=udp://127.0.0.1:9001 ! application/x-rtp,payload=96 ! rtph264depay  ! decodebin ! xvimagesink

Журналы производителя.

gst-launch-1.0 -v filesrc location = ./Videos/Dark\ Phoenix\ \(2019\)\ \[BluRay\]\ \[1080p\]\ \[YTS.LT\]/Dark.Phoenix.2019.1080p.BluRay.x264-\[YTS.LT\].mp4 ! qtdemux ! video/x-h264 ! rtph264pay ! udpsink host=127.0.0.1 port=9001
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1: caps = video/x-h264
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:src: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)high, codec_data=(buffer)01640029ffe1001867640029acd94078065b011000003e90000bb800f183196001000668e9384cf23c, width=(int)1920, height=(int)800, framerate=(fraction)24000/1001, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:src: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)640029, sprop-parameter-sets=(string)"Z2QAKazZQHgGWwEQAAA+kAALuADxgxlg\,aOk4TPI8", payload=(int)96, ssrc=(uint)606785685, timestamp-offset=(uint)3182951615, seqnum-offset=(uint)8918, a-framerate=(string)23.976023976023978
/GstPipeline:pipeline0/GstUDPSink:udpsink0.GstPad:sink: caps = application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, packetization-mode=(string)1, profile-level-id=(string)640029, sprop-parameter-sets=(string)"Z2QAKazZQHgGWwEQAAA+kAALuADxgxlg\,aOk4TPI8", payload=(int)96, ssrc=(uint)606785685, timestamp-offset=(uint)3182951615, seqnum-offset=(uint)8918, a-framerate=(string)23.976023976023978
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)high, codec_data=(buffer)01640029ffe1001867640029acd94078065b011000003e90000bb800f183196001000668e9384cf23c, width=(int)1920, height=(int)800, framerate=(fraction)24000/1001, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter1.GstPad:sink: caps = video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)4.1, profile=(string)high, codec_data=(buffer)01640029ffe1001867640029acd94078065b011000003e90000bb800f183196001000668e9384cf23c, width=(int)1920, height=(int)800, framerate=(fraction)24000/1001, pixel-aspect-ratio=(fraction)1/1
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: timestamp = 3182951615
/GstPipeline:pipeline0/GstRtpH264Pay:rtph264pay0: seqnum = 8918
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

Журналы потребителя.

gst-launch-1.0 -v udpsrc uri=udp://127.0.0.1:9001 ! application/x-rtp,payload=96 ! rtph264depay  ! decodebin ! xvimagesink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = application/x-rtp, payload=(int)96, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264
/GstPipeline:pipeline0/GstRtpH264Depay:rtph264depay0.GstPad:sink: caps = application/x-rtp, payload=(int)96, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264
...