简体   繁体   English

使用Wowza Server在Android中进行实时视频广播

[英]Live Video Broadcasting in Android using Wowza Server

I have tried broadcasting videos in Android app through Wowza server and it works pretty well with this demo of javaCV. 我曾尝试通过Wowza服务器在Android应用程序中播放视频,并且在这个javaCV演示中效果很好。

But the only problem with this is that it uses flv file format to broadcast on Wowza server. 但唯一的问题是它使用flv文件格式在Wowza服务器上广播。 It uses FFmpegFrameRecorder to broadcast live video to wowza server (not VOD). 它使用FFmpegFrameRecorder将实时视频广播到wowza服务器(不是VOD)。 To set format of the video broadcasted at server, it uses following method: 要设置在服务器上广播的视频的格式,它使用以下方法:

recorder.setFormat("flv");

So the main problem with this method is that when I use other formats, it doesn't work. 因此,这种方法的主要问题是,当我使用其他格式时,它不起作用。 For Eg: 对于Eg:

recorder.setFormat("mpeg"); //or something like mov, etc

Please suggest a way to broadcast video from Android device to wowza server with any format other than flv. 请建议一种方法,使用除flv之外的任何格式将视频从Android设备广播到wowza服务器。 Please provide any links or tutorials with which I can start. 请提供我可以开始的任何链接或教程。

Thanks in advance. 提前致谢。

Edit: I am able to play only audio while streaming vlc video format in Android and iOS devices. 编辑:我在Android和iOS设备中播放vlc视频格式时只能播放音频。

Your issue is not container, but protocol. 您的问题不是容器,而是协议。 For live streaming, your best options are RTMP, RTP/RTSP. 对于直播,您最好的选择是RTMP,RTP / RTSP。 RTMP is essentially FLV with VCR style commands (play pause stop). RTMP本质上是带有VCR样式命令的FLV(播放暂停停止)。 There is no streaming protocol for MP4, except HTTP. 除了HTTP之外,MP4没有流媒体协议。 and this would require you to produce a new mp4 ever few seconds and reassemble server side. 这将需要你生成一个新的mp4几秒钟,并重新组装服务器端。

Im not sure you FLV/RTMP is off limits to you, because it probably is the best. 我不确定你FLV / RTMP对你有限制,因为它可能是最好的。 But next I would suggest RTSP, and maybe WebRTC. 但接下来我会建议RTSP,也许是WebRTC。

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

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