As a general comment, sometimes such problems are caused by missing codecs,
fixed by installing a codecs pack such K-Lite.
But as your videos do play when downloaded, this isn't your problem.
The video example that fails for you uses Flash, but you prefer the YouTube HTML5 player.
More information is found in the article Force YouTube to Use the HTML5 Player:
YouTube's HTML5 player is great, but it's not enabled for all the
videos. Even if you go to youtube.com/html5 and join the HTML5 trial,
you'll find a lot of videos that use the Flash player. "Some videos
with ads are not yet supported (they will play in the Flash player),"
mentions the site.
There's a simple Greasemonkey script that forces YouTube to use the
HTML5 player for almost all the videos you watch at youtube.com. You
need to install Greasemonkey if you use Firefox or Tampermonkey if you
use Chrome, then click the "Install" button here.
For Chrome, use the old version from Sept 23.
The script works better in Firefox. If you install the script in Chrome, it will disable
the new Ajax interface, but everything else seems to work well.
Here's a video you can use to test the script. Please note that the script doesn't work for embedded videos.
EDIT : As userscripts.org has disappeared, I have modified the links to point to userscripts-mirror.org. In addition, I reproduce the script below :
// ==UserScript==
// @name ythtml5kiss
// @namespace mentormayhesset
// @description YouTube the HTML5 player [Firefox+Greasemonkey>=1.0]
// @include https://www.youtube.com/*
// @include http://www.youtube.com/*
// @exclude https://www.youtube.com/embed/*
// @exclude http://www.youtube.com/embed/*
// @version 3.1
// @run-at document-end
// @grant none
// ==/UserScript==
try{
window.ytspf = window.ytspf || {};
Object.defineProperty(window.ytspf,'enabled',{value:false});
ytplayer.config.html5=true;
delete ytplayer.config.args.ad3_module;
}catch(e){}
Link to the userscript is dead now. – user1306322 – 2016-09-27T23:38:54.953
@user1306322: Did you down-vote a 3-year old post? I fixed the links to point to userscripts-mirror.org instead of the defunct userscripts.org and reproduced the script, just in case. – harrymc – 2016-09-28T09:03:22.963
Yes, I did, but not because it's old or the link is dead, but because you didn't include the script itself in your answer, which is not cool no matter how old the post is, as you're probably aware. Downvote changed to upvote now. – user1306322 – 2016-09-28T12:30:18.653
The problem is not with codecs. See the additional info I've added to my question. I have CCCP installed and can play all MP4 videos that I download from YouTube.
– Ansis Māliņš – 2013-10-29T09:13:16.380Do you have this problem with other browsers? If you are only having this problem with Flash on Firefox, I would suggest to uninstall Flash and Firefox, clean up all folders and reinstall. – harrymc – 2013-10-29T10:23:06.780
I'm not interested in other browsers. I don't have Flash installed. I'm on a fresh install of Windows - there's nothing to clean up. – Ansis Māliņš – 2013-10-29T12:44:08.967
Your example of the video that fails is an .swf video that requires Flash in order to play. You absolutely need to install Flash (untick the McAfee offer). See also this Mozilla link. I have no explanation why some Flash videos do work for you, except maybe by some other add-on that only does a partial job (since there are many sub-flavors of Flash, only the real software can play them all).
– harrymc – 2013-10-29T13:32:57.543There is a reason why Flash is installed on 90% of the PCs in the world. – harrymc – 2013-10-30T10:50:12.903
My question is about HTML5 video, Firefox's support for it, and YouTube's implementation of it. My question is not about Flash. – Ansis Māliņš – 2013-10-30T11:28:29.943
1
The video example that you gave uses Flash and not HTML5. You will find more info about this in the article Force YouTube to Use the HTML5 Player. There exist also add-ons to Firefox like YouTube HTML5 Video. However, for the video that fails, adding
– harrymc – 2013-10-30T12:34:30.293&html5=1
to the url doesn't help, so it's simply not available in html5, only in Flash (for the moment).The Greasemonkey script did the trick. Thank your for your time and effort. Update your answer to claim your reward. – Ansis Māliņš – 2013-11-01T11:43:21.233
Answer updated. – harrymc – 2013-11-01T14:32:03.030