I'm about to stress test YouTube encoders. I'm currently encoding 10 minutes of grayscale static at 2880x2160/60fps. I'm using x264 with a crf of 20 and getting just under 1.2 Gbps

-c:v libx264 -crf 20 -preset fast -x264-params cabac=1:bframes=0:keyint=30:min-keyint=30:scenecut=0 -g 30 -pix_fmt yuv420p10le

I turned off bframes because they weren't being used and it more than doubles encode speed. Turning off scene detection also increased performance and there weren't any scene cut iframes being placed so it shouldn't have any impact but speeding up encoding. I'm not using -pix_fnt gray10le because while it should be supported since it's included in the profile I don't know that it is for sure and I'd hate to have to reencode the video. As long as the video going in is grayscale then there shouldn't be a lot of practical differences anyway.

However now I kind of want to test it just to see if it'll work.

Anyway I'm curious just how heavily they'll compress my video.

@j From what I've seen of random videos that like to use TV static randomly edited in for effect, YouTube absolutely murders it.

Follow

@j Haven't checked any 4k videos of static, so can't say that I know. But I doubt the bitrate YouTube provides is worthy of being called 4k. Your video would probably fare better I guess if you open it on a relatively small screen (meaning an average monitor). But I think that on a large TV, the low bitrate might be more obvious.

· · Web · 1 · 0 · 2
@alyx so initial test was h264 120fps grey10le clip that was 5 minutes, 689 Mbps, and 24.1 GiB in size.

This help article seemed to suggest that 120fps might work:
https://support.google.com/youtube/answer/6124459

What YouTube spat out was yuv240, vp9, 60fps, 381 Mbps, 13.3 GiB

YouTube seems to have done a good job preserving all of the noise at 4k. It's artifact city at the lower resolution.

That's wild.

What's also cool is you can see what each resolution is capped at. 1440p seems to be capped at 65 Mbps while 1080p appears to be capped at 10Mbps. It also shows how YouTube is phasing out h264. They really only put effort into their 1080p h264 stream which makes sense as it's likely the most popular of the h264 streams by far.

I wonder if different frame rates have different bitrate caps.

But yeah 4k seems to get crf with no vbv cutoff limit.
@j @alyx 136+140 is what I use for archiving. They started auto translating audio tho so you've got to always check formats first
@eee @alyx yes I've run into that too. English seems to always be the highest number on the list. The video number changes depending on the frame rate of the video.
@j @eee @alyx always avoid opus and vp9 codecs, they’re shit and always transcodes from the original, used to be the case if you upload audio as 128 k AAC LC stereo jewtube won’t touch it
@TeaTootler @alyx @eee lol what? No opus is far superior to aac and pretty much everything supports it these days. Opus is a really good codec. I use it for 6 and 8 channel surround sound too.

@j That's honestly impressive. I didn't think it was gonna keep (for the 4k stream) even bitrates comparable to what you find for 1080p bluray discs (30-40Mbps). Only reducing it by about half is way more than I expected.

@alyx @eee @RedTechEngineer this input was the same set of images only encoded at 60fps producing a 10 minute long clip that was 38.5 GiB and 551 Mbps.

It looks like despite 120fps getting dropped to 60fps it will still influence what the max bitrate of the video can be. So if you're posting 60fps content just duplicate every other frame before you upload it to YouTube and you'll unlock higher quality video at resolutions lower than 4k.

This video was also encoded in yuv420p10le instead of grey10le but I don't think that would influence the bitrate.

However this time with my input being higher quality the 4k video bitrate is also higher and since half the frames aren't being dropped it's bigger now too.

I think it's wild that I got YouTube to encode a video at 515 Mbps.

Well now obviously I have to see how far I can push this. So far the higher quality I encode the noise at the higher the bitrate YouTube generates.

Can I get YouTube to encode a 4k video at 800+ Mbps? Probably. I'm going to aim for that next.

4K YouTube video that requires gigabit fiber or 5G to watch. 500Mbps isn't enough to watch it without buffering.
@alyx @RedTechEngineer @eee @TeaTootler this time my upload was 1.25 Gbps I doubt going higher will have much more impact.

Well I didn't hit 800Mbps but I got to within a 1080p blueray's bitrate to 600 so I'll take that as a win. You definitely can't play it on only a 500Mbps Internet connection without buffering.

40 GB is like 2 HD Blu-ray movies for only 10 minutes of video. That's crazy.
@RedTechEngineer @alyx @TeaTootler @eee nah libx264 decided it's L5.2

*** General
Complete name: static.mp4
Format: MPEG-4
Format profile: Base Media
Codec ID: isom (isom/iso2/avc1/mp41)
File size: 87.3 GiB
Duration: 10 min 0 s
Overall bit rate: 1 250 Mb/s
Writing application: Lavf61.1.100

*** Video
ID: 1
Format: AVC
Format/Info: Advanced Video Codec
Format profile: High 10@L5.2
Format settings: CABAC / 5 Ref Frames
Format settings, CABAC: Yes
Format settings, Reference frames: 5 frames
Format settings, GOP: N=1
Codec ID: avc1
Codec ID/Info: Advanced Video Coding
Duration: 10 min 0 s
Bit rate: 1 250 Mb/s
Width: 2 880 pixels
Height: 2 160 pixels
Display aspect ratio: 4:3
Frame rate mode: Constant
Frame rate: 60.000 FPS
Color space: Y
Bit depth: 10 bits
Scan type: Progressive
Bits/(Pixel*Frame): 3.349
Stream size: 87.3 GiB (100%)
Writing library: x264 core 164
Encoding settings: cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=7 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=0 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=-2 / threads=36 / lookahead_threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=0 / weightp=2 / keyint=30 / keyint_min=3 / scenecut=40 / intra_refresh=0 / rc_lookahead=30 / rc=crf / mbtree=1 / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=81 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Color range: Full
Codec configuration box: avcC

*** Audio
ID: 2
Format: AAC LC
Format/Info: Advanced Audio Codec Low Complexity
Codec ID: mp4a-40-2
Duration: 10 min 0 s
Source duration: 10 min 0 s
Bit rate mode: Constant
Bit rate: 384 kb/s
Channel(s): 2 channels
Channel layout: L R
Sampling rate: 48.0 kHz
Frame rate: 46.875 FPS (1024 SPF)
Compression mode: Lossy
Stream size: 27.5 MiB (0%)
Source stream size: 27.5 MiB (0%)
Language: English
Default: Yes
Alternate group: 1

The number of reference frames is irrelevant because the whole thing is nothing but I frames.
@RedTechEngineer @alyx @eee @j fuck my brain doesn’t work today, I always uploaded flac to jewtube since they transcode to 128 k AAC
@TeaTootler @RedTechEngineer @alyx @eee that's the file I uploaded and the audio codec and bitrate they recommend
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.