Avidemux Forum

Avidemux => Windows => Topic started by: sauv0168 on July 24, 2020, 05:45:09 PM

Title: How to change reference frame settings?
Post by: sauv0168 on July 24, 2020, 05:45:09 PM
Hello,
After doing some research I would like to try encoding sports with lower reference frames (probably 2) however I don't understand the settings. I also tried to look for documentation that explains the settings but I can't find or I don't understand what I'm reading.

Any help would be appreciated.
Title: Re: How to change reference frame settings?
Post by: eumagga0x2a on July 24, 2020, 06:00:55 PM
What problem do you try to solve? Some hardware player not liking the output of the x264 (or x265?) encoder with default settings? Why do you think it is just due to the number of ref frames?
Title: Re: How to change reference frame settings?
Post by: sauv0168 on July 24, 2020, 06:14:14 PM
I am simply trying to bring the ref frames down to 2 instead of the default 4 for Sports as I've read that this can make fast motion smoother.

The problem I am trying to solve is finding where to change the setting to achieve this.
Title: Re: How to change reference frame settings?
Post by: eumagga0x2a on July 24, 2020, 06:21:26 PM
Quote from: sauv0168 on July 24, 2020, 06:14:14 PM
I've read that this can make fast motion smoother.

This is complete nonsense.

The default in Avidemux for x264 is 3 ref frames. If you re-encode, it will always worsen the quality of the video. If the video is interlaced, you need to add a deinterlacing filter which will double the frame rate. This will greatly improve smoothness of fast motions.
Title: Re: How to change reference frame settings?
Post by: sauv0168 on July 24, 2020, 06:36:26 PM
Thank you for your opinion. I appreciate the responses and understand that your position is that I do not need to know where the setting is, however, where is the setting for changing the ref frames?
Title: Re: How to change reference frame settings?
Post by: sauv0168 on July 24, 2020, 06:44:42 PM
I would like to add that for reducing file size of animation 16 ref frames is often used. This is another reason I would like to know where the setting is.
Title: Re: How to change reference frame settings?
Post by: sauv0168 on July 24, 2020, 06:56:31 PM
I realize I have not been very clear in my question so I will attempt to give more context.

I have attached the settings that I have (should be defaults) and the resulting MediaInfo that shows 4 ref frames.

If the default is 3, but the result is 4, why?

If I want to use 16 ref frames for animation, what setting must I change?

If I want to use 2 ref frames for sports (now knowing that it might be nonsense), what setting must I change?
Title: Re: How to change reference frame settings?
Post by: eumagga0x2a on July 24, 2020, 07:19:54 PM
Quote from: sauv0168 on July 24, 2020, 06:56:31 PM
I have attached the settings that I have (should be defaults) and the resulting MediaInfo that shows 4 ref frames.

If the default is 3, but the result is 4, why?

In MediaInfo the value shown as Ref Frames is ref + b_pyramid with max of 16. Disable b_pyramid and it will match what the encoder does.

QuoteIf I want to use 16 ref frames for animation, what setting must I change?

Set it in the "Maximum Reference Frames" spinbox. But honestly, don't do that. Almost no hardware decoder will be able to decode such a stream.

QuoteIf I want to use 2 ref frames for sports (now knowing that it might be nonsense), what setting must I change?

As explained above.
Title: Re: How to change reference frame settings?
Post by: sauv0168 on July 24, 2020, 11:19:14 PM
Thanks, that answer leads me in the right direction.