Trying to mess with i-frames b-frames and p-frames (motion data frames) and unsure where to start.

raelleo

New Member
Hello! Apologies if this is the wrong place to post this but I am trying to create a really awful looking sludge output for obs because of a dream I had
In the advanced output settings I see something called "Keyframe Interval 0=auto", I assumed this had something to do with i-frames but I'm unsure and I cannot really tell
the difference between different intervals. Is there a way to change how many i-frames are sent over a period of time? Is it feasible to have a stream that outputs none, or a very small amount of i-frames over a large interval? Thanks for any help and please excuse my ignorance on this topic.
 

koala

Active Member
The best option is to just use the defaults, i. e. don't explicitly configure anything. Use the software as it comes. The defaults are the result of years of experience, analysis and feedback. You cannot expect to improve the quality by just entering some different numbers. If this improves anything, it would have been already implemented as default.

The general key to improve output quality for streaming is to increase the bitrate. If that's not possible, reduce resolution and fps.
The general key to improve output quality for recording is to decrease the quantizer parameter of the encoder (usually called QP or CRF, values 0..50 where 0=lossless and 50=remove all detail, good values 15..25)

A failsafe thing is to use simple output mode, because it uses the best defaults everywhere and expose only values for configuration you should change according to your requirements.
 

raelleo

New Member
The best option is to just use the defaults, i. e. don't explicitly configure anything. Use the software as it comes. The defaults are the result of years of experience, analysis and feedback. You cannot expect to improve the quality by just entering some different numbers. If this improves anything, it would have been already implemented as default.

The general key to improve output quality for streaming is to increase the bitrate. If that's not possible, reduce resolution and fps.
The general key to improve output quality for recording is to decrease the quantizer parameter of the encoder (usually called QP or CRF, values 0..50 where 0=lossless and 50=remove all detail, good values 15..25)

A failsafe thing is to use simple output mode, because it uses the best defaults everywhere and expose only values for configuration you should change according to your requirements.
Oh sorry! I was not clear enough. I want to make the quality far worse on purpose. But thank you for the further information about QP & CRF. My goal is to have worse Motion compression and I'm wondering if its possible for streaming. In video editing it is very easy for me to remove i-frames, causing odd visual effects, and I'm wondering if I could achieve the same effect live with obs by messing with how its codec works. Thank you for your reply though
 

koala

Active Member
I'm sorry, it's my fault. My fast reading just detected: "bad quality ... searching for advanced options ... looking for b-frame config ... don't know anything about video compression...". It slipped my mind you actually want bad quality for some kind of effect.

The visual effects you see if you manually remove i frames results from the b and p frames applying their changes to the previous image, not to the i frame they belong to. That's an error, and usually video editing software should prevent such things to avoid broken video.

OBS cannot create such broken video in the first place, however if you extend the keyframe interval (which is the time between i frames), more consecutive p and b frames will be inserted in the video, and if you are able to kill one i frame, the effect duration will probably be extended. P and b frames are similar in a sense they contain the difference since some previous frame. P frames contain changes since the last i frame, and b frames contain the changes since the last P frame. The b frames get the lowest quality for the sake of compression, so if you increase the amount of b frames, you will decrease the quality of your video for the sake of your effects.

For distorting video, I recommend filters instead of just creating broken video files. For example, inversing the color with a color filter is a classic, and if you use some blending mode other than normal (right-click source->blending mode), you can probably also create strange distortions depending on what you are layering on top of each other. I guess there are also multiple distortion filters as plugins available that are implemented as shaders.
 

raelleo

New Member
I'm sorry, it's my fault. My fast reading just detected: "bad quality ... searching for advanced options ... looking for b-frame config ... don't know anything about video compression...". It slipped my mind you actually want bad quality for some kind of effect.

The visual effects you see if you manually remove i frames results from the b and p frames applying their changes to the previous image, not to the i frame they belong to. That's an error, and usually video editing software should prevent such things to avoid broken video.

OBS cannot create such broken video in the first place, however if you extend the keyframe interval (which is the time between i frames), more consecutive p and b frames will be inserted in the video, and if you are able to kill one i frame, the effect duration will probably be extended. P and b frames are similar in a sense they contain the difference since some previous frame. P frames contain changes since the last i frame, and b frames contain the changes since the last P frame. The b frames get the lowest quality for the sake of compression, so if you increase the amount of b frames, you will decrease the quality of your video for the sake of your effects.

For distorting video, I recommend filters instead of just creating broken video files. For example, inversing the color with a color filter is a classic, and if you use some blending mode other than normal (right-click source->blending mode), you can probably also create strange distortions depending on what you are layering on top of each other. I guess there are also multiple distortion filters as plugins available that are implemented as shaders.
Thank you! Yes I'm looking around and the effect I'm wanting seems to require a lot more technical know how than I have when it comes to live streaming instead of editing in post. I did not know that about B frames being the lowest quailty so thanks a lot for that. I think messing around with blending and filters is probably the best I can get for now, thanks for all your help!!
 
Top