简体   繁体   English

如何将视频从RTP流捕获到android应用中?

[英]How to capture video from RTP stream into android app?

I am trying to capture video from an RTP stream into my Android application. 我正在尝试将视频从RTP流捕获到我的Android应用程序中。 I am using code from a project on github https://github.com/niqdev/ipcam-view . 我正在使用github https://github.com/niqdev/ipcam-view上的项目中的代码。 However, after I open up VLC on my computer and start streaming a video and connect my android device to the same network it does not display the video on my device. 但是,在计算机上打开VLC并开始流式传输视频并将我的android设备连接到同一网络后,它不会在设备上显示视频。 I don't know what I am doing wrong, any help would be greatly appreciated. 我不知道自己在做什么错,任何帮助将不胜感激。 Thanks. 谢谢。

This is the error message that I am getting after I run the application 这是我运行应用程序后收到的错误消息

if you need to play short videos you need to use the demo of VXG player for android. 如果您需要播放短视频,则需要使用VXG播放器Android演示。 It is super easy to use but has a 2 min limitation. 它非常易于使用,但有2分钟的限制。
It looks like the example you are working with works just with mjpeg not with rtp streams. 看起来您正在使用的示例仅适用于mjpeg,不适用于rtp流。

If limitations is not for you try this example: VLCSimple 如果没有限制,请尝试以下示例: VLCSimple

It has the newest version of vlc-sdk and maybe they already fixed RTP deadlock bug. 它具有vlc-sdk的最新版本,也许他们已经修复了RTP死锁错误。

Or just try to make the mjpeg stream using VLC: 或者只是尝试使用VLC制作mjpeg流:
DISPLAY=:0 cvlc -vvv --no-audio screen:// --screen-fps 1 --sout "#transcode{vcodec=MJPG,vb=800}:standard{access=http,mux=mpjpeg,dst=:18223/}" --sout-http-mime="multipart/x-mixed-replace;boundary=--7b3cc56e5f51db803f790dad720ed50a"

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM