Felmachersoft / StreamBuffRe

Public issue tracker for StreamBuffRe, see https://streambuffre.com/
5 stars 0 forks source link

Issue with having multiple streams open #2

Closed Zero3K closed 6 years ago

Zero3K commented 6 years ago

When I have 3 or more streams open, I lose connection to them over time and I also get "segment is missing" errors. The bandwidth isn't being maxed out when it happens.

Felmachersoft commented 6 years ago

So still no change with the new version?

You use the Live-atl.Twitch.TV | US East: Atlanta, GA according to https://twitchstatus.com/ . On this side you can also check the server status. Though i doubt it's the servers fault cause your last direct link actually worked for me without problems (running with several other streams a full hour).

You can try following links to test the twitch servers I use (idk how long this links are valid):

twitchplayspokemon: https://video-weaver.fra02.hls.ttvnw.net/v1/playlist/CuUCbl6JbSp-MOfIF4wvM8m3ySTlfAbWUVakQrMBKWGc_pCbXVoFnlfEnMSXQiYYaVhoqLm3wpogV198TFdMSXSE7FX1BVKtRKQW2tj5F5a5sDo46kR74Dwabudc0tptk-E3IrDs7gpMDxynEZdKgfzdU-FOTJb0D_CWe9phhrg7VIYEzaLdffDEpNaVCRLdiLwvptAqTxvjHGkok-6RLm8laxyORX3KweyymJ89wYkodeIkHU62AKDATUJtxaf2BbVqYG3pgo1XDI0g9Q-bSCgGGdYgRIO-6Egvbjp3zEJGgWwnaip_fV0WinaMpaCROAntuV7AkqZYeXLtftq47U5x9FIRLSi4bovTVop4EgeqTzP6lMpaWn7pBJQgUHQyJdVTKAd0QtJLYWGMkEuyaDrzLWkFlKj0U2p9jPdMTVVB5c6D51t65vywIOeAj0tyWYytMq5zt0-AE20qMXeGB1Vr4KH2lWTJEhB-9zl6qcwrmyVzc0kJS4JeGgzSV9p2b5bZbJIvRFM.m3u8

redbull: https://video-weaver.fra02.hls.ttvnw.net/v1/playlist/CsACvNyUcPe5RSFxbWCY2rUbK_bWPINPSB51ykHqjaEGJcuyEgqNg13LE5Ml64hyq7syQrVAbrxXB5swXemDEiFs7W3eFTp2YYeJ53-Ukr4GKgAB9wLXigwgmSu0uMqphz7sDo4Tss4EpZX_6u2fBeUrrIQtvsjLs4kvjeiPjGWs2i_lwjfZUMMxVDj6o1qAfKh5Af_H1UoQoq-TIl64LVQmHliyo1b64BnEI3DdHJnbQG26SGSgjJd2sOvgnBE_INrNsRUEtMFCvFuus_3ucrjMpkcZ-lwjosKDZflZ7yEvOBc9YiTQA41ZLLqs2t-qZd1trX7suYgrgQ5U9bUFoGSOOHNkMQmtkk7mPE4Eiv4wnAvjRgE0HJn07S_bkTPa0iH4M1qxCWd6U2Jxp-SkPIlbdC6-jLtkKAxlaZoP1l1Vb9ESEB42qzpbNgZ0hTnvi_xiWiMaDL86SIu2RTZz5eT6Zw.m3u8

Zero3K commented 6 years ago

Yes, still no change with the new version.

Felmachersoft commented 6 years ago

Please test if it also occurs with other livestreaming services like youtube livestreams and https://mixer.com/ .

Zero3K commented 6 years ago

It occurred when viewing two Youtube Live Streams. The Log is attached.

log.txt

EDIT: Maybe the connection timeout value is set too low.

Felmachersoft commented 6 years ago

Looking at the log, this is not the problem from before.

There are some segment timeouts starting from 1:20 PM to 1:27 PM. But not enough to break connection which is not perfect but ok.

