gpt4 book ai didi

ubuntu - 在 Ubuntu 中使用 Gstreamer 通过 RTP 协议(protocol)流式传输 Mp4 视频

转载 作者:行者123 更新时间:2023-12-04 18:28:31 25 4
gpt4 key购买 nike

我正在尝试从我的本地目录获取视频文件,从服务器启用流并从我的客户端捕获这些帧。我使用了以下管道:

服务器端:

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 location = video.mp4 ! decodebin ! x264enc ! rtph264pay ! udpsink host=192.168.1.159 port=5000

将输出 CAPS 在接收方使用此上限:

caps="application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96, ssrc=3394826012, timestamp-offset=2215812541, seqnum-offset=46353"

接收者:

gst-launch-1.0 -v udpsrc port=5000 caps="application/x-rtp, media=video, clock-rate=90000, encoding-name=H264, payload=96, ssrc=3394826012, timestamp-offset=2215812541, seqnum-offset=46353" ! rtph264depay ! decodebin ! videoconvert ! autovideosink sync=false

因此您将能够流式传输并且视频将流畅且干净。在上面的管道中,如果您使用的是 gst-launch-0.10,则将 videoconvert 替换为 ffmpegcolorspace

关于ubuntu - 在 Ubuntu 中使用 Gstreamer 通过 RTP 协议(protocol)流式传输 Mp4 视频,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27545317/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com