小编Nic*_*gus的帖子

GStreamer rtp流到vlc

我在弄清楚如何使用gstreamer创建一个简单的rtp流并在vlc上显示它时遇到了一些麻烦.

我安装了GStreamer 0.10.30和VLC 1.1.3.我唯一的要求是使用MPEG4或H.264编解码器.

现在,我可以通过这个简单的管道流式传输GStreamer videotestsrc:

gst-launch videotestsrc ! ffenc_mpeg4 ! rtpmp4vpay ! udpsink host=127.0.0.1 port=5000
Run Code Online (Sandbox Code Playgroud)

它输出客户端接收流所需的"上限":

/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)000001b001000001b58913000001000000012000c48d8800f50a041e1463000001b24c61766335322e3132332e30, payload=(int)96, ssrc=(uint)365697461, clock-base=(uint)390754204, seqnum-base=(uint)10399
Run Code Online (Sandbox Code Playgroud)

我还可以使用以下管道显示流:

gst-launch udpsrc uri=udp://127.0.0.1:5000 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)MP4V-ES, profile-level-id=(string)1, config=(string)000001b001000001b58913000001000000012000c48d88007d0a041e1463000001b24c61766335322e3132332e30, payload=(int)96, ssrc=(uint)298758266, clock-base=(uint)3097828288, seqnum-base=(uint)63478" ! rtpmp4vdepay ! ffdec_mpeg4 ! autovideosink
Run Code Online (Sandbox Code Playgroud)

但是当我尝试用vlc接收流时:

vlc -vvv rtp://127.0.0.1:5000
Run Code Online (Sandbox Code Playgroud)

我一无所获......

streaming vlc gstreamer

28
推荐指数
2
解决办法
7万
查看次数

标签 统计

gstreamer ×1

streaming ×1

vlc ×1