Skip to content

Instantly share code, notes, and snippets.

@s4y
Last active July 23, 2024 22:02
Show Gist options
  • Save s4y/46738a67c4bc842f1f02f09e1eaf23fd to your computer and use it in GitHub Desktop.
Save s4y/46738a67c4bc842f1f02f09e1eaf23fd to your computer and use it in GitHub Desktop.
Capture an HLS stream from the beginning with ffmpeg
ffmpeg -live_start_index -99999 -i 'https://….m3u8' -c copy something.ts
@rajhlinux
Copy link

rajhlinux commented Jul 23, 2024

How to start capturing at a specific segment, lets say at 480 when the m3u8 playlist have 500 segments?

I try using the following command it starts from the start and never at 480:
ffmpeg -allowed_extensions ALL -protocol_whitelist file,http,https,tcp,tls,crypto -i hls_1M_.m3u8 -live_start_index 480 -c copy output.ts

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment