Why does YouTube butcher your video quality and DTube doesn't?

in dtube •  7 years ago 

For this topic, you kinda need some knowledge about video encoding. You need to understand what a codec is and what bitrate does. If you don't know that, please read my "How do i configure OBS for DLive?" tutorial, where i explain what it does.


When you come from YouTube or been on YouTube for some time, you certainly have heard about rendering in a higher resolution to get better image-quality out of YT. Say if you have recorded a 1080p footage, rendering that in 1440p and upload it, will get you much better quality. But why is that?
Screenshot_20180128-163407.png

As you can see here, YT uses MPEG-4 as the codec up until 1440p, then it switches to WebM. A container and codec Google itself developed and trust in.


But is it as great as they say it is?

As an individual, i would say no. A big and hard no. I want to say that i am not a developer nor an engineer, all of this here are just educated observations.

Google developed and use this codec most probably because they wanted to avoid the fees for using the, much more adopted, H.265/HEVC while reducing the storage requirements. But they backtracked on that, because until some time ago, you were unable to upload HEVC encoded videos to YT. It would just say that it is an unsupported codec. Now you can upload it just fine, which means they already pay for the license.

VP9, which is the codec of the WebM container, is much like HEVC a newer version, of the VP8 codec, and promises better quality with much less bitrate, but that is exactly where Google did not deliver.


Bildschirmfoto 2018-01-28 um 14.22.15 Kopie.jpg
Bildschirmfoto 2018-01-28 um 14.22.33 Kopie.jpg

As you can see in this pictures, not only is the MPEG-4 file nearly 200MB smaller than the VP9, the WebM video wasn't even reduced in bitrate. While that in itself isn't something bad, it means that you will get better quality at the same bitrate, they do not safe any storage space.


But there is a even bigger disadvantage!

And that is rendering time. While HEVC is not very fast, compared to VP9 it is the Usain Bolt of those codecs. With a normal computer, you are looking at 4-6 x the original runtime of the clip with HEVC. So 1min of video would need between 4-6min to encoding. VP9 tops that by quite the margin. While i don't have exact numbers for the codec, because i gave up on it quite early, i can give you my experience. I recorded about 10mins of gameplay from a game, and as i tried to render it with a Ryzen r5 1600 @ 3.9GHz, it said to me that it would take about 5-8 hours. It was fluctuating a bit here and there.

Now remember the time you had to wait until YT had processed your video? Yeah it's because of that! Now try to imagine what a behemoth of computer they must have.

And with every encode your quality will drop. So let's say you record gameplay, that means you encode it from your Console through a capture card to your PC. Then you edit in your video-editing programm of choise, encode it then again and upload it to YT, where it will be encoded into there own codec once more. So by the time you see a video on YT it was encoded 2-3 times already.


But why does DTube look so good then?

That is quite simple. Instead of encoding your whole video, they just add a 480p version.
Bildschirmfoto 2018-01-28 um 17.13.23.png

YT encodes your whole video, so that they have all the supported resolution in their codec. DTube does not do that. Instead of encoding the whole video, they just take it and create a 480p version, but leave the "source" file untouched. While that means that there might be some old codecs being used, it also means that you have the quality that you rendert your video at. No funky mambo jambo has been done with your video after it's been uploaded. What you see is what you get here.


And what about the storage space?

While that certainly is a concern, DTube only stores your video for 57 month instead of leaving it on their drives forever, like YT does. That way they can calculate when and how much space is gonna be freed. Exyle talked about it a little bit in his most recent Vlog, and how they are paying for the server cost.


And that is the reason why DTube looks so much better than YT and is also the reason why content creators with ornate visuals should consider switching to DTube or at least use it as a second base.

I hope i could give you a better inside on how bot platforms work and what the advantages and disadvantages are. A thumbs up would be really appreciated. And as always, thanks for your time and greetings from germany

-Arvarad

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  

A few comments:

  1. MPEG-4 and WebM are not codecs. They are container formats, which are not related directly to video quality. It's true that those two containers have mutually exclusive stream formats available. But that's another issue. (There are, incidentally, containers that allow many different stream formats, such as my favorite Matroska, for instance. WebM is actually a subset of Matroska, BTW.)
  2. Your argument that VP9 is an inferior codec fails because you only observed increased filesize and bitrate. The issue is not that of the bitrate per se, but the efficiency, i.e. what quality you can achieve at a given bitrate. You said nothing at all about the actual quality of the two versions in your comparison. Based on the claims about VP9 you cite, one would expect the WebM version to be of higher quality, because it has a higher bitrate, though whether that's really true in that case is unclear; it depends on many factors. That said, it may be difficult to properly evaluate quality; maybe the difference is imperceptible without close comparison. Good, scientific evaluations of these things consist of double-blind experiments with a decent sample of people.
  3. "not only is the MPEG-4 file nearly 200MB smaller than the VP9, the WebM video wasn't even reduced in bitrate." Makes sense to me. Higher bitrate necessarily means a larger file, since you can't stuff bits into nonexistent space. The converse is not true, but if you reduce bitrate, and the file stays the same size, that means space is being used for nothing, which is pretty stupid.
  4. A slow codec is definitely a bad thing, all else being equal. Just bear in mind that encoding speed depends tremendously on how the video is being encoded. Some options can speed up or slow down the process by a lot, and defaults are hardly standardized. Not to mention, some encoders are just better than others in some ways (none of this is simple). So, the question is: is the comparison between HEVC and VP9 a fair one? Actually, those are formats, not encoders, so the real question is: which encoders are being used? Ones I know of are x265 and vpxenc (libvpx), respectively, but there are others. That's not to say one can't evaluate formats on the basis of how well existing encoders perform, but encoders are always being improved, so it's not impossible for things to change.
  5. "Now try to imagine what a behemoth of computer they must have." I don't know just what their process is, but it almost certainly involves vast encode farms (yes, I think it's plural, just like their data storage). With hundreds of hours per minute coming in, it boggles the mind to try to imagine what their hardware is like, but it must be vaguely like that.
  6. I agree that encoding multiple times degrades quality. For this reason, I try to keep my video in a lossless format until it's time to upload, so at least the editing process preserves quality. Of course, I usually deal with simple graphics and game captures, rather than camera footage. Noisy real-world video like that may necessitate a bit of compromise.
  7. Anyway, about your saying that DTube doesn't encode video, I was tempted to just say it's a completely nonsensical statement. But I think I understand what you're trying to say: that YouTube makes one master encoding at the start of processing, and then encodes the different streams from that master. Meanwhile, DTube directly encodes the original to the 480p format. Is this what you mean? In any case, it's not really correct to say it doesn't encode videos; it does (unless you give it an IPFS hash for already encoded video; I wonder how it handles that now), just more directly. And that does help the quality.
  8. OTOH, one can only stream the original if it's in a streamable format, which means (1) something the web browser supports (which leaves out my favored Matroska if it isn't WebM) and (2) a reasonable size, framerate, and bitrate. If not, it may be necessary to download and watch on one's own computer (they should add a download button to make this easier, BTW), or at least wait for buffering. YT has an advantage, in that it encodes to multiple sizes, up to around what the source is (assuming it's not too large), and on playback automatically adjusts based on what the user's network can handle. DTube currently only encodes 480p, watchable but not great. It is nice to have the original available for download, though.