There are two reasons the connection broke. First one is the 404 errors occurring from 4:36 PM on. The server says there are no segments anymore at the URL given in the m3u8 file (the list of segments to load). The other connection breaks at 5:32 PM because the server says it is forbidden to load the m3u8 file anymore (Maybe the live stream ended here?).

So unlike before it's no longer a problem of timeouts (hence changing timeout won't change anything), but a problem to keep downloading the m3u8 files. I will look into that.

Can you check if the problem with twitch connection failing is also caused by failing m3u8 downloads?

Zero3K commented 6 years ago

The issue with Twitch is still because its timing out frequently. The log is attached.

log.txt

Felmachersoft commented 6 years ago

The tests indicate the timeout problems only occur as bad with twitch.

  1. Does the timeouts also still occur with a single stream?

Some more things to try to find the cause:

  1. Try to play the direct links (the ones you posted before and can be found in StreamBuffRe in the stream information dialog) in a media player like vlc or MPC. Check if the stream plays without lagging.

  2. When you have a portable device with StreamBuffRe on it try using a public wifi and see if it works better there. If so it's most likely your ISP.

  3. Try to use a VPN to get the direct link of another twitch server to check if it only occurs on your default one.

Zero3K commented 6 years ago
  1. Yes, the timeouts still occur with a single stream.
  2. When playing the direct link in MPC-BE/HC, it disconnects after a short while.
  3. I'll try that later on.
  4. Do you know of any free ones?
Felmachersoft commented 6 years ago

To sum up: You have only problems with twitch and disconnects also occur with other programs like MPC. But streams do work well without lagging and buffering in your browser (streams will not disconnect because the twitch page will automatically try to reload them)?

Conclusion: It is most likely a problem with your ISP or connection to twitch. Both cases are out of scope of StreamBuffRe.

Anyway here are some things to try: You tried a proxy before (see 7 Mar) but disconnects still occur. Maybe you ran into the now fixed problem of StreamBuffRe thus using a proxy now might help. Try running twitch live streams in different browsers or use a browser plugin to change your UserAgent. If it works flawless with some UserAgents/Browsers but not with others, you ISP might check on it. The UserAgent StreamBuffRe uses could be made editable to circumvent this problem. Try using a VPN to completely bypass ISP throttling. In case of free VPNs I'm only aware of either fast but limited VPN services ( like https://hide.me/ ) or unlimited but slow VPN services (https://protonvpn.com).

Zero3K commented 6 years ago
  1. Streams still lag in the browser.
  2. I am not being throttled.
Felmachersoft commented 6 years ago

If twitch streams don't work but everything else does, only two options remain:

  1. The twitch server you use is not operating well (unlikely, because not only you but everyone using it would have the same problems). You can check this by using a proxy to connect to another twitch server instead. If using a proxy helps it is indeed the server.
  2. Your ISP throttles twitch traffic. This is most likely the case if the proxy won't help. If using a VPN solves the problem but the proxy did not, it is pretty much the proven your ISP uses throttling on you.
Zero3K commented 6 years ago

There's no way to fix the timing out when another program is using most of the bandwidth? (such as a browser buffering a Youtube video)

Felmachersoft commented 6 years ago

There is already a way of handling such cases. Even if the download of a segment fails it is retried several times. But this can't help when a livestream loads to slow, because the segments of a livestream are only available for a short time. So if the download is too slow, the stream will fail at some point eventually.

Hence this doesn't help with your problem.

Zero3K commented 6 years ago

I don't think its loading too slow.

Felmachersoft commented 6 years ago

When streams also lag in the browser, segments are loaded to slow. This is a problem with your connection to the service (looks like twitch only, for whatever reason) and can not be handled by StreamBuffRe.

Zero3K commented 6 years ago

Its not only Twitch. Its also occurring with Streamate/Cammodels.

Felmachersoft commented 6 years ago

If several programs have a problem with lagging/buffering, it is a connection problem which can't be handled by StreamBuffRe.

Zero3K commented 6 years ago

Well, sometimes the stream just ends up freezing with no message about the stream disconnecting being shown.

