简体   繁体   English

Android流音频/视频无法流式传输rtsp文件?

[英]Android streaming audio/video can't stream a rtsp file?

I want to stream a media file on web, and android developer website has said that MediaPlayer.setDataSource() can set the data source (file-path or http/rtsp URL) to use. 我想在网上流媒体文件,而Android开发者网站已经说过MediaPlayer.setDataSource()可以设置要使用的数据源(文件路径或http / rtsp URL)。 But I got an error in both G1 device and emulator when streaming a rtsp url file: Command PLAYER_PREPARE completed with an error or info PVMFailure error (1, -1) . 但是当流式传输rtsp url文件时,我在G1设备和模拟器中都出现错误:命令PLAYER_PREPARE已完成,但出现错误或信息PVMFailure错误(1, -1)

Does anyone know what is this error, or anyone knows where can I get the error description (1, -1) means? 有谁知道这个错误是什么,或者有谁知道我在哪里可以得到错误描述(1, -1)意思?

PS the code can work successfully when playing a audio/video file or streaming a http protocal sudio/video file, but can't stream rtsp protocal file. PS代码可以在播放音频/视频文件或流式传输http protocal sudio / video文件时成功运行,但无法流式传输rtsp协议文件。 Is android not supported rtsp streaming? android不支持rtsp流媒体吗?

Thanks very much. 非常感谢。

I don't think the emulator supports video at all, or didn't last time I checked (SDK 1.0 and 1.1) which failed with the exact same error. 我认为模拟器根本不支持视频,或者上次我没有检查过(SDK 1.0和1.1),但是出现了完全相同的错误。 I'm not sure about 1.5 but from your report it sounds like it still doesn't. 我不确定1.5但是从你的报告中听起来它仍然没有。

Of course, I could be wrong, but when making beebPlayer, I found it was just easier to deploy straight to the device! 当然,我可能是错的,但在制作beebPlayer时,我发现直接部署到设备上更容易!

Is android not supported rtsp streaming?

No, Android supports RTSP streaming. 不,Android支持RTSP流媒体。 I have setup Darwin Streaming Server (the open sourced RTP/RTSP streaming server), and successfully played a video (on my ADP2 phone with donut image) using RTSP Url. 我已经设置了Darwin Streaming Server (开源RTP / RTSP流媒体服务器),并使用RTSP Url成功播放了一个视频(在带有甜甜圈图像的ADP2手机上)。 Url which I used is of the form: 我使用的网址是以下形式:

rtsp://server_ip:554/file_name

There have been already provided some sample files while server set up which you can try to play. 在设置服务器时已经提供了一些示例文件,您可以尝试播放这些文件。 If you want to play your file, then you have to hint them first. 如果你想播放你的文件,那么你必须先提示它们。

I am also facing same problem. 我也面临同样的问题。 In one of the blog they say that it supports RTSP stream which satisfies the set of rules. 在其中一个博客中,他们说它支持满足规则集的RTSP流。 I don't know which RTSP url supports all those rules. 我不知道哪个RTSP网址支持所有这些规则。 So what I have done is I have written my own RTSP client to get the streams and I have passed it to Player. 所以我所做的是我已经编写了自己的RTSP客户端来获取流,我已经将它传递给了Player。

Today I got some new information, it seems that android OPENCore has some bugs in streaming, and newer version 2.04 has fixed these problems, but I can't find what version now my code is. 今天我得到了一些新的信息,似乎android OPENCore在流媒体上有一些错误,而较新的版本2.04已经解决了这些问题,但我现在无法找到我的代码版本。 someone said ChangeLog has version information (/external/opencore/ChangeLog) , but I can't find where this ChangeLog file is. 有人说ChangeLog有版本信息(/ external / opencore / ChangeLog),但我找不到这个ChangeLog文件的位置。 Does anyone know where this file is and how could I update OPENCore version? 有谁知道这个文件在哪里,我怎么能更新OPENCore版本? Thanks 谢谢

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

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