[x264-devel] x264 level for 1080i content

BugMaster BugMaster at narod.ru
Thu Jun 23 19:26:15 CEST 2016


On Thu, 23 Jun 2016 12:13:04 +0200, Weasel Friend wrote:
> Hi,

> today I tried to encode interlaced content with 1920x1080 and 4Mbps
> and was wondering why x264 auto detects level 5.2 for it. When doing
> the same settings but with progressive output the level is detected
> as 5.0. As of my understanding DPB should not be affected by interlaced content?

> x264 command I used:
> x264 - --demuxer y4m --profile main --preset slow --bitrate 4000 --bff --output video.h264

> Relevant output with --bff
> y4m [info]: 1920x1080i 1:1 @ 2997/100 fps (cfr)
> x264 [warning]: interlace + weightp is not implemented
> x264 [warning]: interlaced (1) > level limit (0)
> x264 [info]: profile Main, level 5.2

> Relevant output without --bff
> y4m [info]: 1920x1080p 1:1 @ 2997/100 fps (cfr)
> x264 [info]: profile Main, level 5.0

> I know I can restrict the level to 5.0 but I am curious if there
> are any additional level requirements for interlaced content that I missed?

> Thanks

Hi. I am dunno if this can be counted as x264 bug. You should specify
`--level 4.1` or `--ref 4` in this case. Here why it happens:
1) you use `--preset slow` which have default ref=5;
2) you didn't specified `--level` so x264 do NOT try to reduce ref
count (because it doesn't know to which level);
3) x264 tries to find level that allow specifed DPB (with ref=5) but
because levels from 1.0 to 4.2 don't allow such DPB we skip them;
4) but we skip levels from 5.0 to 5.1 too because the last level that
allowed interlaced encoding was level 4.1;
5) so we stop at level 5.2 because it is the last one we check and we
need to specify some level anyway (even thou level 5.2 also doesn't
allow interlaced encoding).



More information about the x264-devel mailing list