简体   繁体   中英

How to stream RTMP live video in Android

I have developed an application on Android for live streaming through RTSP and it's working fine. I am able to play the RTSP URL with the help of Daroon Player and Wondershare . The running code for RTSP is:

Uri stream = Uri.parse("rtsp://media-us-2.soundreach.net/slcn_lifestyle.sdp"); 
Intent videointent = new Intent(Intent.ACTION_VIEW,stream); 
startActivity(videointent);

Now I have to stream the live video through RTMP, but I am not able to invoke it with the above process. The requirement is to play the RTMP URL with the Wondershare only.

How would I play the RTMP URL on an Android device with the help of a third-party application, that is, wondershare?

Please take a look at Vitamio . It is a nice library for playing multimedia content.

您可以使用您的代码,但不是使用Daroon Player,而是使用MX Video Player

You can use Vitamio Library for android. Only drawback is that it has a license.

Here is a tutorial for it.

RTMP streams aren't supported by any player you can find on the play store. (This is because there isn't any implementation yet for the RTMP protocol. It was developed by Adobe for Flash Player.) The only way to play RTMP streams is by using a webview with Flash Player embedded in it and then using the RTMP link to the video in the HTML code. This is the only way, but sadly the user that is watching has to have Flash Player installed.

UPDATE: VLC player for Android can play RTMP streams. The information mentioned above is outdated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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