Skip to main content
Participant
November 11, 2011
Question

HTTP Live Streaming (HLS) to iOS device hangs and is very choppy. Please help.

  • November 11, 2011
  • 1 reply
  • 1825 views

Hi There,

I have installed the Flash Media Server on a server behind my router which has a single public IP address.  So, I realize that by default the Apache Server that ships with FMS 4.5 is configured to listen onto port 8134.  So on my router, I have configured port forwarding like so:

my.public.ip.addr:8134 -> 10.0.1.11:8134

The machine that is hosting FMS with Apache 2.2 is operating with Windows 7.  So, I go into the Windows Firewall interface, and Allow Inbound and Outbound traffic for port 8134.

Here is my subscribing URL to get the file to stream to iOS. 

http://hostmachine.addr.com:8134/hls-vod/my_vod_test.mp4.m3u8

This works, but extremely poorly, and I don't know why.  The symptoms are that there is an extreme amount of lag for the video to begin playing.  Then when I scrub with the video player on the iOS device, the lag is unbearable.  The documentation for Adobe FMS states that it is okay to simply use 8134 in the request url, but it also states there can be lag.  I'm not sure how to solve this problem, but I am certain that there is something wrong wtih my configuration.

I should note that I am not doing this has a multi-bitrate stream.  That is, there is no manifest file.  So, it's single bitrate.  However, I have encoded my test file at both 256KBps and 500Kbps, and there was lag on both streams. Also, my broadband connection upload speed is clock at 725Kbps with my Internet Service Provider.  I'm not sure if that should have any bearing on the matter since the video is sent down via http chunks.

Is there anything I can do to decrese the lag time for playback and seeking within the video?

Can anybody give some pointers?        

This topic has been closed for replies.

1 reply

Adobe Employee
November 14, 2011

Hi ariestav,

This is known to have some initial lag in the http streaming. HTTP streaming unlike RTMP requires a playlist to be generated first. Since we don't store any playlist on to the disk, this is generated just-in-time as you request. Also, HTTP unlike RTMP requires generated a particular size chunk and downloading. But most solutions around HTTP don't bother from this, because they are supposed to be run behind a HTTP caching system. So lag and all is just for the first user. You can't imagine 1000 HTTP subscribers all hitting the origin server.

Though I might give you some hints to reduce the lags. For this you try reducing the HTTP chuck size. This is by default configured at 8 seconds. You may try setting it around 4 seconds. You can edit HLSMediaFileDuration in httpd.conf under hls-vod tag to 4000.

For better seeking purpose, please try keeping the keyframe interval in your file a factor of HLSMediaFileDuration. Hope this helps http://knowfms.wordpress.com/2011/09/22/best-practices-for-setting-ios-media-file-duration/

Though I said above some initial lag is known, but that doesn't mean it should be too much to be unbearable. If you feel this is too huge, please consider sending me your test file. I will test it out for any possible bugs. You can send me at ping4randomstuff@gmail.com

Good news is that we are working on improving the performance as max possible.

For other issues like artifacts/ choppy playback, also please provide the details about

1. file encoding settings

2. Device and ios-version on which you tested.