有没有流从Android的视频到RTSP服务器的好方法? [英] Is there a good way to stream video FROM Android to an RTSP server?

查看:289
本文介绍了有没有流从Android的视频到RTSP服务器的好方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我寻觅四周,并没有真正发现任何东西。我想通过流发送从内置视频摄像头,以我的RTSP服务器。当寻找例子,我看到了,这可能是可能的MediaPlayer有它的setDataSource()方法只包括在服务器上的数据流的位置。我试图模仿与

I have searched around and haven't really found anything. I would like to send the video from the built in camera to my RTSP server via a stream. When looking for examples, I saw that it might be possible for MediaPlayer to have its setDataSource() method to just include the location of the stream on the server. I tried to emulate that with:

mediaRecorder = new MediaRecorder();
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.DEFAULT);
mediaRecorder.setOutputFile("rtsp://x.x.x.x/mystream2.mpg");
mediaRecorder.prepare();
mediaRecorder.start();

我试图用LIVE555来模拟情况下,一台服务器可能是任何理由搁置了起来。然而,问题可能是对事物的认识是如何在我的部分锁。任何有识之士来的东西我可以尝试将是非常美联社preciated。由于时间提前!

I am attempting to use LIVE555 to simulate a server in case that might be any reason for the hold up. However, the problem is probably a lock of understanding of how things work on my part. Any insight as to things I could try would be highly appreciated. Thanks ahead of time!

(此外,公司将被替换为数字的X,我只是不知道为什么加我使用将是非常有益的IP地址)

(Also, the x's are replaced with numbers, I just don't know why adding the IPs I'm using would be terribly helpful)

如果有什么事我可以补充的帮助,让我知道。再次感谢!

If there's anything I can add to help, let me know. Thanks again!

推荐答案

我们结束了只使用一个标准协议JPEG粉碎后的JPEG和装载这些,它更多或更少的模拟真实的时间。我们仍然可以使用一个更好的解决方案,但这个工作现在。如果有人希望看到一些code,发表评论。如果有人有一个更好的解决方案,发布了它,我会切换的答案了。

We ended up just using a standard protocol smashing JPEG after JPEG and loading those and it more-or-less simulates real time. We could still use a better solution, but this worked for now. If anybody wants to see some code, leave a comment. If anybody has a better solution, post it and I will switch the answer over.

这篇关于有没有流从Android的视频到RTSP服务器的好方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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