Jump to content

OBS Recording with RTX3060ti vs GTX1650S -- higher FPS = larger MP4 video recording files?

An0maly_76

I can't possibly fathom why it should matter, but I have to ask this question.

 

Using OBS, a recently completed 5900X-R9 / RTX3060ti build creates substantially larger files than it did on my previous 1700-R7 / GTX1650S rig (prebuilt). I'm talking a 2 hour recording taking maybe 3.5GB - 4.8GB on the old rig, where the new rig is generating between 17GB-48GB for the same length, which is nothing short of ridiculous. Same format (MP4) and respective video / audio sampling rates to my knowledge.

 

Among the more obvious reasons, I built the new machine because of random glitches and pauses in recordings, even when ripping DVDs. But while the glitches and pauses are much less common, they are still there, suggesting a need for a capture card, which I am looking into.

 

However, the increased file size is another problem, and I'm not sure why. Desktop and OBS resolution is 3840x2160 on the new rig, pretty sure resolution and other settings were the same on the old rig. Only thing I can think of is that the higher FPS of the RTX3060ti might mean more kbps, and therefore a larger file. Is my thinking correct here, and if so, what can I do about it? Most video sources I record aren't necessarily 4K (mostly putting my DVD collection on a hard drive), so I could always set OBS for 1080p or even 720p to match source quality. But I don't want to change my settings all the time, either.

 

Has anyone else seen this before, and if so, did you figure out why? And does anyone have any ideas about this?

Edited by An0maly_76
Revised, corrected error

I don't badmouth others' input, I'd appreciate others not badmouthing mine. *** More below ***

 

MODERATE TO SEVERE AUTISTIC, COMPLICATED WITH COVID FOG

 

Due to the above, I've likely revised posts <30 min old, and do not think as you do.

THINK BEFORE YOU REPLY!

Link to comment
Share on other sites

Link to post
Share on other sites

So generally when swapping to a new GPU and CPU, the program itself resets. I know when i used shadowplay, even adjusting the bitrate a little bit had a pretty large effect on the size of the file.

 

100% go back and check the bitrate if possible, also do note higher bitrate does not always equal better performance. For instance if you used the highest bitrate possible on shadowplay, One out of every few recordings would have some sort of Video corruption, Audio Desync, and or hitches at the start and end of the video. 

 

2nd thing id suggest is check the setting for the Resolutions. You said you checked it but i would 100% double check that. 2 hours of a recording should be MUCH higher if you were recording at 3840x 2160, i know because when i record at 2560x1440 its a much larger file size. Id imagine you were probably recording at 1080p or 720p because i dont think you could record 4k footage without having some massive hiccups on that system, let alone the file size differential.

Link to comment
Share on other sites

Link to post
Share on other sites

Please, screenshot your settings from the output and video tabs. 

 

There are many ways to change the output file size. 

Link to comment
Share on other sites

Link to post
Share on other sites

Ok, so I sorta got things twisted here, maybe. Win 10 default desktop res is 3840x2160. Previously, I had issues with gameplay recordings at lower resolution being tucked into the upper left corner, so for awhile I was matching the desktop resolution, and I think I just got that resolution stuck in my head.

 

Anyway, after the original post, I tried scaling output, apparently to 1920x1080 at 3000kbps, and did a test recording of a two-hour movie. I got distracted and left it running, rendering a 5.36 GB raw recording running 3:28 -- has some minor glitches, but it's far from terrible. It may well have auto-scaled on the last file I created. So, the fault doesn't seem to lie so much with OBS. Yes, I made a mistake. This is what happens when I don't have coffee.

 

Anyway, here's where it gets weird. I trimmed the excess in VideoPad. Lossless export gives me no resolution options other than 4K, estimated file size 67.81 GB. I get that adding resolution increases file size, but I don't understand why lossless can't be done at other resolutions? Moving on, standard export gives other resolution options -- original scaled 1920x1080 recording resolution estimates 16.95GB, 1280x720 estimates 7.35GB, 1024x576 (TV Wide) estimates 4.82 GB. I think when I saw VideoPad's estimated export output size I just assumed the raw file was about the same -- apparently that's not necessarily so. Strange that 1024x768 comes so much closer to what I was expecting after trimming than even 720p, especially with a raw output of 1920x1080. Can anyone explain this? A 5.38GB 1920x1080 recording with 90 minutes trimmed exports to a larger size (16.95GB) than it was originally unless the resolution is dropped?

 

