Kickflip / kickflip-android-sdk

Kickflip Android SDK - Live Video Streaming to the Cloud
https://kickflip.io
Apache License 2.0
658 stars 212 forks source link

How to reduce number of items in index.m3u8 #28

Closed gouravd closed 9 years ago

gouravd commented 9 years ago

I am not able to figure out how to reduce the number of items in index.m3u8 to 3. Currently 5 items are listed and it adds to the lag,

I cannot find the code which creates, updates the index.m3u8. Also, is there a way for the player to start playing from the last .ts file in the m3u8?

OnlyInAmerica commented 9 years ago

When FFmpeg updates the index.m3u8 Kickflip catches the filesystem write and processes the updated manifest in Broadcaster#onManifestUpdated(...). Note the last two lines (three if it's the final segment) of the just-updated index.m3u8 represent the last chunk. You should be able to modify that logic to your liking. If you can do this cleanly via a new API in Broadcaster we'd be happy to merge your work into the SDK!

I don't believe the HLS spec allows specifying a non-first segment for playback to begin with so you're probably limited to manually changing how the index.m3u8 is generated.

gouravd commented 9 years ago

Thanks, I will look into in in more detail