I am having a strange issue with Facebook's videos. I can start videos perfectly fine, but if I skip from, say 0.10 to 0.30, the video would freeze: it just won't continue playing. I have not experienced the issue on other video platforms such as YouTube, and my
I have googled the issue, but only found marginally related issues. I tried the following:
- Tried other browsers, but all have this issue. (Chrome, Edge, Firefox.)
- Disabled all plug-ins for the browser
- Disabled hardware-acceleration for the browser
- Re-installed the browser
- Re-installed the OS (Windows 10 Pro, 64 bit): clean install, no upgrade
As you can see, I am very annoyed by this, even so much that I formatted my complete set-up and even that did not work. Because it is across browsers, I wonder if it is a Windows issue, a Windows update issue, or a Facebook issue. I haven't found anyone with the exact same issue, so I am lost. Any help?
Update: As of today, 25 June '17, the problem has disappeared for me.
93 Answers
After some hours of debugging I found the culprit. It seems it was indeed partial rollout/AB test from facebook.
More precisely it was a flag called disableDuplicatePlayingRequest from VideoPlayerExperiments which gets loaded in the page source for your profile.
Having it set to true requires you to pause the video before changing time, otherwise the video will freeze/hang.
Now as for the solution, there is no simple one. It seems to be used in closures so no easy way to change it. At least from what I saw/tested.
Only way I was able to bypass it was to replace the (later edit: the script name/location changes often, I've added a tutorial to find the right one) script from facebook and load a customised version of the script with the help of an extension that bypasses the check from the file: if (c('VideoPlayerExperiments').disableDuplicatePlayingRequest && this.isState('playing')) return;
If anyone is interested in the extension, it's called Resource Override, but it's not that straight forward to use. You need a server to host the modified js file and a few Header rules to bypass CORS and CSP.
P.S. I created a community question here in order to get some answers from Facebook. Anyone can help by voting (or on mobile liking) the question.
P.S.2: Ok, so to actually fix this issue, you need to be using Chrome and follow the next steps:
Go on FB and login. Search all the js sources for the flag disableDuplicatePlayingRequest. If you don't know how to do that, you can use this tutorial
After you found the file that contains it, use the
{}button (Pretty Print) and then copy the whole contents from the file to a text editor. Go to the line that has something likeif (c('VideoPlayerExperiments').disableDuplicatePlayingRequest && this.isState('playing')) return;and remove or comment it. You now need to save this file and upload it to a server. I can't share my file since FB might consider it a breach of terms, so you'll have to do this on your own. Remember the public access url for the file.Install the Resource Override extension from the chrome store
Open the extension's options. In the Tab URL enter
*facebook.com*Add a change headers rule. In the
For:enter . Now go intoEdit headers. We will only work with response headers, so be sure to only use the second section. Add 2 set header rules forContent-Security-PolicyandX-Content-Security-Policy. Now we need to add your server to the existing policy that FB uses. To do that go back to the facebook page and into the Dev Console > Network tab. Select one of the .js file requests. In the response headers you will seecontent-security-policy. Copy the whole thing after:to a text editor. It should start withdefault-src.... Now findblob:;script-srcand after it add the domain that you use to host your js file. For examplexyz.comor*.xyz.com(if you use a subdomain). Be sure to leave spaces before and after it so it doesn't affect the existing string of policies. Now use this new line and put it in the 2 value fields from the set header fields from the extension. They should both be identical. Now we need one more set header rule forAccess-Control-Allow-Originwith a value of*. Click on close to go back to the main menu.Add one more change headers rule. This time we'll use it for your domain to be sure you have the right headers there as well. In the
For:field enter the exact link that your modified file is accessible on the net. Preferable https. Using http or a local file might cause problems. Now go into the change headers section of the rule. We will use here the response section as well. In the presets make sure to select theAllow outside contentoption in order to have it auto add 2 rules for you. After those 2, we need one more set header rule forAccess-Control-Allow-Originwith a value of . Not click close and get back to the main menu.The last step is to actually replace the FB js file with your modified file. To do that add a rule for URL -> URL. In the
From:add the file from step (1). As an extra note, this link will change periodically because facebook tends to update it every 1-3 days. You will need to change it as well when you notice videos will start to freeze again. You can follow step (1) to get the new link for it. Now in theTo:field you need to put your link to the modified file. One last thing is to check that all these 3 rules are set toON. That's it, videos should work again as they once did.
P.S.3: You can find the saved extension rules here. You need to replace the xyz.co and names with your own. They each appear 2 times. After that, make sure that the file link that contains the disableDuplicatePlayingRequest is correct.
I had the same issue like yours but for me, even YouTube videos would stop playing midway.
To solve this i first installed VirtualBox and then Ubuntu 16.04. After installing and setting it up, I ran tcpdump (while watching a video on YouTube) and opened the .pcap file in WireShark.
Inspecting the packets, I found that my NIC was midway dropping packets for some weird reason even though the driver for the NIC was up to date.
But just to try it out, I reinstalled the driver and set up my network interface again.
I guess somehow it worked cause I haven't had that issue ever since.
Might wanna try it out!
I don't think you've factored out enough issues in trying to to isolate this further. I've seen similar things in the past. Some other things to look at:
- it's possible that a proxy server upstream may be causing this. Nowadays, there's a lot more caching then you'd expect. I know of heaps of smaller companies using stuff like memcache, nginx, and squid; other companies using more expensive and integrated Proxy/WAN Acceleration solutions like BlueCoat and Riverbed; major IT companies using WAN based caching solutions such as Akamai. That's really just the tip of the iceberg... When configured and functioning well they're completely transparent and can help network performance drastically. However, when they aren't working quite so well you can end up seeing really weird stuff that is extremely difficult to diagnose such as this. The only way to figure out whether it comes down to a proxy server is to try changing your proxy server, re-configuring it or trying to not use one at all. If this is within your local network this is easy to fix. If it's outside of your network it's a completely different issue altogether. I used to work with firms where we were pushing massive track across international networks but we still struggled to get help in diagnosing let alone overcoming issues such as this
- it could also be a network configuration or performance issue somewhere. I often switch networks from time to time which means I know first hand what you're dealing with. On certain networks the video won't even buffer, while others don't allow me to move the time marker alone, etc... The only way I can deal with it is by downloading videos beforehand prior to playing it via VLC (plenty of tools out there such as browser extensions and command line utilities such as youtube-dl). This leads me to my next point. Ideally, an organisation should have multiple backup connections or alternate ISP's (with separate backbones) in case you have to deal with something like this but if you just want to test I figure you could get away with simply testing with a 3G/4G connection to see whether it's consistent behaviour across both connections (or try bringing a system home to check whether the problem still exists). I'd also be trying to figure out whether it was perhaps linked to Facebook itself. For instance, is it limited to bigger videos, smaller videos, lower quality videos, higher quality videos, videos that are likely to be stored in a particular data centre, etc... To diagnose this run a packet tracer and then run a traceroute on the IP address to figure out the path. Use whois information to get information regarding geographical area and narrow it down to a particular data centre. If that's too hard download the video to get the URL of the host and then run a whois on this to narrow down the geographical location and data centre. Another way to see whether it is network related is to try via a VPN such as the Tor network (try the Tor browser pack)
- one thing you'll need to note, is that if you've ever needed to diagnose a problem such as this, it can be difficult to get in contact with someone at a firm such as Facebook via the normal support lines. It'll be easier if you know someone who knows someone, etc... That way you can bypass front line support who can sometimes be contractors who don't know much more then what they're told and can't really do all that much because that's not their job
- it can be partly down to caching but in reality I think that sort of bundles itself in with the whole performance aspect nature of the problem
- I've also seen this type of problem crop up when dealing with sub-par hardware. For instance, I know that using one an Atom based netbook with LinkedIn is virtually unseable because it's so heavily dependent on JavaScript code which is executed client side. The same performance issue exists across video sites as well (can't buffer or else move the time marker). This issue does not exist on anything above an Core I3 based processor though... That said, I see you're using Windows 10 which means it's unlikely that you're IT budget is overly constrained
- since it's clearly possible that it could be down to raw performance I wouldn't rule issues regarding software drivers, Operating System, codecs, and software configuration as well. I'd try to run it as close as I could bare (software and hardware wise) which I've seen you have tried but I'd also be also be looking at whether or not there are other better optimised or updated drivers out there, ways to boost Operating System performance and so on... I'd also try fiddling around with the hardware and also attempting to cannibalise parts from elsewhere within the network to see whether that changes things
- if it comes do public versus private profile I think you may be ruling things out a bit too early. My guess is that the code to load up a private page versus a public page is different (for personalisation reasons). This could lead to the slightly performance discrepancy. Look through the code and the website. Notice how much of it is dependent on JavaScript. Could be somewhat similar to my LinkedIn issue. My guess is that it's a combination of issues including the above points (if you want to debug things further open up a browser developer debugging tool (Dragonfly in Opera is a good example). It will give you the load times for all elements as well as the relative size and what code is actually being loaded as well)