aschey / stream-download-rs

A Rust library for streaming media content from a remote location
https://crates.io/crates/stream-download
Apache License 2.0
25 stars 5 forks source link

Support seeking in bounded/adaptive storage #27

Closed dvdsk closed 2 months ago

dvdsk commented 9 months ago
src/storage/bounded.rs:

//! Because the buffer will never resize, it's important to ensure the buffer is large enough to
//! hold all of the data you will need at once. This needs to account for any seeking that may occur
//! as well as the size of the initial prefetch phase.

Suggest seeking further then the bounded storage's capacity is not possible. My use-case is huge podcast episodes which I want to stream without filling up to much disk space or heap memory.

aschey commented 9 months ago

I think I answered this here https://github.com/aschey/stream-download-rs/discussions/26. This is likely best handled by a different storage implementation.

aschey commented 2 months ago

Closing due to answer above.

dvdsk commented 2 months ago

As you indicated you build the bounded/adaptive storage for things like internet radio I have build a (still work in progress) streaming solution specifically for (hours long) podcasts.

It provides seeking in bounded storage and bandwidth throttling. I would not recommend it for internet radio, stream-download-rs is way better tested and more stable.

If anyone runs into this issue however it might be worth a look: https://github.com/dvdsk/stream-owl

aschey commented 2 months ago

Awesome, thanks for the heads up! Is that repo private? Seems to 404 for me.

dvdsk commented 2 months ago

Awesome, thanks for the heads up! Is that repo private? Seems to 404 for me.

good catche! Fixed that :)