Skip to content

WIP: Fixes for crypto, byte ranges, and wrapping jsfetch urls #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

camgaertner
Copy link
Collaborator

This does a few things.

  1. Support for aborting ffmpeg & getting progress info for ongoing downloads
  2. Add jsfetch: to HLS urls in the manifest that need it. When downloading from an m3u8 via i.e jsfetch:https://example.com/test.m3u8, if that m3u8 contained absolute URIs, they would not be properly fetched w/ jsfetch.
  3. Add support for byte ranges. But they don't currently work with seeking.

@camgaertner camgaertner requested a review from paulrouget May 16, 2025 03:00
@paulrouget
Copy link
Member

Diff of diffs, great :)

I'm happy you manage to get deep enough to get all of those internals exposed! That's super cool.

  • It would be great to have a bit more comments / docs / proper commit messages before this lands.
  • Why offset code is commented out?
  • What's the crypto protocol for?

* Properly prepend http/https URLs with `jsfetch:`. This is to address
  situations where the m3u8 was pre-pended with `jsfetch:` but the M3U8
  contains absolute URLs. Since those start with i.e `http://`, ffmpeg
  can't fetch them.
* Add support for byte ranges in jsfetch
* Add `ffmpeg_get_out_time_ms` and `ffmpeg_get_out_time_ms` for progress
  tracking
* Add `ffmpeg_interrupt` to abort a running download
* Add the patch from
  [https://trac.ffmpeg.org/ticket/7359](https://trac.ffmpeg.org/ticket/7359)
  which address issues with seeking HLS streams. This patch is not in
  ffmpeg 7.1.1 release
@paulrouget
Copy link
Member

(let me know if this needs a review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants