nndownload icon indicating copy to clipboard operation
nndownload copied to clipboard

Add native HLS downloader

Open AlexAplin opened this issue 2 years ago • 0 comments

As we move to DMS (#146), videos are now downloaded in segments with the grunt work being done by ffmpeg. That doesn't have multithreading support, so as DMC phases out, we probably won't support multithreading for now as DMS delivery is significantly faster even in sequence. One hacky way we might accomplish this for now is by splitting segment groups to multiple ffmpeg processes and combiing the results, but I'm mostly speculating if that's even possible. streamlink --hls-segment-threads may be some prior art for how to approach this.

Picking up on partial downloads also gets tricky because ffmpeg really only ever wants to download everything at once in sequence. yt-dlp even provides their own HLS downloader specifically for this use case with --hls-prefer-native. We should really start saving to PART files and converting the extension after completion to know when overwriting is appropriate.

Given these questions, it's likely we'll probably want to write in our own HLS downloader eventually.

AlexAplin avatar Mar 10 '24 04:03 AlexAplin