Answers.Body: <p>I found that using the &quot;HLS protocol&quot; instead of the &quot;HLS demuxer&quot; worked better for seeking.</p>
  <p>To use the &quot;HLS protocol&quot; prefix the HLS playlist url with <code>hls+https://</code> instead of just <code>https://</code> (which uses the HLS demuxer apparently), and doing that got the seek working for me. It was clearly not downloading the entire file as I noticed it made a fraction of the http requests that it was making before (with <code>-loglevel verbose</code> set)</p>
  <p>Do note, if you use the hls protocol, ffmpeg reports this:</p>
  <blockquote>
  <p>Using the hls protocol is discouraged, please try using the hls demuxer instead. The hls demuxer should be more complete and work as well as the protocol implementation. (If not, please report it.)</p>
  </blockquote>
  <p>So maybe I should report the seeking issue to them if they're not already aware </p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-06-15T19:46:08.903Z
Answers.LastActivityDate: 2021-06-15T19:46:08.903Z
Answers.UserDisplayName: jcaruso
Body: <p>I'm trying to create an mp4 clip from an HLS input stream that is over 36 hours long.  My ffmpeg command looks more or less like this:</p>
  <p><code>ffmpeg -live_start_index 0 -ss 32:22:19.82667 -i https://example.com/main.m3u8 -t 00:00:55.65625 output.mp4</code></p>
  <p>I don't know why but ffmpeg is non-stop requesting segments even though I'm setting the length of this clip to be 55 seconds. Does anyone have an idea what I'm doing wrong here?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-06-15T15:38:51.207Z
Comments.Text: Hey just wondering if you came up with a solution for this? I also found this discussion but there was no definitive answer to why its happening and how to solve it https://stackoverflow.com/questions/38224809/ffmpeg-seeking-in-hls-m3u8-video
Comments.UserDisplayName: jcaruso
Tags: <ffmpeg><hls>
Title: Seeking in large HLS input on ffmepg
UserDisplayName: Brandon Price
ThreadText: # Seeking in large HLS input on ffmepg
  
  (Asked by: username_0 on 2021-01-27)
  
  I'm trying to create an mp4 clip from an HLS input stream that is over 36 hours long. My ffmpeg command looks more or less like this:
  
  `ffmpeg -live_start_index 0 -ss 32:22:19.82667 -i https://example.com/main.m3u8 -t 00:00:55.65625 output.mp4`
  
  I don't know why but ffmpeg is non-stop requesting segments even though I'm setting the length of this clip to be 55 seconds. Does anyone have an idea what I'm doing wrong here?
  
  **Tags:** ffmpeg, hls
  
  > **Comments:**
  > **username_1**: Hey just wondering if you came up with a solution for this? I also found this discussion but there was no definitive answer to why its happening and how to solve it https://stackoverflow.com/questions/38224809/ffmpeg-seeking-in-hls-m3u8-video  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-06-15. Score: 0
  
  I found that using the "HLS protocol" instead of the "HLS demuxer" worked better for seeking.
  
  To use the "HLS protocol" prefix the HLS playlist url with `hls+https://` instead of just `https://` (which uses the HLS demuxer apparently), and doing that got the seek working for me. It was clearly not downloading the entire file as I noticed it made a fraction of the http requests that it was making before (with `-loglevel verbose` set)
  
  Do note, if you use the hls protocol, ffmpeg reports this:
  
  > Using the hls protocol is discouraged, please try using the hls demuxer instead. The hls demuxer should be more complete and work as well as the protocol implementation. (If not, please report it.)
  
  So maybe I should report the seeking issue to them if they're not already aware
  
  
  ---
  
  