Skip to content

HTTP Live Streaming (HLS) in VOD mode reports EOF upon a backward seek to a segment that hasn't been fetched

VLC 2.1.0-git-20120226-2308 Rincewind running on WinXP fails to seek backwards when viewing a VLC-created HLS stream in VOD mode if the segment we're seeking to hasn't been seen yet. Using my test file at http://cs448.user.srcf.net/bq/mystream.m3u8 I can reproduce the problem by:

  1. Start playing the file.
  2. Once it has started, seek forwards near the end.
  3. Once the seek completes, seek backwards into a segment that won't have been fetched (e.g. around the middle of the file).

Result: file stops playing immediately. I imagine the segment is assumed to be present because this transport is usually employed for live streams, but in VOD mode it ought to be arbitrarily seekable. I attach a log in which I start playing my test file, seek to segment 20, then seek to segment 10.

An unrelated matter but too minor to raise its own ticket: isn't the buffering a bit long? In my test runs it was fetching 30 seconds of audio before starting to play! VLC's HTTP progressive download only fetches a fraction of that! I appreciate there's a higher risk here because we might need to check the m3u8 file again and fetch a new file to refill the buffer, which since VLC doesn't reuse HTTP connections means up to 4 RTTs, but 10 seconds ought to be enough to absorb that!

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information