Skip to content

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)

@camgaertner camgaertner marked this pull request as ready for review May 27, 2025 03:32
@paulrouget
Copy link
Member

Won't be using this PR. See https://github.com/aclap-dev/vdh/pull/254

Keeping this open as reference.

@camgaertner camgaertner changed the title WIP: Fixes for crypto, byte ranges, and wrapping jsfetch urls Fixes for crypto, byte ranges, and wrapping jsfetch urls Aug 4, 2025
--enable-demuxer=flv
--enable-demuxer=dash
--enable-libxml2
--enable-muxer=hls
Copy link
Member

@paulrouget paulrouget Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not saying it's wrong, but I'm surprised it's here (enable-muxer=hls).

@paulrouget
Copy link
Member

Good with me. Go ahead and merge.

@camgaertner camgaertner merged commit 1f1308c into master Aug 4, 2025
1 check failed
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.

3 participants