Results 1 to 4 of 4

Thread: How to play stream RMTP on android

  1. #1
    Join Date
    Nov 2012
    Posts
    9

    Default How to play stream RMTP on android

    I play well on PC Desktop with jwplayer + rmtp of wowza, but It's not run on Android ( I test on GalaxyNote 2, android 4), and may be not run on IOS
    (My stream from VLC -> Wowza, over udp port 10000)

    My player script:

    <script type="text/javascript" src="jwplayer.js" ></script>

    <div id="myElement"></div>

    <script type="text/javascript">
    jwplayer("myElement").setup({
    file: "rtmp://<My Domain>/live/_definst_/mpegts.stream",
    image: "/assets/myVideo.jpg",
    width: 640,
    height: 480

    });
    </script>

    Error picture:



    How to play on android, IOS???
    Thanks!
    Last edited by dungbkhn; 11-28-2012 at 04:47 AM.

  2. #2
    Join Date
    Jul 2009
    Posts
    135

    Default

    Android and iOS don't have Flash, so they won't play RTMP URLs. You will need to use RTSP for Android, and HTTP for iOS -- fortunately Wowza can easily send both of these:
    http://www.wowza.com/forums/content.php?37

    For RTMP/iOS, you can use the same JW Player embedding method with a few tweaks -- see the last "HTML5 Fallback" example here:
    http://www.wowza.com/forums/content.php?48

    For Android, you won't be able to embed the RTSP stream -- you will have to just use a hyperlink to the RTSP URL, or redirect users to it somehow.

  3. #3
    Join Date
    Nov 2012
    Posts
    9

    Default

    Thank you!
    So, how to put livestream rtsp or other to web of android ?
    Android only accept rtsp client like VLC? I ve just tested vlc on android and it work well.
    But i need live stream on web!
    Last edited by dungbkhn; 11-28-2012 at 10:12 AM.

  4. #4
    Join Date
    Jul 2009
    Posts
    135

    Default

    I assume you mean you want it embedded on a web page?

    Unfortunately you can't embed mobile RTSP. However, you should be able to link to it, and Android will play it:
    <a href="rtsp://[wowza-ip-address]:1935/live/mpegts.stream">Android live stream</a>
    Or your web page could detect the user's OS as Android and re-direct them. Something like this in PHP:
    if ( strpos($_SERVER['HTTP_USER_AGENT'],'Android') || strpos($_SERVER['HTTP_USER_AGENT'],'webOS') || strpos($_SERVER['HTTP_USER_AGENT'],'BlackBerry') ) {
      header('Location: rtsp://[wowza-ip-address]:1935/live/mpegts.stream');
      die();
      exit();
    }
    Although some Android devices support RTMP/HLS, so it's probably best to let the user decide.

Similar Threads

  1. Android can't play RTSP stream
    By rrperez in forum Live Streaming and Encoder Discussion
    Replies: 4
    Last Post: 06-14-2012, 02:12 PM
  2. rtsp stream play on android
    By erbora00 in forum General Forum
    Replies: 1
    Last Post: 02-24-2012, 05:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •