Youtube Upload and Streaming Quality Notes.

*HELLO! This thread spiraled into a very dense account of my experiments With youtube. Feel free to read very little of it and simply post and ask a question or post and give your own experience. My most recent post about youtube, was an attempt to condense all of the knowledge into a single post:

Regarding Streaming, I will link the first post on that topic here, so that you can skip to it.

In the Sekiro thread, @Decinoge and I were discussing how to get better quality uploads on youtube. I think this sort of information may be useful to people who want to utilize youtube for their gaming content.

This is the situation: if you arbitrarily upload 720p and even 1080p video, it will probably end up looking like crap. With a ton of compression artifacts. Because Youtube recompresses everything you upload. And for some reason, 720p and 1080p content get really low bitrates. Youtube requires you to game their system, to get access to better quality compression. What you have to do is upscale your content to 2K or 4K (or content which is native to those resolutions). At those higher resolutions, Youtube will use better quality compression and higher bitrates. So, you still need to keep the bitrate of your uploads fairly high, to give their system as much quality to work with, as possible. And that’s the whole point here.

My source file is 720p. So this really has nothing to do with a higher resolution looking better. Its just that youtube won’t give you enough bitrate for decent video quality, until you feed them a file which says its high res.

I did some tests, so here are the results. I’m working with an older dual core laptop right now, so I was a little limited on what I could do. But, the results were still pretty drastic.

I recorded 27 seconds of Dark Souls 2 at 720p/30fps, via the MJPEG codec set to 100% quality. Its still lossy, but not very noticeale. What I mean is, its a little bit “softer” looking than the actual game and it won’t do gamma correction. But, there are zero compression artifacts and that is our main concern today. The original file is 711Mb @ 218mbps.

The first sample is a 720p upload. The source recording is 720p, so no upscaling on this one. I compressed the original file with H.264 @ 40mbps (the file is 135Mb), using the standard “medium” speed setting for the H.264 codec. No custom/manual settings. Thats the same bitrate as a good 1080p Blu-ray. Which is overkill. But remember, we are trying to trick youtube’s system into giving us better quality. However, it seems like the resolution of your uploads is their main flag. Because this looks like hell:

720p (audio not working)

The next sample is the same video source, upscaled to 1080p @ 40mbps. Same bitrate and compression settings. It looks a lilttle bit cleaner. But still pretty bad.

1080p (audio not working)

And the final sample is the same video source, upscaled to 1440p AKA: 2K (2560x1440, exactly twice the numbers of 720p). 40mbps again. same compression setttings.

A whole lot cleaner
1440p (re-uploaded with working audio)

I could not get a 4K video to process in my upscaler. For some reason, my system would not finish the file properly. I have no doubt it would look even a little cleaner.

So, I think the results are pretty clear. I suggest opening the 1440p upload in a tab and then comparing back to back. Its insane. Even the 1080p upload does not compare. Pay particular attention to when my character goes down the stairwell. Its a mess in the 720p and 1080p videos. You can also pause it and use your arrow keys to skip to the same frames and compare still shots.

Remember, all 3 of these links are the same 720p video compressed at the same bitrate. The 1080p and 1440p are simply upscaled.

9 Likes

I swear when I’ve uploaded stuff as h.264, and used a YouTube downloader to pull the original resolution version back out, I get the same file. Or are you just talking to get the throttled versions to look better?

Yeah I dunno what’s up with their download feature for owners.

For this video, I get back a 7.5Mb file when I click their download link in my video manager. And it looks TERRIBLE.

1 Like

I wonder if a streamer could capture video at 720p but then run it through an upscaler on the fly, before it pipes out to youtube live.

People probably do that. I’m just thinking out loud.

OH! If you open up the 1440p video, but set its quality to “720p”, it still looks better than the 1080p upload!

This is so dumb!

4 Likes

I knew about this resolution trick. It’s fucked!

This makes me really mad.

For awhile I thought youtube had parity with vimeo in terms of preserving video quality? I guess this isn’t true anymore?

This is probably somehow pewdiepie’s fault

2 Likes

what do you use to upscale the video

I can write a drag and drop ffmpeg script for y’all if you want

2 Likes

The pros use premiere, final cut pro, Sony Vegas.

For this, I just grabbed some program called “video enhancer 2”. It apparently uses the “Super Resolution” method. And it has a 30 day trial. But a cubic or even bilinear scaler or something should be fine. Especially if you are just doubling resolution. Such as 720p to 2K.

Yes please

OK I have to think of the most sensible way of doing this for Windows because you don’t have civilized shell script tools like Automator

I’ll probably have something this weekend

2 Likes

actually let’s try this for kicks

install the windows linux subsystem if you haven’t done so already, do sudo apt install ffmpeg from bash, install this registry key http://www.mediafire.com/file/r5uxk9c0hhucvt9/ShellBashScriptOpen_v3.rar (the OpenWithBash_CloseAfter.reg), then save this to a file called 1440p.sh or something:

#!/bin/bash

ffmpeg -i "$1" -filter:v scale=2560:-1 -c:a copy "$1"1440p.mkv

associate it with C:/Windows/System32/bash.exe as the default handler then try dragging and dropping a clip onto it

not sure that windows bash can process dragged files as arguments that way but nothing bad should happen if it can’t

1 Like

pirated sony vegas it is then

1 Like

that would be one step on any other OS :frowning:

so help me I will write a goddamn powershell variant that looks for a native windows build of ffmpeg on your path and retrieves one if it can’t find anything before it executes

I’ve been ffmpeggin a while now after your nods here, appreciate the script work that prompts me to tweak more of my own. :ok_hand: :keyboard:

yeah! peg away

Al ways getting Pegged

4 Likes

different approach but: ffmpeg-static-electron - npm

1 Like

I tried a free program called Xmedia Recode. Its nice. Exposes almost all of the options for H.264, allows upscaling with various scale types (bilinear, bicubic, lancoz, etc), and the resulting video files look good. Except, it pulls out a very noticeable amount of color and contrast. And I can’t figure out how to fix that.

And that’s a bummer, because its free and its features are otherwise all contained within the program itself. Doesn’t seem to need external plugins/filters. Whereas Video Enhancer 2 relies on the X.264 external encoder. Which is fine when it works. But I have always had problems with that thing. It usually starts refusing to complete files, after 3-4 encodes. And then I have to reboot or sometimes just change the output destination folder to a different one. Computers are awesome.