Play hls / rtmp on android

I have a wowza server where I stream livestreams that are played with jwplayer. However, everything works fine with Android and other systems. (works with both rtmp and hls in android 4.4 and jwplayer (!)). Streams are sent to my wowza server with avconv running on linux machine, this works great.

But when I try to send my streams directly from linux computer using avconv (samme command like above but different destination) to local server, it doesn't work on android with all browser based users I tried including jwplayer. Streams work on other systems but with jwplayer like linux, chromebook. The error I get from jwplayer in Android is "No playback sources available"

I tried with crtmp rtmp and also nginx rtp module for rtmp and hls. Always with the same result, android fails. Why do these threads fail when running on android when using wowza?

My current setup is nginx with rtmp module, here is nginx.conf:

worker_processes  1;

#error_log  logs/error.log;
#error_log  logs/error.log  notice;
#error_log  logs/error.log  info;



events {
    worker_connections  1024;
}


http {

    server {

        listen      8080;


 location / {
            add_header Access-Control-Allow-Origin *;
            root   html;
            index  index.html index.htm;
        }


        location /hls {
            # Serve HLS fragments
            types {
            add_header Access-Control-Allow-Origin *;

                application/vnd.apple.mpegurl m3u8;
                video/mp2t ts;
            }
            root /tmp;
            add_header Cache-Control no-cache;
            add_header Access-Control-Allow-Origin *;

        }

        location /dash {
            # Serve DASH fragments
            root /tmp;
            add_header Cache-Control no-cache;
        }
    }
}


rtmp {

    server {

        listen 1935;
        chunk_size 4000;

        application hls {
            live on;
            hls on;
            hls_path /tmp/hls;
        }

        # MPEG-DASH is similar to HLS

        application dash {
            live on;
            dash on;
            dash_path /tmp/dash;
        }
    }
}

      

Here is the avconv command:

avconv -g 40 -threads 4  -f video4linux2  -video_size $SIZE   -r 15 -i /dev/video0  -itsoffset -3.35 -i audio0.fifo -re -vcodec libx264 -r 15  -preset veryfast -tune zerolatency  -aq 0  -q 3 -vbr 3 -maxrate 3M   -threads 4 -f flv rtmp://192.168.0.6/hls/mycam

      

When using the command above via wowza instead of localhost (! 92.168.0.6) it works on android with jwplayer.

So it won't be possible to just set up Android via a local server only when using wowza ... weird, any ideas? My Android tablet is running Android 4.4, but I've tried several other versions of Android as well. I'm certainly willing to use other players for troubleshooting, but for the end result it must be some kind of browser.

+3


source to share


1 answer


You can also use your MPEG-DASH output from Wowza and play it in HTML5 on Android with BMD bitdash HTML5 HTML file player: http://www.dash-player.com



0


source







All Articles