Hi all,
I’m currently working on implementing live streaming via HLS for Android devices. Our mobile application uses ffmpeg behind the scenes for HLS playback to keep the experience consistent (since HLS rollout seem to be quite spotty on android).
Anyway, I’m using nexus 4 as a testing device and I have tried both ffmpeg and native for streaming and both seem to have having same problem;
- After each chunk is played out there is a short pause while the phone gets another chunk.
I’m not sure why that is. I have tried many different settings and no luck so far. The way stream is setup is encoder (HE-AAC - 32bit) -> ice cast -> Wowza. All other parts of the chain are tested and are working 100%.
My current setup
[HTML]
httpRandomizeMediaName
true
Boolean
cupertinoPacketizeAllStreamsAsTS
true
Boolean
cupertinoRepeaterChunkCount
12
Integer
cupertinoPlaylistChunkCount
6
Integer
cupertinoChunkDurationTarget
30000
Integer
cupertinoEnableDataEvents
false
Boolean
[/HTML]
Test stream URL: http://202.59.43.94/test/test.stream/playlist.m3u8
Has anyone had any luck getting HLS working on Android?
Hello there and welcome to the Wowza support forum.
I was able to get your stream to play without any issues. My device is running Android 4.3. It played fine with just the HTTP link in the chrome browser, as well as embedded in a .html page:
<html>
<head>
<title>HTML 5 Test</title>
</head>
<body>
<video width="100%" height="100%" controls="controls" src=" http://202.59.43.94/test/test.stream/playlist.m3u8">
</video>
</body>
</html>
I did not notice any pausing of any kind but you might want to take a look at this guide and consider adjusting some of your settings:
How to configure Apple HLS packetization (cupertinostreaming)
Please let us know if adjusting these settings has a positive, or negative result on the playback of your stream.
Kind regards,
Salvadore
This guide may solve the problem. Please try adding this property to your Application:
How to configure Wowza server software to stream audio-only Apple HLS using transport stream
Kind regards,
Salvadore
Hi Salvadore,
My apologies for the late reply. I have changed LiveStreaming setup to be
[HTML]
httpRandomizeMediaName
true
Boolean
cupertinoChunkDurationTarget
10000
Integer
cupertinoMaxChunkCount
10
Integer
cupertinoPlaylistChunkCount
3
Integer
cupertinoRepeaterChunkCount
3
Integer
[/HTML]
However, this doesn’t fix the problem. We are seeing that if mobile device is using wifi problem isn’t as apparent. However, on 4G or 3G networks there is a pause every chunk. Changing chunk duration just changes how often the problem occurs.
Stream is 32kbps therefore there should not be any problem with speed of the mobile network. Alternatively we have tried using streaming on the mobile phone directly from IceCast and it is smooth without any buffering or pauses.
I have heard of people having similar problems when using ffmpeg library, however for us this issue happens when using both native HLS on Android as well as ffmpeg library in Android application.
Any ideas on how would we go about debugging this? I’ll try to setup wireshark to collect some traffic to see what is happening in terms of traffic.
Thanks!