Need help with export file options (reducing file size)

I have a good quality video. As example Codec: H264 - MPEG-4 AVC (part 10) (avc1), BPS 23833, Size 25.0 GB.
I need simply recode it to reducing file size to approximately 2.5 GB with as Much as can better quality.
Please help me with options.
Should i use a default preset like H.2164 High profile (how i can regulate file size in this case)?
What custom options in Advanced/Codec is the best in my case?
Should i reduce Resolution or FrameRate?

My Tip:
You need to switch the codec h264 is not the most efficient codec.
Take h265 (HEVC), vp9 (about 40% reduction) or better the newer AV1 (about 30% better than h265).
Codec change lowers the size of the video to 42% of the h264 code size.
If you can half your framerate than do it!
With export goto advanced reduce the output resolution with interpolation bicubic better and reduce the even the aac audio bitrate to 96-128kBit. (This is still similar or better than 320kBit mp3).

If you want a specific size you should use the average bitrate mode in the advanced options, but you first need to do a quick division to calculate the needed bitrate which depends on your video length:
2500 MB * 8 / length → 20000 / (length in seconds) and write the result in the Bitrate field followed by M

example: if your video is 15 minutes then divide by 15*60 = 900 (seconds) so 20000/900 = 22.22 → type 22M in the bitrate field

image

As alex suggests, using a better codec will yield better results but expect longer export time (5x time). I recommend x265 (av1 is better but only very powerful or new devices can play it, my 2 year old tablet can’t play it at all). Also make sure hardware encoding is NOT enabled, hardware will be faster but will create a bigger file, you want the opposite.

@alex007 @daniel47 Thanks for answers. Unfortunately I’m not familiar with AV1 but it sounds good.

It is not a problem for me.

It could be a problem. Need investigation from my side.

I’ve read that it is a bad codec in terms of quality and better to avoid using him.

Is it also powerful like AV1?

Shotcut has three codecs av1_amf, av1_nvenc, av1_qsv. What are the differences? What should i use in my case?

What about these options
image
should i change anything?

Those are the hardware accelerated versions for AMD, Nvidia and Intel, you want the generic CPU one libaom-av1. It is in the preset list for quick finding:

image

But I warn you, it is VERY, very slow to do AV1. Try to do a test 10second export using a ranged marker first.

I don’t know why you heard h265 is bad, you could still give it a try. It does very well at small filesizes. I personally use 95% of the time h265, otherwise go h264.

av1_amf: HW Accelleration from new AMD cards
av1_nvenc: HW Accelleration from NVIDIA 40** cards
av1_qsv: HW Accelleration from Intel ARC cards

The HW codecs from NVIDIA do provide a good compression and video quality, only the old vaapi codecs from old Intel cards do provide worse quality.
For best compression the radio limited color space has to be chosen.
So far I know all HW-Accellerator do provide the standard compressed color spaces but the do not provide the resource demanding 4:2:2 10 Bit color space.

For compability h265 is fine for best results AV1 is needed.
It takes about 10 years until a new standard is broadly accepted!