View Single Post
Old 12th April 2022, 09:01   #10  |  Link
ZeB
The man
 
Join Date: Oct 2001
Location: Sweden
Posts: 25
Quote:
Originally Posted by rwill View Post
Well, 2560x1440 has 14400 Macroblocks.

H.264 Level 5.2 supports a decoded picture buffer size of up to 184320 Macroblocks, so at your resolution 12.8 ref pictures.

The next level (6.0) supports a DPB of 696320 ( so 48.35 ref pictures of your resolution ).

Maybe your stream does not have the correct level set ? Or youtubes H.264 decoder initializes at Level 5.2 for whatever reason ? I don't know if they are using hardware or software decode - a hardware decoder could explain such behavior.
That makes a lot of sense. The encode reports as "High@L6" in Mediainfo. So the stream is correct, right?

I guess that level 5.2 (12 ref frames) is the maximum recommended when encoding for Youtube.

Command line:
ffmpeg.exe -i "input.avs" -c:v libx264 -profile:v high -level:v 5.2 -bf 2 -g 25 -preset veryslow -crf 18 -pix_fmt yuv420p -movflags faststart "output.mp4"

This works without any corruption.

No mentions of levels in their own guide, just profile "high":
https://support.google.com/youtube/answer/1722171

Quote:
Originally Posted by benwaggoner View Post
You don't want to exceed the number of reference frames for your profile, level, and frame size listed here: https://en.wikipedia.org/wiki/Advanc..._Coding#Levels. Level 4.2 is generally quite safe to use these days. As said, if you want to go above 1080p, I'd suggest using x265 and HEVC.
If using x265, what settings is recommended? When searching information everyone just seems to recommend h264 instead. Youtube also recommends h264 in the "official" guide. It just mentions that h265 is supported.
ZeB is offline   Reply With Quote