File size way bigger from one if i make manual compression

ZeroX4

New Member
Log file in attachment and my settings if its not in log
1728371833339.png

1728371850885.png

Issue itself

I record videos using these settings
I am happy with quality since i only need it to show how to do some stuff in game engine
So i don't need to explain it on chat and then upload it to discord which have 24mb limit size per file
I split it to 24 mb (just switched to 23) so i can fit discord file size limit per file

And i get this file out of it (just a sample) 24,5mb and 56 sec
Quality is perfectly fine with me

And i had it set to split files by 24 mb when recording
Yet it goes 24,5 mb so i could not upload it to discord
So i found this site https://www.mp4compress.com

And i generate this file out of it

3mb same 56 secs and same quality in my eyes or at least as close quality to original video that i don't need to care

What kind of magic compressed it to 3 mb?
Even if it would be 5 mb it would be awesome to me
Actually even if its some black magic i don't need to know how it is possible

All i need is to know how to record with such low file size in obs
Or how to do after recording compression with remux to mp4 if i would record to mkv

Or such magic is not possible?

I did follow a lot of youtube tutorials
But they were more aiming for low file size at best quality for long videos you upload on youtube or for your streams
Not something like i have here
Where i do not need to have best possible quality what you see in video is perfectly fine with me
 

Attachments

  • Log.txt
    8.1 KB · Views: 10

koala

Active Member
With OBS, you used rate control CBR with bitrate 3500 kbit/s. This will create a file with a fixed bitrate, so it will get a fixed size, no matter the quality. 3500kbit/s is 3500/8 kbyte/s = 437,5 kbyte/s. You created a 56 second video, so it's 437,5kbyte/s * 56s = 24500 kbyte or 24,5 MB. This is the math behind your original video.

Now you uploaded this to some video recoding service. This service recoded the video with rate control CRF with crf=28. These values can be seen by using MediaInfo.
CRF is a quality based rate control, which will remove a fixed amount of data according to the crf value. The smaller this number, the less detail removed. 0 is lossless (no data removed), 50 is a bloody mess (most data removed). The 28 they used means much data is removed and compression artifacts will be visible, but image remains ok.

Now let's see your video. You recorded desktop/office work. This is mostly static images, just every few seconds something changes. This can be compressed extremely good, because the difference between frames are zero most of the time, just a few mouse movements and some screen changes once in a while.
So CRF will just put the changed data into the video, and because this and because of the kind of footage you provided, this data is very small.
In contrast to that, your original recording was forced with a given bitrate. Even if there was nothing changed, this bitrate was enforced, the video bloated up, so in the end the video got much larger than it had to.

OBS is able to record with crf as well. Just change the video encoder in Settings > Output > Recording from "use stream encoder" to x264. Then you're able to choose the rate control, and choose crf. As CRF value, use 28 - the same as your recoding service. Create a video and compare. Adjust the CRF value until you're satisfied with the quality/size ratio.

Keep in mind quality based rate controls such as CRF is variable bitrate - they dynamically take as much bitrate as needed to satisfy the quality requirement (the CRF=xx value). A change by +-3 is about half/double the file size. And it vastly depends on the type of footage you encode. Movies or fast paced video games require vastly more bitrate, because every single frame is changed from frame to frame, which can be less good compressed than a change only once in a while like in recording some app on your desktop.
 

ZeroX4

New Member
With OBS, you used rate control CBR with bitrate 3500 kbit/s. This will create a file with a fixed bitrate, so it will get a fixed size, no matter the quality. 3500kbit/s is 3500/8 kbyte/s = 437,5 kbyte/s. You created a 56 second video, so it's 437,5kbyte/s * 56s = 24500 kbyte or 24,5 MB. This is the math behind your original video.

Now you uploaded this to some video recoding service. This service recoded the video with rate control CRF with crf=28. These values can be seen by using MediaInfo.
CRF is a quality based rate control, which will remove a fixed amount of data according to the crf value. The smaller this number, the less detail removed. 0 is lossless (no data removed), 50 is a bloody mess (most data removed). The 28 they used means much data is removed and compression artifacts will be visible, but image remains ok.

Now let's see your video. You recorded desktop/office work. This is mostly static images, just every few seconds something changes. This can be compressed extremely good, because the difference between frames are zero most of the time, just a few mouse movements and some screen changes once in a while.
So CRF will just put the changed data into the video, and because this and because of the kind of footage you provided, this data is very small.
In contrast to that, your original recording was forced with a given bitrate. Even if there was nothing changed, this bitrate was enforced, the video bloated up, so in the end the video got much larger than it had to.

OBS is able to record with crf as well. Just change the video encoder in Settings > Output > Recording from "use stream encoder" to x264. Then you're able to choose the rate control, and choose crf. As CRF value, use 28 - the same as your recoding service. Create a video and compare. Adjust the CRF value until you're satisfied with the quality/size ratio.

Keep in mind quality based rate controls such as CRF is variable bitrate - they dynamically take as much bitrate as needed to satisfy the quality requirement (the CRF=xx value). A change by +-3 is about half/double the file size. And it vastly depends on the type of footage you encode. Movies or fast paced video games require vastly more bitrate, because every single frame is changed from frame to frame, which can be less good compressed than a change only once in a while like in recording some app on your desktop.
I was reading some forum posts here to find out why my file size is so big
And all of them were more or less same as what you wrote in regards why my file size is so big
I think my mistake was not to try x264 with CRF
Cause i did try others but whatever

Anyway
I did set it to 28 i was able to record over 1m of gameplay and what you call desktop/office work around my god 3 mins

This is more than i was asking for
Even better i set it to 30 and now i got almost 2 mins of gameplay
I do not even need to test how long desktop/office work could be

I did understood all you wrote and thank you very much for it

And since i mostly need to show in video logic or how to do something
And like few secs of gameplay to prove it works
I am more than happy with result
I could easily produce 2 mins vids that are below 25 mb
Which is more than enough time i need to explain/show something

Again thank you very much for your help
 
Top