While I get resolution being the major factor in file size, I could have sworn that for the project in question, I was recording at 3840x2160, however, I may not have been. Now, to clarify, my display is a 55" TV without smart features that can do 4K resolution but has 60hz native refresh rate, assisted by MEMC to simulate 120hz, so I don't know if that qualifies as true 4K. Either way, if native DVD resolution is only 720x480, recording DVD video to the hard drive at even 1920x1080 resolution doesn't really make sense, does it?

 

Also, Shimeji's comment about 4K recording on this system having hiccups raises another question for me (and I don't take offense, just curious). Would that be more due to RAM capacity for rendering the file on-the-fly, or simply the GPU I have? I ask because I had considered going 64GB on this system and I wondered if that was what you were getting at.

 

And per WereCat's post, here is a bundled screenshot of the requested settings. Which of the options on the downscale filter is best?

 

image.thumb.png.665bb0b55fc5aaa2c167f0a2c5b4ce42.png

 

I don't badmouth others' input, I'd appreciate others not badmouthing mine. *** More below ***

 

MODERATE TO SEVERE AUTISTIC, COMPLICATED WITH COVID FOG

 

Due to the above, I've likely revised posts <30 min old, and do not think as you do.

THINK BEFORE YOU REPLY!

Link to comment
Share on other sites

Link to post
Share on other sites

26 minutes ago, An0maly_76 said:

Ok, so I sorta got things twisted here, maybe. Win 10 default desktop res is 3840x2160. Previously, I had issues with gameplay recordings at lower resolution being tucked into the upper left corner, so for awhile I was matching the desktop resolution, and I think I just got that resolution stuck in my head.

 

Anyway, after the original post, I tried scaling output, apparently to 1920x1080 at 3000kbps, and did a test recording of a two-hour movie. I got distracted and left it running, rendering a 5.36 GB raw recording running 3:28 -- has some minor glitches, but it's far from terrible. It may well have auto-scaled on the last file I created. So, the fault doesn't seem to lie so much with OBS. Yes, I made a mistake. This is what happens when I don't have coffee.

 

Anyway, here's where it gets weird. I trimmed the excess in VideoPad. Lossless export gives me no resolution options other than 4K, estimated file size 67.81 GB. I get that adding resolution increases file size, but I don't understand why lossless can't be done at other resolutions? Moving on, standard export gives other resolution options -- original scaled 1920x1080 recording resolution estimates 16.95GB, 1280x720 estimates 7.35GB, 1024x576 (TV Wide) estimates 4.82 GB. I think when I saw VideoPad's estimated export output size I just assumed the raw file was about the same -- apparently that's not necessarily so. Strange that 1024x768 comes so much closer to what I was expecting after trimming than even 720p, especially with a raw output of 1920x1080. Can anyone explain this? A 5.38GB 1920x1080 recording with 90 minutes trimmed exports to a larger size (16.95GB) than it was originally unless the resolution is dropped?

 

While I get resolution being the major factor in file size, I could have sworn that for the project in question, I was recording at 3840x2160, however, I may not have been. Now, to clarify, my display is a 55" TV without smart features that can do 4K resolution but has 60hz native refresh rate, assisted by MEMC to simulate 120hz, so I don't know if that qualifies as true 4K. Either way, if native DVD resolution is only 720x480, recording DVD video to the hard drive at even 1920x1080 resolution doesn't really make sense, does it?

 

Also, Shimeji's comment about 4K recording on this system having hiccups raises another question for me (and I don't take offense, just curious). Would that be more due to RAM capacity for rendering the file on-the-fly, or simply the GPU I have? I ask because I had considered going 64GB on this system and I wondered if that was what you were getting at.

 

And per WereCat's post, here is a bundled screenshot of the requested settings. Which of the options on the downscale filter is best?

 

image.thumb.png.665bb0b55fc5aaa2c167f0a2c5b4ce42.png

 

If you're going from 2160p to 720p then use Lanczos but if you are downscaling 4 times exactly as from 2160p to 1080p then Bicubic will give you better results (same from 1440p to 720p).

 

Regarding your file size and video quality... I see you're using Encoder x264 which is your CPU and not your graphics card, you need to change that to NVENC (new). 

 

When set to NVENC you need to set B-frames to 2 and enable Psycho-Visual tuning. 

 

 

Regarding the Bitrate, this directly both affects the Quality and file size. 

 

For 720p 30FPS the 2500 bitrate is the bare minimum for watchable quality, for 60FPS you want to double that. 

 

I recommend at least 4000 for 30FPS and the file size should still be fine. 

For 1080p consider at the very least 6000 bitrate for 30FPS.

 

 

All this applies to CBR Rate Control... you can alternatively use CQP where instead of setting the bitrate, you set a quality value between 1 and 30 (lower its better but results in much higher file size). 

 

