There seems to be a general issue with BF4/recorded video becoming stuttery while using OBS. I've done some extensive testing and will continue to do so with every promising release of OBS. What I have found out so far:
-Stuttering is caused by varying frametimes of GPU, not CPU
-When the maximum of the framtimes comes close to the rate you are recording/streaming at, frames will be dropped/duped, effectively giving you things like 45 fps instead of 60
-Things that do no seem to influence it: encoder or encoder settings, bitrate, CBR/VBR, buffer. Unless I am actually CPU bound, x264 fast is just as good as QSV TU7 main profile or NVENC
-user.cfg or console commands, unless they actually significantly improve your framerate
-Messing around with thread priorities, affinities and hyperthreading did not do anything.
The only ways to alleviate the issue I am aware of are:
-Making sure your setup is fast as hell. Recording 1080p60 when I would get 80 fps without OBS does stutter, much better when I could get 90 or even 100 fps. Being able to run much faster than the target framerate is good.
-Limiting framerate or Vsync can help, but it does not help all the time. Basically some scenes will always stutter, some might randomly start/stop stuttering when your framerate is limited.
-Reducing the video frame size seems the only workaround on OBS side, same goes for framerate. Apparently once too many pixels/second have to be processed, things will go awry. Note that the resampling filter does not matter. Bilinear or Lanczos, no difference. Maybe this helps one of the devs to track down the exact problem.
As a side note, I have seen many stupid/useless/outright bad user.cfg files. Here is an example of a good user.cfg:
Explanation:
Line 1: Limits your fps to 60 (orly), which at least helps to reduce stuttering for me a little. If you want to limit your fps, I'd recommend you monitor's refresh rate.
Line 2: fps counter in top right corner
Line 3: Draws some screen info (API, display and internal resolution, number of threads), is useful for some stuff, however the # disables the command
Line 4: Draws CPU and GPU rendering in bottom left corner, useful diagnosing stuttering. Also disabled by the #, as it has annoying qualities for regular playing.
Line 5: This is the only command that actually has a meaningful impact on your framerate and is not accessible via the menu. Default would be 1, on my PC 0 tends to be better. Depends on PC and map. No difference in rendered image.
Other commands are usually stupid (do you really think the user interface is turned off by default?), removed, pointless or can even reduce your performance significantly.
If you have ideas regarding the stuttering, post them please. If you are a dev and think you can help, I will happily provide you with all information you desire and will also test the shit out of every build.
-Stuttering is caused by varying frametimes of GPU, not CPU
-When the maximum of the framtimes comes close to the rate you are recording/streaming at, frames will be dropped/duped, effectively giving you things like 45 fps instead of 60
-Things that do no seem to influence it: encoder or encoder settings, bitrate, CBR/VBR, buffer. Unless I am actually CPU bound, x264 fast is just as good as QSV TU7 main profile or NVENC
-user.cfg or console commands, unless they actually significantly improve your framerate
-Messing around with thread priorities, affinities and hyperthreading did not do anything.
The only ways to alleviate the issue I am aware of are:
-Making sure your setup is fast as hell. Recording 1080p60 when I would get 80 fps without OBS does stutter, much better when I could get 90 or even 100 fps. Being able to run much faster than the target framerate is good.
-Limiting framerate or Vsync can help, but it does not help all the time. Basically some scenes will always stutter, some might randomly start/stop stuttering when your framerate is limited.
-Reducing the video frame size seems the only workaround on OBS side, same goes for framerate. Apparently once too many pixels/second have to be processed, things will go awry. Note that the resampling filter does not matter. Bilinear or Lanczos, no difference. Maybe this helps one of the devs to track down the exact problem.
As a side note, I have seen many stupid/useless/outright bad user.cfg files. Here is an example of a good user.cfg:
Code:
gametime.maxvariablefps 60
perfoverlay.drawfps 1
#Render.DrawScreenInfo 1
#perfoverlay.drawgraph 1
worldrender.lighttilecspathenable 0
Line 1: Limits your fps to 60 (orly), which at least helps to reduce stuttering for me a little. If you want to limit your fps, I'd recommend you monitor's refresh rate.
Line 2: fps counter in top right corner
Line 3: Draws some screen info (API, display and internal resolution, number of threads), is useful for some stuff, however the # disables the command
Line 4: Draws CPU and GPU rendering in bottom left corner, useful diagnosing stuttering. Also disabled by the #, as it has annoying qualities for regular playing.
Line 5: This is the only command that actually has a meaningful impact on your framerate and is not accessible via the menu. Default would be 1, on my PC 0 tends to be better. Depends on PC and map. No difference in rendered image.
Other commands are usually stupid (do you really think the user interface is turned off by default?), removed, pointless or can even reduce your performance significantly.
If you have ideas regarding the stuttering, post them please. If you are a dev and think you can help, I will happily provide you with all information you desire and will also test the shit out of every build.