AlexFolland
New Member
Hello! This isn't a question or request for help, but the thread asked for a prefix and there's no "general discussion" forum. I want to post this thread to help people who were having as much trouble as I was finding information about this topic. It took a lot of research to figure all this out.
I have previously had problems in OBS Studio trying to record 1920×1200 @ 60 fps in real time, as the entire CPU would be used, so the game was unplayable and the resulting video was very laggy. My only workable method was to use MagicYUV (proprietary but fast codec) in DxTory and not use OBS, but that was a bummer because I couldn't include other sources at the same time and all the other nice perks OBS provides. In OBS, I'd tried all the different available codecs with their corresponding lossless settings: ffvhuff (said to be extremely well optimized), UT Video (similarly said to be fast), Lagarith (known to be slow, but might as well try), HuffYUV, ZMBV, libx264rgb, and libx264. It seemed like nothing was fast enough, despite my CPU being pretty good and MagicYUV in DxTory working wonderfully with tons of CPU headroom.
Just now, I seem to have solved the problem in OBS with some arcane voodoo involving scary-looking ffmpeg command line parameters, and I don't think the problem was ever the codec. My hypothesis is that it was software color conversion, which is very slow! I read somewhere in my restless research that ffmpeg and/or libx264 invokes swscale and asks it to do heavy color conversion back-and-forth operations for no good reason unless it is told what the input color space is.
I think using the following parameters prevented these slow software color conversions, which allowed it to record at full speed using only 6 of my 8 available CPU cores:
Edit: I've changed some of these settings for the better. See https://obsproject.com/forum/thread...20×1200-60-fps-for-youtube.64735/#post-279686 for more details. These screenshots and settings remain here only for historical purposes.
After setting all those options just like that (particularly the "Video Encoder Settings" line), everything clicked and suddenly my game could play smoothly and the resulting video looked like an exact copy of the gameplay except with chroma subsampling!
The reason I want to record lossless video for YouTube is that YouTube transcodes all video it's given to its own lossy streaming formats, including YUV 4:2:0 which has chroma subsampling. For minimal quality loss on YouTube, one must upload lossless video.
Here are the settings I used, in case the pictures above are gone in the future and/or you want to copy what I did:
Edit: I've changed some of these settings for the better. See https://obsproject.com/forum/thread...20×1200-60-fps-for-youtube.64735/#post-279686 for more details. These screenshots and settings remain here only for historical purposes.
I hope this helps someone!
I have previously had problems in OBS Studio trying to record 1920×1200 @ 60 fps in real time, as the entire CPU would be used, so the game was unplayable and the resulting video was very laggy. My only workable method was to use MagicYUV (proprietary but fast codec) in DxTory and not use OBS, but that was a bummer because I couldn't include other sources at the same time and all the other nice perks OBS provides. In OBS, I'd tried all the different available codecs with their corresponding lossless settings: ffvhuff (said to be extremely well optimized), UT Video (similarly said to be fast), Lagarith (known to be slow, but might as well try), HuffYUV, ZMBV, libx264rgb, and libx264. It seemed like nothing was fast enough, despite my CPU being pretty good and MagicYUV in DxTory working wonderfully with tons of CPU headroom.
Just now, I seem to have solved the problem in OBS with some arcane voodoo involving scary-looking ffmpeg command line parameters, and I don't think the problem was ever the codec. My hypothesis is that it was software color conversion, which is very slow! I read somewhere in my restless research that ffmpeg and/or libx264 invokes swscale and asks it to do heavy color conversion back-and-forth operations for no good reason unless it is told what the input color space is.
I think using the following parameters prevented these slow software color conversions, which allowed it to record at full speed using only 6 of my 8 available CPU cores:
Edit: I've changed some of these settings for the better. See https://obsproject.com/forum/thread...20×1200-60-fps-for-youtube.64735/#post-279686 for more details. These screenshots and settings remain here only for historical purposes.
After setting all those options just like that (particularly the "Video Encoder Settings" line), everything clicked and suddenly my game could play smoothly and the resulting video looked like an exact copy of the gameplay except with chroma subsampling!
The reason I want to record lossless video for YouTube is that YouTube transcodes all video it's given to its own lossy streaming formats, including YUV 4:2:0 which has chroma subsampling. For minimal quality loss on YouTube, one must upload lossless video.
Here are the settings I used, in case the pictures above are gone in the future and/or you want to copy what I did:
Edit: I've changed some of these settings for the better. See https://obsproject.com/forum/thread...20×1200-60-fps-for-youtube.64735/#post-279686 for more details. These screenshots and settings remain here only for historical purposes.
Code:
relevant fields in the "Output" section of the settings:
Output Mode: Advanced
"Recording" tab
Type: Custom Output (FFmpeg)
Container Format: matroska
Muxer Settings:
Video Bitrate: 999999999
Keyframe interval (frames): 120
Video Encoder: libx264
Video Encoder Settings: colorspace=bt470bg color_range=pc qp=0 preset=ultrafast x264-params=fullrange=on:input-csp=nv12:output-csp=i420:threads=6
Audio Bitrate: 999
Audio Encoder: flac
Audio Encoder Settings: compression_level 0
in the "Advanced" section of the settings:
Color Format: NV12
YUV Color Space: 601
YUV Color Range: Full
I hope this helps someone!
Last edited: