Designed for streaming? How about local file recording?

alvinhochun

New Member
This post discusses turning OBS into a recording-capable software, and basically requests for two things:

  • Add support for lossless compression formats (or even no compression at all == raw) for both audio and video
  • File recording mode to output video file with the video sources' resolution, without needing to set it manually
--------

One day I was trying to write an open source OpenGL game capturing program using C# and EasyHook (which obviously wouldn't get much performance).

Later, I found this project and surprised to find it being open source, yet not a widely-known "game capturing program". Obviously, OBS now have game capturing, screen capturing and window capturing, so it has great potential to be a great open source "game capturing program" and also a great "desktop recording program".

The problem: OBS is designed for streaming.

1. Lossy compression is wasting CPU power to decrease quality

OBS currently have a "File Output Only" "broadcast" mode, which can sort of do a local game recording/screencasting. Unfortunately, recording with OBS is forced to go through the x264 encoder (or rather, lossy compressor). This makes sense for video streaming (sacrificing some quality and CPU power to reduce size), but isn't optimal for local recording. Since writing speed to the hard drive is usually faster than network speed and we don't need to care about audiences' download speed (at the moment), it can and should record without lossy compression.

Lossy compression result in a decrease in video quality. (If you understand this you can skip this section entirely.) In the following part, I use both CamStudio and OBS to capture this browser window to demonstrate the decrease in quality.

CamStudio:
  • CamStudio Loseless Codec v1.5, LZO compression level 6
  • Quality 100% (doesn't really affect anything)
  • 1616x876

OBS:
  • CBR, 6000kbps, CBR padding enabled
  • x264 preset: veryfast
  • 1616x876

Here is a part of the captured video from both recordings:
w5w0WZ0.png


Don't see the quality difference? Let's zoom in a bit:

mCoWT8D.png


With OBS (x264 encoding):
  1. Sharp borders gets fuzzy
  2. Original RGB not entirely preserved
  3. Slight noise everywhere

So if OBS support lossless video compression (could probably use the AVIFILE API with CamStudio codec), we can get the best video quality. Same goes for audio.

2. Scenes are great, but can do in post-processing

Scenes are obviously needed for streaming. However if people are using OBS for recording, they will probably do post-processing anyway, so the video sources can simply be recorded in their original form, no scaling, positioning and cropping needed. It does not need to deal with a window resize, but if it have to, just crop the extra part and fill empty area with black...
 

Kharay

Member
Honestly, I don't see a reason to have a major paradigm shift in OBS' design. Originally it was and still remains intended to be a free broadcasting solution. Its very name implies broadcasting (ie: streaming). And whereas adding additional codecs, including lossless ones wouldn't hurt I don't see any reason whatsoever to go further than that.

Furthermore; have a read -- http://mewiki.project357.com/wiki/X264_Settings -- whereas it will never be completely lossless you can still improve on the quality in your example a great deal if the purpose is purely a local recording.

Anyhow, it's an interesting idea; to add lossless codec support. I don't see it happening overnight but I'd welcome the implementation.
 

Boildown

Active Member
It seems like the OP forgot to make his point, or plans to add more parts later.

Anyways, have you tried using crf=0 instead of any form of CBR?

Personally, when I want lossless recording of games, I use FRAPS. For not games? Meh, rarely comes up, but if it did, I'd probably have plenty of horsepower to run OBS at a transparent near-lossless format, if that's what was needed. Other than games and encoding, what applications really test a CPU any more?
 

alvinhochun

New Member
Kharay said:
Honestly, I don't see a reason to have a major paradigm shift in OBS' design. Originally it was and still remains intended to be a free broadcasting solution. Its very name implies broadcasting (ie: streaming).
There are currently too few open source screen/game recording software. Some of these that I know:
  • Taksi - not bad game recording, but last updated in July 2010, does not support DirectX >9, cannot record desktop audio directly, no 64-bit hooking support, crashes occasionally (in fact just crashed Chrome when I close it)
  • CamStudio - fine for simple screencasting, but not very high performance, cannot record desktop audio directly
  • OBS

Given that OBS currently also have the ability to capture screen/games and record to a file, there are people (including me) who use OBS as a screen/game recording software.

I don't see why OBS can't be made into a real screen/game recording software. Of course, its current name is "Open Broadcaster Software", but software names can be changed. Even if OBS keeps the current name, it does not stop OBS from being improved.

Boildown said:
It seems like the OP forgot to make his point, or plans to add more parts later.

Personally, when I want lossless recording of games, I use FRAPS. For not games? Meh, rarely comes up, but if it did, I'd probably have plenty of horsepower to run OBS at a transparent near-lossless format, if that's what was needed. Other than games and encoding, what applications really test a CPU any more?

I might not have made my point very clearly, since almost everything that I write is kind of messed up in organization... argh...

Now I know you use Fraps. If OBS can output loseless video file, you can ditch Fraps. For me, I'd rather use open source software over payware (where Windows and Office are exceptions due to compatibility issues). To quote the description of OBS on SourceForge:

Originally I just made it for myself because I thought "why should I pay a subscription for software I could probably write myself?"

I could probably just isolate the code that is needed for video capture input, write code to use the AVIFile API to record to a file and throw the code to github even though it may take me quite a long time (I am not a good programmer anyway). However I dislike duplication. If the function can be added to an existing software, why bother making another software instead?

Boildown said:
Anyways, have you tried using crf=0 instead of any form of CBR?

I am not familiar with both H.264 spec and x264 options, so no. What will it make?
 

dodgepong

Administrator
Community Helper
crf=0 will set x264 to record lossless, though I've heard it can cause problems in some video editors.

There's always this: viewtopic.php?f=18&t=2972

Also, if you edit your profile.ini file in %appdata%/obs/profiles and set Use444=1 you can have accurate color reproduction, though then you can't stream. (Streaming with Flash requires 4:2:0)
 

R1CH

Forum Admin
Developer
Sounds like you can do everything you want to do already, just use crf=0 for lossless output (and optionally Use444) and don't scale your sources. Keep in mind though, h264 is not a very editor friendly format.

For most purposes though, lossless recording is a waste since the final product will end up compressed regardless.
 
I like the idea of adding a few more formats suited for recording, I'd use scenes in shooting to save myself editing. Also the use444 option, anyway we can make that a simple option in the menus?
 

paibox

heros in an halfshel
The Use444 option will not be a simple option in the menus unless Adobe would suddenly start supporting it in Flash, because options that can cause a black screen when streaming (while the preview looks normal) aren't something that should be thrown in there and clickable in a "what's this?" fashion.

Also, keep in mind that 4:4:4 color space only works in a handful of applications, and most likely not in your favorite editing software.

Additional output formats is something that has been suggested before, and it's not entirely impossible that it'll make it in at some point.
 

dodgepong

Administrator
Community Helper
Would it be reasonable to put the Use444 option when selecting the "File Output Only" option in Broadcast settings? It already has a custom UI as opposed to the Live Stream option.
 

paibox

heros in an halfshel
If I recall correctly, 4:4:4 video files don't work properly with either Premiere or Vegas, so I really don't think it's a good idea to put it anywhere except for where it currently is.

Edit: I don't know if it has been mentioned yet, but you will basically never be presenting 4:4:4 video to anyone except for in the form of a direct download or something, anything you publish on a web site will most likely use Flash, YouTube downsamples the videos to 4:2:0 when uploaded, etc.
 
Top