3
votes

I have a wowza server where I broadcast livestreams that are played with jwplayer. Everything works perfectly fine with android and other systems though. (works with both rtmp and hls in android 4.4 and jwplayer (!)). The streams are sent to my wowza server with avconv running on a linux pc, this works fine.

But when I try to send my streams directly from the linux pc with avconv (samme command as in the case above but different destination) to a local server it fails on android with all browser-based-players I have tried, including jwplayer. The streams works on other systems though with jwplayer, e.g linux, chromebook. The error I get from jwplayer in Android are 'No playable sources found'

I have tried with crtmp rtmp, and also nginx rtp module for rtmp and hls. Always with the same result, android fails. How come theese streams fails when it works on android when using wowza ?

My current setup are nginx with rtmp module , here are the 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 are 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 through wowza instead of localhost (!92.168.0.6) it works on android with jwplayer.

So no success for just android through the local server, only when using wowza...odd, any ideas ? My android is a tablet running android 4.4, but I have tried a few other android versions aswell. I am offcourse willing to use other players for troubleshooting, but for the end result it has to be some browser-based player.

1
Did you tried it with mx-player for debuggin purposes? And how does your avconv command look like?user1767754
Just added the avplayer command to my original question, thanks for pointing this out. Will look into mx-player tomorrow and update, thanks for the tip!ziggestardust
What does your JW Player Setup code look like?emaxsaun
Post the console log of the avconv command. The way it is right now would result in at least one error as you add -re to an output when it needs an input (should be placed before a -i)aergistal

1 Answers

0
votes

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