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.

 

Go Back   Doom9's Forum > Video Encoding > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 23rd February 2021, 02:55   #1  |  Link
iAvoe
Registered User
 
Join Date: Sep 2017
Posts: 18
Equation as parameter values in x264

Hi, I came across the option rceq='blurCplx^(1-qComp)' (involves 2 option values), and thought about the possibility of using equations as parameter value since x264 is not going to get major updates, I believe some coding can be added in source code to adapt this idea.

There are 3 options that usually requires manual calculation:
--rc-lookahead <multiple of fps (round)>
--keyint <multiple of fps (round)>
--min-keyint <dividing keyint (round)>

For example:
--rc-lookahead 3×fps
--keyint 9×fps
--min-keyint max(0.5×keyint, 1)

I have no idea about coding, so this question is more like a silly feature request for random people, but that would be a good improvement tho

Last edited by iAvoe; 23rd February 2021 at 03:00. Reason: grammar fix
iAvoe is offline   Reply With Quote
Old 23rd February 2021, 19:21   #2  |  Link
benwaggoner
Moderator
 
Join Date: Jan 2006
Location: Portland, OR
Posts: 4,770
This is an excellent suggestion! A simple implementation would require CFR so fps is known in advance.

From a parsing perspective, appending "sec" to the end of the int or float should be straightforward. So --keyint 5sec for a 5 sec keyint.

What do to about fractional framerates could be a little harder, ala 29.97 (really 30,000/1001). Using whole number seconds would periodically result in a GOP one frame shorter than the rest.

Perhaps "dropsec" for drop-frame seconds, so with both 30 and 29.97, you'd get a keyframe every 150 frames?
__________________
Ben Waggoner
Principal Video Specialist, Amazon Prime Video

My Compression Book
benwaggoner is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.