我已经看到了很多关于如何将视频从服务器流到android设备的信息,但关于另一种方式(ala Qik)的信息却不多。谁能给我指点一下方向,或者给我一些建议?


当前回答

Took me some time, but I finally manage do make an app that does just that. Check out the google code page if you're interested: http://code.google.com/p/spydroid-ipcamera/ I added loads of comments in my code (mainly, look at CameraStreamer.java), so it should be pretty self-explanatory. The hard part was actually to understand the RFC 3984 and implement a proper algorithm for the packetization process. (This algorithm actually turns the mpeg4/h.264 stream produced by the MediaRecorder into a nice rtp stream, according to the rfc)

Bye

其他回答

我构建了一个名为Kickflip的开源SDK,让Android上的流媒体视频成为一种无痛的体验。

SDK演示了如何使用Android 4.3的MediaCodec API将设备硬件编码器的数据包直接定向到FFmpeg,用于H.264 / AAC的RTMP(使用librtmp)或HLS流。它还演示了实时OpenGL效果(标题,色度键,淡出)和背景记录。

非常感谢,尤其是fadden。

我可以将实时摄像机视频从手机发送到我的服务器。使用此链接 参见链接 参考上面的链接。该链接中有一个示例应用程序。你只需要在RecordActivity.class中设置你的服务url。

美国操作: ffmpeg_link =“rtmp / yourserveripaddress: 1935年- live /文卡特”;

我们可以使用该链接发送H263和H264类型的视频。

根据你的预算,你可以使用可以将图像发送到服务器的树莓派相机。我在这里添加了两个教程,你可以找到更多的细节:

本教程将向您展示如何在Android设备上使用树莓派相机和显示图像

这是第二个教程,在这里你可以找到一系列关于摄像头和android设备之间实时视频流的教程

Took me some time, but I finally manage do make an app that does just that. Check out the google code page if you're interested: http://code.google.com/p/spydroid-ipcamera/ I added loads of comments in my code (mainly, look at CameraStreamer.java), so it should be pretty self-explanatory. The hard part was actually to understand the RFC 3984 and implement a proper algorithm for the packetization process. (This algorithm actually turns the mpeg4/h.264 stream produced by the MediaRecorder into a nice rtp stream, according to the rfc)

Bye

Mux(我的公司)有一个开源的android应用程序,可以将RTMP传输到服务器,包括设置摄像头和用户交互。它被构建为流到Mux的实时流API,但可以轻松地流到任何RTMP入口点。