Commit 7275dfd
committed
refactor(stream): Use aiohttp instead of curl
**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 #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.1 parent c93ff61 commit 7275dfd
3 files changed
Lines changed: 150 additions & 129 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
36 | 39 | | |
37 | 40 | | |
38 | 41 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
966 | 966 | | |
967 | 967 | | |
968 | 968 | | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
969 | 972 | | |
970 | 973 | | |
971 | 974 | | |
| |||
0 commit comments