Skip to content

refactor(stream): Use aiohttp instead of curl - #120

Draft
Dolly132 wants to merge 3 commits into
srcdslab:masterfrom
Dolly132:master-dolly2
Draft

refactor(stream): Use aiohttp instead of curl#120
Dolly132 wants to merge 3 commits into
srcdslab:masterfrom
Dolly132:master-dolly2

Conversation

@Dolly132

Copy link
Copy Markdown
Contributor

Summary
Well, YouTube is so strict sometimes, so it blocks buffer from actually being sent to the ffmpeg process in time, and we can't control that, however, a 15 seconds timeout was set, youtube usually takes more than 5 seconds to send buffers in time.

Why aiohttp?
I had to get rid of curl because handling it is harder, aiohttp is way easier and more reliable for requests like YouTube and MyInstants.

**Summary**
Well, YouTube is so strict sometimes, so it blocks buffer from actually being sent to the ffmpeg process in time, and we can't control that, however, a 15 seconds timeout was set, youtube usually takes more than 5 seconds to send buffers in time.

**Why aiohttp?**
I had to get rid of curl because handling it is harder, aiohttp is way easier and more reliable for requests like YouTube and MyInstants.

- Solves srcdslab#119
- Now local files don't need a curl process to be made, it can be done inside ffmpeg itself
- Set the duration of the youtube video before playing it instead of calculating it during the stream.
@Dolly132

Copy link
Copy Markdown
Contributor Author

Might need to think of better solutions for this.
this PR will be draft until I come with a better solution

@Dolly132
Dolly132 marked this pull request as draft August 11, 2026 09:05
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.

1 participant