If you use CQP consider to stay between 20 to 25... you will have to play with it a bit to find which value works better for you. 

Link to comment
Share on other sites

Link to post
Share on other sites

So, latest results...

 

1920x1080 recording scaled down from 3840x2160 display resolution yielded 5.38GB, scaled down again to 1024x576 for export yielded a final file size of 1.17GB, a far cry from the 4.82 VideoPad estimated. I understand that some encoders compress more than others and some may reduce file size by tracking parts of the displayed image and treating those that don't change as a template -- but 3.65GB difference? What factors into such wide variances?

 

The finished file is nearly indistinguishable from the original DVD. Only thing I notice is that the black bars top and bottom (widescreen letterbox, as I understand it is called) sometimes have a bit of funny off-black designs and shapes in them from time-to-time. It's far from a deal-breaker as it is for my own purposes, but is there any way to cure this?

 

And, did I only get this level of quality by scaling back the initial high bitrate and resolution, or given the "notch-or-two from the top" setup I have, should I set OBS to scale from 3840x2160 to 1080x720p in the first place?

Edited by An0maly_76
Revised

I don't badmouth others' input, I'd appreciate others not badmouthing mine. *** More below ***

 

MODERATE TO SEVERE AUTISTIC, COMPLICATED WITH COVID FOG

 

Due to the above, I've likely revised posts <30 min old, and do not think as you do.

THINK BEFORE YOU REPLY!

Link to comment
Share on other sites

Link to post
Share on other sites

43 minutes ago, An0maly_76 said:

So, latest results...

 

1920x1080 recording scaled down from 3840x2160 display resolution yielded 5.38GB, scaled down again to 1024x576 for export yielded a final file size of 1.17GB, a far cry from the 4.82 VideoPad estimated. I understand that some encoders compress more than others and some may reduce file size by tracking parts of the displayed image and treating those that don't change as a template -- but 3.65GB difference? What factors into such wide variances?

 

The finished file is nearly indistinguishable from the original DVD. Only thing I notice is that the black bars top and bottom (widescreen letterbox, as I understand it is called) sometimes have a bit of funny off-black designs and shapes in them from time-to-time. It's far from a deal-breaker as it is for my own purposes, but is there any way to cure this?

 

And, did I only get this level of quality by scaling back the initial high bitrate and resolution, or given the "notch-or-two from the top" setup I have, should I set OBS to scale from 3840x2160 to 1080x720p in the first place?

Well, with CBR you have full control over file size. It doesn't matter whether you record 2160p or 720p at 2000 bitrate... the file will have the same size. 

The difference will be in quality, the 720p will be watchable but 2160p at 2000 bitrate will look terrible. 

 

You can change the codec from x264 to x265 (hevc) and get the same quality at roughly 40% smaller file size / bitrate for example. 

It's possible to record using HEVC in OBS but it's not accessible from the normal settings and I don't know how to access it from memory since I'm not at home right now. 

 

You would get best results with AV1 as that is a huge leap even from HEVC but even modern hardware can't use that in real time yet. 

 

 

The way you can also work around this is to record at high bitrates with x264 nvenc and then reencode to x265 nvenc hevc in Handbrake later and you should get under 1GB files for 720p and maybe even 1080p 1h long videos. 

 

Regarding the scaling, I'm honestly not sure how OBS works in regards to changing the aspect ratios since that changes quite a bit of things. 

Link to comment
Share on other sites

Link to post
Share on other sites

You should double check the color format as well ...  should be NV12,  and YCbCr 4:2:0 or 4:4:4 

 

If you're resizing by a fixed number, you can probably use bilinear or bicubic scaling

You're resizing 3840x2160  to 1280x720, so you're basically shrinking both dimensions by 3 ... which is a round, fixed number.

The resizer takes a group of 3x3 pixels and calculates the average color and outputs a single pixel... so in this scenario the bilinear algorithm should be just as good if not better than the other algorithms.

The comment in description of the Bilinear filter is mostly about scaling UP or resizing by weird ratios where new pixels have to be generated from an odd number of pixels (ex resize 1920x1080 to 1280x720  which is a resize by 1.5x) 

 

Out of those downscaling filters, Lanczos is the best in most scenarios, again if the ratio is not a fixed number (ex 1.33x or 1.5x). It's also not quite recommended if you have pixel art games (use video card's pixel scaling instead as OBS has no such option)

As you use the software x264 encoder, your other option would be to not scale in OBS and let the encoder scale.. you can use the custom parameters box to tell x264 to resize the video using its own scaling filters (and it supports more methods)

 

BUT you have to experiment and compare the outputs. 

 