Felmachersoft commented 6 years ago

If the bar under the playlistentry stays gray (instead of getting red) and no new segments are loaded (can be checked via "show info"), this is the same error as in #31 and should be fixed with the next release. I hope to release the new version soon and invest some more time in StreamBuffRe again.

Zero3K commented 6 years ago

Do any streams that you are viewing via it get disconnected/freeze when viewing a 10+ minute video on hooktube.com (which is a front-end for Youtube)?

Felmachersoft commented 6 years ago

Please open a new issue for this and answer the following questions there:

  1. Does it happen consistent with some videos?
  2. Does it also happen when using youtube for these videos instead?
  3. Which player are you using?
  4. Does it happen with other players as well?

I don't use hooktube but i had no problem on a random test video. For StreamBuffRe it makes no difference if you use hooktube or youtube (at least if you only use 720p and nothing above), it downloads and plays a simple mp4 file.

Zero3K commented 6 years ago

I mean, viewing a video via hooktube.com in a web browser while a stream/streams are playing via StreamBuffRe.

Felmachersoft commented 6 years ago

As I said before, I don't use hooktube, hence I don't know about any problems. Either the problem is your connection or hooktube itself. Anyways it is not a problem of or created by StreamBuffRe.

Zero3K commented 6 years ago

Okay. How about you try downloading a test file from https://speed.hetzner.de/ while viewing a couple of twitch streams via StreamBuffRe and see if the streams disconnect or not?

Felmachersoft commented 6 years ago

Due to the bandwidth limit of an internet connection more parallel downloads will slow each other down. Hence if you download something while watching a livestream the segments of the live stream will be downloaded slower. Once the segments are downloaded too slow (half the time they are, for example a 2 second segment times out after 4 seconds of downloading), the download will hit a timeout and fail. If a segment download fails three times (for example because of the timeout) the livestream will disconnect. The reason for the timeout is that many live streaming sites only provide the segments for a short time. Hence they can't be downloaded after the timeout anyways.

So this is a connection problem. My test connection (around 50 Mb/s download) allowed me to play several livestreams while downloading the 1 GB file from your link. Previous tests show that more streams together will lead to a disconnect due to insufficient bandwidth.

Zero3K commented 6 years ago

I still don't understand why they are disconnecting when my bandwidth isn't being maxed out.

Felmachersoft commented 6 years ago

From here on I can only repeat myself. It is a general problem with your connection.

I can't really tell what causes the problem. Maybe your connection is not stable enough so that sometimes your bandwidth goes down for a short period (long enough to cause timeouts). This could be tested with a very large download (it has to take an hour or so, long enough for the problem to occur). Short periods of high pings in online games are also indicators for an unstable connection.

Did you test multiple livestreams when using other internet connection (like public Wi-Fi)?

Zero3K commented 6 years ago

The "video freezing and stream showing as grey in the main window issue" is still occurring in the latest version.

Zero3K commented 6 years ago

I think it has something to do with the upload speed provided by the ISP being used fully.

Felmachersoft commented 6 years ago

