You are not logged in.

#26 2013-03-14 15:13:54

Labus
Member
Registered: 2011-03-01
Posts: 33

Re: [Solved]Youtube issue

I looked into the throttling theory and as far as I can gather it seems like my ISP have had some issues with youtube speeds in recent months, which is somewhat around the time this issue appeared for me.
However, wouldn't that just make buffering slower? And not end the videos early?

I have noticed that in general both youtube-dl and the site directly tend to slow down buffering/downloading significantly or even stop it completely a couple of seconds before the video ends prematurely or the youtube-dl stops with an error.

We might be on to something here.

Offline

#27 2013-03-14 15:33:35

Labus
Member
Registered: 2011-03-01
Posts: 33

Re: [Solved]Youtube issue

More digging suggests that the entire country(Sweden) have had issues with youtube speeds as of late. Something with the links over(under?) the Atlantic ocean.
Proxies make the issues go away.

Offline

#28 2013-03-16 09:28:10

Labus
Member
Registered: 2011-03-01
Posts: 33

Re: [Solved]Youtube issue

Well, now the source of the problem is known. The symptom(the videos ending early) is still strange.
The videos buffering slowly, I could deal with. But the videos ending randomly makes it nearly impossible to buffer and entire video in advance.
Maybe the CDN:s are just so strained that they can't send more data which is interpreted as a video ending. And refreshing the page sends a new request.
It's also explained why these issues are so random and why they seem to go away for longer periods from time to time.
It's simply a matter of "rush hour".

Offline

#29 2013-03-16 22:13:47

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,838

Re: [Solved]Youtube issue

Not great for just browsing, but for long videos, you could schedule ytdl to download them in the middle of the night?
It might reduce the instances, and if you script it to restart on the error you get, it might eventually get the lot. Just a thought. Might be worth a try to test the theory, anyway.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Online

#30 2013-03-17 01:21:50

kellerman
Member
From: Latvia
Registered: 2011-07-20
Posts: 101

Re: [Solved]Youtube issue

If KDE, what network manager are you using? Try connecting with wifi-menu or just dhcpcd eth0 and see if it happens then.

Offline

#31 2013-03-17 08:39:03

Labus
Member
Registered: 2011-03-01
Posts: 33

Re: [Solved]Youtube issue

skanky wrote:

Not great for just browsing, but for long videos, you could schedule ytdl to download them in the middle of the night?
It might reduce the instances, and if you script it to restart on the error you get, it might eventually get the lot. Just a thought. Might be worth a try to test the theory, anyway.

I'm quite sure of the issue now. It happens on a windows 7 laptop using Wifi as well. Not to mention the hundreds of other Swedes complaining to our ISP:s over the same issue.
Although not everybody have the video ending early problem, some did. And even if that might be possible to fix, our ISP:s are working on the main issue. So I might just live with it for a while.
Since nothing point to an easy fix(if there even is one).

And what makes me even more sure that this is in fact the source of the issue, It fits perfectly with my observations that this happens more often with higher resolution,longer,older and less popular videos.

kellerman wrote:

If KDE, what network manager are you using? Try connecting with wifi-menu or just dhcpcd eth0 and see if it happens then.

Not using KDE now, but different network managers makes no difference. It's not the connection. It's the CDN servers having a hard time to keep up.




Thanks everyone for trying to help. Sadly the issue turned out to be out of  all of our hands. All I can do is wait.

Offline

#32 2013-04-13 20:23:12

Labus
Member
Registered: 2011-03-01
Posts: 33

Re: [Solved]Youtube issue

A update on the issue.
As said it is an issue with my ISPs CDN servers not being able to handle the amount of YouTube content their customers demands from it. So we get slowdowns and occasionally the videos sometimes stop loading.
They say that they are working on it but they constantly push back how long they say it will be until it will be fixed, from the start is was two weeks and now its several months.
So I decided to solve the issue for myself. And if anyone sees this and has a similar or related issue, this is what I've done.

What I did was that I blocked the IP-adresses of my ISPs servers, forcing the videos to load directly from YouTubes own servers.
I accomplished this with the help of WireShark and iptables.
When I came across a video where the problems appeared I ran a WireShark capture and reloaded the video, making sure that nothing else where using the internet at the time, and observed what IPs I was getting sent data from.
Then I used one of many IP lookup sites that exists to find which of them that where server belonging to my ISP and which where YouTubes own.
Then I blocked the ones from my ISP using iptables with this command:

 iptables -I INPUT -s insert_IP_here -j DROP 

And repeating this procedure every time the problems appeared on a video, since my ISP have several servers.
There is a small drawback of this though, the videos sometimes take a while to start loading since it tries several servers before getting answers from one, but once its starts its fast and smooth with no interruptions.
It takes some effort to get iptables and WireShark installed and working as intended, but there are better guides for that. The Arch Wiki for example.

It feels really good to finally overcome this issue that has been tugging away at my sanity for four months now, and It feels even better that I've managed to fix it myself when my ISP doesn't seem to prioritize that YouTube doesn't work well for their customers. Unfortunately they are the only one available in my building.

Once again thanks for the help, I had pretty much given up when I started this thread.


Edit: While this works most of the time, I've come across a few videos where my ISPs DNS servers wont send me to youtubes servers and the video won't load at all. This can be fixed by using another dns server. For example OpenDNS.
Although it might lead to general slowdowns to all browsing if the new DNS servers are further away than the ISP ones.
Another way of fixing the whole thing is to enable IPV6, but that can course slowdowns on sites that doesn't use IPV6. But to me, that together with OpenDNS seems to be the way with the least crippling/noticable drawbacks.

Last edited by Labus (2013-04-24 08:34:38)

Offline

Board footer

Powered by FluxBB