So in your OBS, you've chosen x264 which is the software encoder, not the hardware encoder in the video card.

Because you chose CBR (constant bitrate) and 2500 kbps  - the quality of the video will depend on the preset you chose, in this mode the different between presets is sort of like limiting what lego pieces you have to build something :  very fast is like having access only to lines and rectangles , while -medium would also allow for L shapes or T shapes... basically slower presets give the encoder the ability to be more clever and discover ways of retaining more quality in that amount of bitrate you chose. 

So the encoder using the tools it has access to (due to the -veryfast preset) and reaches a certain size, and then goes over the image and drops detail and quality until the amount of data is below the threshold you entered, that 2500 value. 

IF you use a better preset  and/or a tuning parameter, the encoder will spend more cpu to analyze the image and pack more detail in the original size, then as it drops detail to come down to your bitrate, you'll still have more quality and detail when that bitrate is reached.

With a 5900x  and 720p resolution, you should be able to use preset --fast  without noticing any drop of performance in games, the encoder would use mostly 2-3 cores and the other cores would be available for games. 

 

 

The CBR mode is only recommended for live streaming and imposed by services, because the servers of Twitch and Youtube prefer to receive a consistent amount of data and then  recompress what you upload in several resolutions - they use hardware encoders which can recompress multiple incoming streams in real time, so they could either recompress in real time 64 x 720p 2500 kbps streams, or maybe only 16-32 x 1080p 6000 kbps streams.

 

If you record to disk, this is not the mode you want to use. You want to use CRF (constant rate factor) which is sort of like saying keep the quality level at this percentage throughout the video, without caring how much disk space it uses.  So, you say you want 95% quality, then one second could use 1000 kbps, the next second could use 5000 kbps , but throughout the video you get constant quality. 

In this mode, the preset setting has a different meaning ... no matter what preset level you use, you'll get the desired quality, but  faster presets will mean more disk space used (and a bit less cpu used). 

 

So for example, you could use preset  --ultrafast  and --crf 10  and get a 100 MB per minute of video, but you could use --veryslow and --crf10 and get 60 MB per minute of video, but same quality in the video. 

The "practically losless" is somewhere around --crf 5..8 , it's like comparing a picture saved with jpg 99% quality and jpg 96% quality - you'd have to really zoom in specific areas and flip between frames to notice difference in quality.

For reference, the default of the encoder is --crf 23   and if my memory is correct that results in around 4-5 GB for around 1h of 1080p video, when combined with the default --preset medium option. 

 

If you want to record a game and then edit it and produce a video for Youtube, the best quality you'd obtain by capturing at near lossless quality (ex --crf <10 but not 0 ) which would result in BIG files, around 50-80 GB per hour of 1080p content, maybe even more.

Then, you can import that in a video editor, edit and compress to x264/x265/vp9/av1  in  variable bitrate mode 10-25mbps for 1080p and with a high quality preset  (ex --slower --tune film/animation depending on game)  and you'll get maybe 3-5 GB per hour of 1080p content. 

 

Link to comment
Share on other sites

Link to post
Share on other sites

So, what I get out of this is that CBR isn't necessarily best, but more stable if set higher, and VBR is best for a good balance of quality vs file size, but that CRF is best for recording to disk overall. Also that for decent quality, 3500-5000bps is the minimum. Is this correct?

 

Mind you, I'm not stuck on the x264, I just wasn't aware the hardware encoding was better. I'm not a stickler for file size so much as quality, but I don't want my movie recordings being 15-45GB each, either. I don't think 3GB for a 2 hour movie is unreasonable, but I was getting decent quality with VLC recordings at about 2.2GB per hour. BUT -- I had occasional glitches that could usually be edited, but sometimes ruined the recording because they couldn't. Almost like a skip in the DVD that I know was not there. My guess is this was VLC using a CBR that occasionally had to think too long while sampling. I'm guessing the GTX1650S in the old rig didn't help either. Not a bad card, but just didn't have enough horsepower for consistent quality recording, especially with games.

 

It really sounds like VBR or CRF is the way to go, then. Thanks. Although, I'm pretty amazed at the quality I got tonight, considering I was cramming 2:02 of video into 1.17GB. That's crazy. It does sound like VideoPad overestimates the final file size though, and that's a good thing.

I don't badmouth others' input, I'd appreciate others not badmouthing mine. *** More below ***

 

MODERATE TO SEVERE AUTISTIC, COMPLICATED WITH COVID FOG

 

Due to the above, I've likely revised posts <30 min old, and do not think as you do.

THINK BEFORE YOU REPLY!

Link to comment
Share on other sites

Link to post
Share on other sites

