Suggesting that OGG is in any way more expensive is utterly ridiculous. Youtube currently streams video in H264 at some given bitrate, using a Flash player. They could easily stream the same video in Theora at the exact same bitrate and thus use no additional bandwidth. They'd need new storage to keep the ogg versions alongside the H264, but the idea that they would be unwilling to do so seems ridiculous to me, given that they already store up to 3 versions of many videos (360p, 480p, 720p).
You're also completely discounting the cost of H264 licensing right now (estimated by some to be over 5 million dollars a year), and the cost of future licensing once the current license terms expire. You're also discounting the cost that Google pushes off to the rest of the market - like the money other manufacturers of software and hardware pay to support H264. Adobe has to pay for the H264 license Flash uses, and without that license, Youtube wouldn't be able to use H264.
Now, one could argue that since Theora isn't completely equivalent to H264 quality-wise, that Youtube wouldn't be able to provide video at the same bitrates. That's ridiculous. The typical Youtube viewer doesn't even know what a bitrate is and is unlikely to be able to identify encoding artifacts.
One should also consider that Google could easily pay a small team to work on improvements to the Theora encoder for a year or two, like they're doing on Unladen Swallow. The results would pay off on a fairly regular basis, allowing Google to re-encode their Theora videos for improvements in quality and bitrate efficiency. I have no doubt that with a sustained investment of resources, Theora could be highly competitive with H264 - if not superior - for Youtube's uses. Even if they were to dedicate 10 engineers for an entire year to working on Theora, the total costs there would not approach the cost of licensing H264.
YouTube will need to keep its h264 files for Flash (and mobile devices), so Ogg would require petabytes of new storage space. Real money. According to YouTube's engineers to get comparable quality video with Ogg the file size will have to increase. Real money.
If it would be cheaper there would be no reason not to do it. Google built support for Ogg into Chrome, so they aren't scared of the format. They aren't doing it so I'm going to go out on a limb here and say it's not cheaper.
I haven't seen a substantiated claim that shows that Ogg is bigger than H.264. I've see Chris DiBona claim it on WHATWG, but not back it up with numbers or experimentation. In fact, I posted a link above to someone who refutes that assertion:
It doesn't matter whether the same video produces larger or smaller files in Ogg than H.264. It matters that YouTube still has to keep an H.264 copy around regardless (in order to have a version everybody can watch), which means that supporting Ogg involves YouTube storing (size of YouTube as H.264) + (size of YouTube as Ogg), which can be expected to be prohibitively larger than (size of YouTube as H.264).
Ah, that comparison had the opposite of the intended effect on me. The Theora encoded video looks much worse in every instance. Not sure if I would notice the harsh contrast and encoding artifacts when viewing a YouTube video without comparison, though. But still, the comparison pretty much convinced me that Theora has a very long way to go to be able to compete on quality.
You're also completely discounting the cost of H264 licensing right now (estimated by some to be over 5 million dollars a year), and the cost of future licensing once the current license terms expire. You're also discounting the cost that Google pushes off to the rest of the market - like the money other manufacturers of software and hardware pay to support H264. Adobe has to pay for the H264 license Flash uses, and without that license, Youtube wouldn't be able to use H264.
Now, one could argue that since Theora isn't completely equivalent to H264 quality-wise, that Youtube wouldn't be able to provide video at the same bitrates. That's ridiculous. The typical Youtube viewer doesn't even know what a bitrate is and is unlikely to be able to identify encoding artifacts.
One should also consider that Google could easily pay a small team to work on improvements to the Theora encoder for a year or two, like they're doing on Unladen Swallow. The results would pay off on a fairly regular basis, allowing Google to re-encode their Theora videos for improvements in quality and bitrate efficiency. I have no doubt that with a sustained investment of resources, Theora could be highly competitive with H264 - if not superior - for Youtube's uses. Even if they were to dedicate 10 engineers for an entire year to working on Theora, the total costs there would not approach the cost of licensing H264.