简体   繁体   English

在Android VideoView中播放没有RTSP的RTP流

[英]Play RTP stream withouth RTSP in Android VideoView

I'd like to play a RTP stream in an Android VideoView. 我想在Android VideoView中播放RTP流。 I create the stream with gstreamer on a linux machine and fire the rtp stream to a udp sink. 我在linux机器上使用gstreamer创建流并将rtp流激发到udp接收器。

Is it possible to consume this stream in an Android VideoView without having a RTSP server? 是否可以在没有RTSP服务器的情况下在Android VideoView中使用此流?

I tried to set the video URI to "rtp://:@" but then I got an error "Video could not be played". 我试图将视频URI设置为“rtp://:@”但后来我收到错误“视频无法播放”。 I also thought about creating an SDP file and using that on the Android device. 我还想过创建一个SDP文件并在Android设备上使用它。 But I'm not sure if this works and how to create such a file. 但我不确定这是否有效以及如何创建这样的文件。

Thanks 谢谢

http://developer.android.com/guide/appendix/media-formats.html http://developer.android.com/guide/appendix/media-formats.html

Above link is first stop for what is support or no. 以上链接是支持或不支持的第一站。

As it says rtp only in conjunction with sdp as per rtsp spec. 因为根据rtsp规范,rtp只与sdp一起使用。

No can't do naked rtp stream in base android. 没有不能在基础android中做裸rtp流。

Try porting some lib like live555 if you must have naked rtp. 如果你必须有裸rtp,尝试移植像live555这样的lib。

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

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