使用Gstreamer服务RTSP流,寻求工作示例 [英] Using Gstreamer to serve RTSP stream, working example sought

查看:95
本文介绍了使用Gstreamer服务RTSP流,寻求工作示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在尝试让Gstreamer在DM368 Leopardboard *上工作,我们已经成功地说服了它创建测试视频(videotestsrc),对其进行编码并将其转储到文件中.

We are trying to get Gstreamer working on a DM368 Leopardboard*, we've successfully persuaded it to create a test video (videotestsrc), encode it, and dump it into a file.

起作用的管道是:

gst-launch -v videotestsrc num-buffers=100 ! queue ! ffenc_mpeg4 bitrate=800000 ! ffmux_mp4 ! filesink location=video_test.mp4

下一步是修改管道以通过网络流式传输测试卡,以便使用 rtsp://ip_addr:port/streamname 之类的东西在具有VLC的PC上进行查看,但有关文档如何做到这一点在地面上似乎还很薄(并且经常过时),并且这些示例似乎模糊了源代码和命令行方式.

The next step is to modify the pipe to stream the testcard over the network, to be viewed on a PC with VLC using something like rtsp://ip_addr:port/streamname but the documentation on how to do this seems quite thin on the ground (and often outdated), and the examples seem to blur source code and command line ways of doing it.

我会自由地承认,问题的50%以上是我们对Gstreamer& amp;的不熟悉.它的各个部分,我总是发现,如果我有一个可行的例子作为开始,我可以用木棍戳它,然后从那里算出其余的东西.

I'll freely admit that >50% of the problem is our lack of familiarity with Gstreamer & its various parts, I've always found that if I have a working example to start from I can poke it with sticks and work out the rest from there.

我已经走了这么远:

gst-launch -v videotestsrc ! queue ! ffenc_mpeg4 bitrate=800000 ! rtpmp4vpay ! tcpserversink host=<PC_ip> port=5000

这似乎使VLC中发生了某事(使用 tcp://board_ip:port )-似乎认为正在发生某些事情(没有抛出错误),但不会播放/显示任何内容.当我中断(^ C)gst进程时,VLC会注意到.

Which seems to make something happen in VLC (using tcp://board_ip:port)- it seems to think there's something going on (doesn't throw an error) but doesn't play/show anything. When I break (^C) the gst process, VLC notices.

所以,基本上-任何指导/反馈都很好,只有一个班轮工作会很棒.

So, basically - any guidance/feedback would be great, a working one-liner would be fantastic.

编辑后添加:是的,我看到了test_video.c示例,但这是在编译一个特殊程序来做一些看起来应该可以从命令行调用以证明这一概念的事情.

Edited to add: Yes I see the test_video.c example, but that's compiling a special program to do something which looks like it should be possible to just invoke from the command line to prove the concept.

* = Linux version 2.6.32-17-ridgerun /CPU: ARM926EJ-S

推荐答案

最后在这里找到了一个可行的示例:

Finally found a working example here:

GStreamer rtp流到vlc

但这确实需要为VLC创建一个.SDP文件并指定IP地址,但这并不是我们最终想要的方式...但是嘿,这是一个开始!

But it does require creating an .SDP file for VLC and specifying IP addresses which is not really how we want to end up... but hey it's a start!

这篇关于使用Gstreamer服务RTSP流,寻求工作示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