A speed test (don't use the one from your ISP for better results) will tell you about low upload speed.

ISPs have many ways to control and throttle the bandwidth of customers. So it could also be that they throttle only certain services (like twitch) or certain kind of traffic (like video streams).

Zero3K commented 6 years ago

Its not low upload speed, its that its being maxed out by using P2P programs (which means that StreamBuffRe doesn't have enough upload to use for communicating between itself and the media player).

Felmachersoft commented 6 years ago

Yep, that could be the reason.

Zero3K commented 6 years ago

Is there any way to fix it? I think that it should be using the local bandwidth, not the bandwidth provided by the ISP (if possible).

Felmachersoft commented 6 years ago

You could try to throttle the upload bandwidth used by the other P2P programs.

When you speak of 'local bandwidth' I assume you refer to the connection from your PC to your router. It is very unlikely that this connection is actually slower than the connection your ISP provides when downloading/uploading stuff from and to other server on the internet. Online video streams and the P2P programs depend on the bandwidth provided by your ISP. Thus StreamBuffRe can’t just use ‘local bandwidth’.

Zero3K commented 6 years ago

I mean, use the local bandwidth for the communication done between it and the media player.

Felmachersoft commented 6 years ago

The communication between StreamBuffRe and its media players happens only on your PC. No external connection or "real" network (like a connection to other devices) is involved. StreamBuffRe can be used completely offline for local media files (just drag and drop them onto the main window to add them to the playlist).

Zero3K commented 5 years ago

Now its happening even when trying to view one stream.

Felmachersoft commented 5 years ago

Whenever you have problems with streams please check if they also occur when using the twitch webpage (ensure you don't use the low latency mode for streams). Also check at least one stream from another service like a youtube livestream to ensure StreamBuffRe causes the problem and neither your connection nor the used services.

Zero3K commented 5 years ago

Actually, its just stating "closed by user request" even though I didn't close it myself.

Felmachersoft commented 5 years ago

That is just the default message that shows up for HLS and MPD streams whenever the download of one of them stops for any reason other than the streamer himself ended the stream. So it shows up if you stop buffering a livestream as well as when the livestream times out.

What actually tells you the cause of the problem are the error messages (like timeouts) before the "closed by user request" message.

Zero3K commented 5 years ago

Here's the log of when the issue occurs:

5:25:14 PM - OpenStream opening stream:BackgroundGuy02 5:25:14 PM - PlaylistEntry starting creation StreamJob for url: http://www.twitch.tv/backgroundguy02 5:25:14 PM - PlaylistEntry finished creation of StreamJob for url: http://www.twitch.tv/backgroundguy02 5:25:14 PM - StartStreamConsumer started HTTP_StreamProvider with adress: http://localhost:55556/ 5:25:16 PM - MPC_Player Stream opened while player is running with url: http://localhost:55556/ 5:25:16 PM - MPC_Player starting mpc with args: "http://localhost:55556/" /slave 1707244 /new /webport 9876 5:25:17 PM - MainController HLS Stream 'BackgroundGuy02' closed by user request - 5:25:17 PM - SegmentDownloadQueue`1 disposed DownloadQueue for: BackgroundGuy02 5:25:17 PM - HLS_StreamProvider Disposed 5:25:17 PM - RemoteMPC Player closed - poll closed 5:25:17 PM - RemoteMPC Player closed - poll closed

Felmachersoft commented 5 years ago

Since there are no timeouts and the HLS_StreamProvider is closed directly, I don't think it is a problem with network. Please check if the same behavior occurs when using MPV instead of MPC.

Zero3K commented 5 years ago

The issue doesn't occur with MPV. The log of it starting is as follows:

8:32:37 AM - CommandQueue executing command: ResolveAndPlay 8:32:37 AM - ResolverManager Resolving url: https://www.twitch.tv/twitchplayspokemon 8:32:40 AM - ResolverManager Finished resolving url https://www.twitch.tv/twitchplayspokemon 8:32:40 AM - CommandQueue executing command: AddPlaylistEntries 8:32:40 AM - OpenStream opening stream:TwitchPlaysPokemon 8:32:40 AM - PlaylistEntry starting creation StreamJob for url: https://www.twitch.tv/twitchplayspokemon 8:32:41 AM - PlaylistEntry finished creation of StreamJob for url: https://www.twitch.tv/twitchplayspokemon 8:32:41 AM - StartStreamConsumer started HTTP_StreamProvider with adress: http://localhost:55556/

Felmachersoft commented 5 years ago

Ok, I will check out the problem with MPC on the weekend. Please provide the exact version of the MPC you use (version number as well as 32/64 bit) to ease testing.

Zero3K commented 5 years ago

MPC-HC 1.7.15 (x64)

Felmachersoft commented 5 years ago

Although I only found MPC-HC 1.7.13 (x64) as latest version, I found the cause of the problem and will release an update with a fix tomorrow.

Felmachersoft commented 5 years ago

Check version 0.6.10.2, it should work again.

Zero3K commented 5 years ago

It works. Thanks for fixing it.