CBR is not the best. 

It forces the encoder to use a fixed amount of data each second, and therefore the quality will vary throughout the video.  For example, when you have a game paused or in the menus, it's mostly a static image that doesn't change a lot, so that will compress well, but next few seconds you could press Escape to exit the game menu and start shooting or explode something, which requires A LOT of bits to encode, otherwise you get artefacts on the screen.

Encoders try to improve this by using a sort of buffer of a few seconds, and they can "burrow" bits from some seconds to use more bits for other seconds and still get that constant bitrate...

 

CRF is "I only care about quality and not disk space" option and VRB is "keep the most quality within some amount of disk space. as in ... "you may use up to this much but make the best decisions to allocate the most amount of disk space to where human eyes would most easily notice quality degradation" 

 

So with VBR for example, say you have it configured at 10..25 mbps (that's 1.2-3 MB/s) ... the encoder sees the 5 seconds you're in the game menu with little change just your mouse moving over some menu options or whatever, and then it detects 2-3 seconds of shooting and explosions ... so even though it could use 25 mbps in the menu portion it may determine that 15 mbps would probably a good enough quality for a static scene, and saves the rest to use when compressing the explosions.  You get 15 mbps in menu, you get 40-50 mbps at explosion, but on average you get 10-25 mbps. 

 

The CRF is like "waste disk space but keep as much quality as possible, I don't care about disk space because it's not the final version or the version I'm gonna archive, I'm going to recompress this to something that uses less disk space" 

You capture this in real time, using as little CPU as possible, and not affect the game by using too much CPU... and then you can choose the highest quality presets and variable bitrate and let the encoder think a lot about what to drop, what to keep, how to squeeze as much quality in the video... depending on settings it could take 2-3 hours to encode 1 hour of video.

if you use x265 or AV1 (but these work best with 1080p or higher resolutions), that could be even more time, like 5-10 hours of compression time for 1h of video, maybe even more.

 

The hardware encoders are not "better", they're good enough that you could use them for live streaming and otherwise they're not as configurable as a software encoder and are limited in how much quality they can retain. They're more optimized towards real time encoding, not quality. 

They're comparable with preset -medium  or -slower in x264 while x264 has more quality presets that could produce better image quality using more cpu, and x264 or x265 or av1 can make better choices when you're using VBR modes.

Link to comment
Share on other sites

Link to post
Share on other sites

So it sounds like for movies, I am in that CRF comfort zone, because I know I'll be having to trim excess and export to another with the opportunity for compression. Whereas for gameplay videos VBR might give a slight file size advantage over CRF.

I don't badmouth others' input, I'd appreciate others not badmouthing mine. *** More below ***

 

MODERATE TO SEVERE AUTISTIC, COMPLICATED WITH COVID FOG

 

Due to the above, I've likely revised posts <30 min old, and do not think as you do.

THINK BEFORE YOU REPLY!

Link to comment
Share on other sites

Link to post
Share on other sites

54 minutes ago, An0maly_76 said:

So it sounds like for movies, I am in that CRF comfort zone, because I know I'll be having to trim excess and export to another with the opportunity for compression. Whereas for gameplay videos VBR might give a slight file size advantage over CRF.

Yes, CRF is better for movies typically since you set priority for quality and with CBR you controll the amount of data you want to get at max (but you can also control the quality with it once you're comfortable with it and know what you're doing), which is important for streaming where CRF may overshoot the limit of Twitch service for example.

Link to comment
Share on other sites

Link to post
Share on other sites

  • 3 weeks later...

I always use "CQP" ¯\_(ツ)_/¯ … everything else looks like hot garbage and it will adjust bitrate on the fly… that way some content can have really low bitrate while still looking good… and when it goes overboard with the bitrate (50k+) i just use shutter encoder (again with CQP ~25 typically) to lower the bitrate and still looks good… 

 

obs-----10lj49.png.f1a8476c94c40bc86def1b1b8d4a944a.pngobs-----2qtjb3.png.948dd2a9cbb16640e5b7df2befe8a68e.pngobs-----33gjqx.png.7c51a7c2719eb5462790b7ffd42a5a47.png

The direction tells you... the direction

-Scott Manley, 2021

 

Softwares used:

Corsair Link (Anime Edition) 

MSI Afterburner 

OpenRGB

Lively Wallpaper 

OBS Studio

Shutter Encoder

Avidemux

FSResizer

Audacity 

VLC

WMP

GIMP

HWiNFO64

Paint

3D Paint

GitHub Desktop 

Superposition 

Prime95

Aida64

GPUZ

CPUZ

Generic Logviewer

 

 

 

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×