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. |
|
|
Thread Tools | Search this Thread | Display Modes |
27th August 2020, 11:58 | #1 | Link |
Registered User
Join Date: Aug 2006
Posts: 3
|
Prevent zero-latency mode from creating very large keyframes
I am using zero-latency encoding.
In my test case, the encoder input does not change. The first frame of first GOP was allocated about 20% of our 4mbps budget. This seems reasonable. The first frame of the second GOP however is allocated 80%(!!) of our 4mbps budget. Even if the connection speed is double (8 mbps), this still means we've introduced a latency of 400 milli? Is there some way to adjust this by configuration? bandwidth 4000000 (4 mbps) preset ultrafast tune zerolatency slices 4 x264opts no-mbtree:sliced-threads:sync-lookahead=0 gop_size 100 max_b_frames 0 refs 0 |
27th August 2020, 18:22 | #2 | Link | |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Quote:
You could try setting --minqp 8 or something, which would cap the worst case frame size. Reducing --ipratio might help if that was insufficient. Using something slower than --preset ultrafast can help as well. Unless you're running on some low-powered embedded system or something, even --faster is really fast on reasonably current hardware. And using --slices 4 suggests you have multiple cores available. If performance is so tight as to require ultrafast, I'd also see if there is some kind of HW encoder that could be used instead. Those often have low-latency modes that can provide quality as good or better quality as --preset ultrafast, and are probably better-tuned for videoconferencing like scenarios. Some more info on content and scenario likely would enable more focused suggestions . |
|
27th August 2020, 18:54 | #3 | Link |
Moderator
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
|
Also, have you set --maxrate and --vbv-bufsize to properly conservative values for your secenario? That's essential! Otherwise x264 is going to target a specified ABR without worrying much about how those are distributed over the file.
|
27th August 2020, 23:24 | #4 | Link |
Registered User
Join Date: Aug 2006
Posts: 3
|
Hi Ben.
Thanks very much. Your response mentioning the VBV and asking about the slices reminded me that Dark Shikari spelled it all out in this blog post. http://x264dev.multimedia.cx/archives/249 I had configured for multiple slices because I had remembered that slices is what allows X264 to distribute refreshes accross multiple frames. But I forgot the –intra-refresh flag and the VBV limits. |
Tags |
low-latency, zero-latency |
|
|