Flyleaf icon indicating copy to clipboard operation
Flyleaf copied to clipboard

Download limit support

Open swimfish09 opened this issue 3 years ago • 7 comments

Now downloader will download rtsp playback stream with 1x speed.

swimfish09 avatar Sep 05 '22 10:09 swimfish09

Can you describe better the issue? It was not happening with the previous versions and started with 3.5.8? Is it a live rtsp stream?

SuRGeoNix avatar Sep 05 '22 11:09 SuRGeoNix

It is not a issue rather than a feature. Yes it is a live rtsp stream but can set speed of it. https://stackoverflow.com/questions/64818701/rtsp-audio-stream-playback-speed-with-vlcj

swimfish09 avatar Sep 05 '22 12:09 swimfish09

For the downloader there is no point to set the speed as it will try to download it as fast as possible. I guess you mean the to set a download limit (KB/s)?

Or you mean to set the speed slower for the playback (because faster it doesn't really make sense on live steam)?

SuRGeoNix avatar Sep 05 '22 18:09 SuRGeoNix

Yes, limit download speed.

swimfish09 avatar Sep 07 '22 00:09 swimfish09

@swimfish09 You can implement this at the application level. I'm not sure if it should be in the library. You could have many downloaders and set the limit based on all instead of each of them. You can do this by checking the demuxer's TotalBytes each second (sum all downloaders bytes) and if you pass the limit you pause them. Let me know what you think.

SuRGeoNix avatar Sep 23 '22 08:09 SuRGeoNix

ok, i aleady have tried with it. TotalBytes = DecCtx.VideoDemuxer.TotalBytes + DecCtx.AudioDemuxer.TotalBytes; Is this correct?

swimfish09 avatar Sep 23 '22 22:09 swimfish09

Yes

SuRGeoNix avatar Sep 24 '22 05:09 SuRGeoNix