Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
|
|
|
|
#1 | Link | |
|
The man
Join Date: Oct 2001
Location: Sweden
Posts: 25
|
Quote:
My command line: ffmpeg.exe -i "input.avs" -c:v libx264 -profile:v high -bf 2 -g 25 -refs X -preset veryslow -crf 18 -pix_fmt yuv420p -movflags faststart "output.mp4" I just changed the number of ref frames. 15 ref frames, corruption: https://youtu.be/ul4BkEtCtps 14 ref frames, corruption: https://youtu.be/QLBlqoV6KxY 13 ref frames, corruption: https://youtu.be/JarNcaMm5n0 12 ref frames, no corruption: https://youtu.be/kHEHzIIWQ2g So it seems like the h264 decoder that Youtube uses has problems with a higher number of ref frames. Isn't that weird, I would guess that they would use I high "quality" decoder? Can it be because of performance? I lower quality decoder can be faster? Thank you for your help! |
|
|
|
|
|
|
#2 | Link | |
|
Registered User
Join Date: Dec 2013
Posts: 148
|
Quote:
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. |
|
|
|
|
|
|
#3 | Link | ||
|
The man
Join Date: Oct 2001
Location: Sweden
Posts: 25
|
Quote:
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:
|
||
|
|
|
|
|
#4 | Link | |
|
Registered User
Join Date: Dec 2013
Posts: 148
|
Quote:
Regarding the level the stream is correct then. However if you look at the evolution of the H.264 standard here: https://www.itu.int/itu-t/recommenda...aspx?rec=14659 in appendix A, Table A-1, the level limits... H.264 (V10) (02/2016) does not list a level higher than 5.2, like, there is no level 6.0 or higher. H.264 (V11) (10/2016) does list level 6 and higher. So higher resolutions and higher DPB sizes got first added in October 2016. So maybe decoders done before ~10/2016 are somewhat untested with Levels limits above 5.2, who knows. I wonder what would happen if one uploads some crafted 1440p video which uses 16 ref frames and then only references ref frames whose size exceed the level 5.2 limits to youtube. Maybe one would be able to dump some hardware reserved memory of the youtube server ? maybe the job crashes the youtube decoder and breaks something ? I am eager to find out but at the same time am somewhat scared that Youtube might get grumpy when messing with their setup. For x265 I'd just use "-preset slow" or slower and "-tune ssim" with some nice high bitrate or low crf. Oh and I'd specify a level. Maybe Level 5 High Tier like some UHD Bluray ? |
|
|
|
|
![]() |
|
|