Results 1 to 4 of 4

Thread: HLS - Android problems - pause each chunk

  1. #1
    Join Date
    Jan 2015
    Posts
    2

    Question HLS - Android problems - pause each chunk

    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
    		<LiveStreamPacketizer>
    			<!-- Properties defined here will override any properties defined in conf/LiveStreamPacketizers.xml for any LiveStreamPacketizers loaded by this applications -->
    			<Properties>
    				<Property>
    					<Name>httpRandomizeMediaName</Name>
    					<Value>true</Value>
    					<Type>Boolean</Type>
    				</Property>
    				<Property>
    					<Name>cupertinoPacketizeAllStreamsAsTS</Name>
    					<Value>true</Value>
    					<Type>Boolean</Type>
    				</Property>
    				<Property>
    					<Name>cupertinoRepeaterChunkCount</Name>
    					<Value>12</Value>
    					<Type>Integer</Type>
    				</Property>
    				<Property>
    					<Name>cupertinoPlaylistChunkCount</Name>
    					<Value>6</Value>
    					<Type>Integer</Type>
    				</Property>
    				<Property>
    					<Name>cupertinoChunkDurationTarget</Name>
    					<Value>30000</Value>
    					<Type>Integer</Type>
    				</Property>
    				<Property>
    					<Name>cupertinoEnableDataEvents</Name>
    					<Value>false</Value>
    					<Type>Boolean</Type>
    				</Property>
    			</Properties>
    		</LiveStreamPacketizer>
    Test stream URL: http://202.59.43.94/test/test.stream/playlist.m3u8

    Has anyone had any luck getting HLS working on Android?

  2. #2

    Default

    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

  3. #3
    Join Date
    Jan 2015
    Posts
    2

    Default

    Hi Salvadore,

    My apologies for the late reply. I have changed LiveStreaming setup to be

    		<LiveStreamPacketizer>
    			<!-- Properties defined here will override any properties defined in conf/LiveStreamPacketizers.xml for any LiveStreamPacketizers loaded by this applications -->
    			<Properties>
    				<Property>
    					<Name>httpRandomizeMediaName</Name>
    					<Value>true</Value>
    					<Type>Boolean</Type>
    				</Property>
    				<Property>
    					<Name>cupertinoChunkDurationTarget</Name>
    					<Value>10000</Value>
    					<Type>Integer</Type>
    				</Property>
    				<Property>
    					<Name>cupertinoMaxChunkCount</Name>
    					<Value>10</Value>
    					<Type>Integer</Type>
    				</Property>
    				<Property>
    					<Name>cupertinoPlaylistChunkCount</Name>
    					<Value>3</Value>
    					<Type>Integer</Type>
    				</Property>
    				<Property>
    					<Name>cupertinoRepeaterChunkCount</Name>
    					<Value>3</Value>
    					<Type>Integer</Type>
    				</Property>
    			</Properties>
    		</LiveStreamPacketizer>
    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!

  4. #4

    Default

    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

Similar Threads

  1. Remove query parameters from HLS chunk URLs?
    By johnsterling in forum Live Streaming and Encoder Discussion
    Replies: 2
    Last Post: 11-23-2016, 09:53 AM
  2. what is default chunk size for HLS?
    By dirtystar in forum General Forum
    Replies: 3
    Last Post: 03-25-2014, 04:49 AM
  3. Logging HLS Chunk requests.
    By MartinJ in forum Video On Demand Streaming Discussion
    Replies: 8
    Last Post: 09-04-2013, 08:05 PM
  4. hls skipping redownloads chunk
    By arpan_synapse in forum Performance Tuning Discussion
    Replies: 1
    Last Post: 08-06-2013, 03:41 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
  •