Skip to content
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

Download limit support #185

Open
swimfish09 opened this issue Sep 5, 2022 · 7 comments
Open

Download limit support #185

swimfish09 opened this issue Sep 5, 2022 · 7 comments
Labels
enhancement New feature or request

Comments

@swimfish09
Copy link

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

@SuRGeoNix
Copy link
Owner

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?

@swimfish09
Copy link
Author

swimfish09 commented Sep 5, 2022

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

@SuRGeoNix
Copy link
Owner

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 SuRGeoNix added the enhancement New feature or request label Sep 5, 2022
@swimfish09
Copy link
Author

Yes, limit download speed.

@SuRGeoNix SuRGeoNix changed the title download rtsp playback stream with config of speed. Download limit support Sep 7, 2022
@SuRGeoNix
Copy link
Owner

@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.

@swimfish09
Copy link
Author

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

@SuRGeoNix
Copy link
Owner

Yes

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

No branches or pull requests

2 participants