How to just "passthrough" the RTSP without (any) processing?

olliraa

New Member
Streaming RTSP stream from a network camera to Youtube. I'd like to configure the stream so, that OBS just passes the stream through without any processing other than adding an overlay (a webpage) on the stream. I guess this is called something like "copy" in x264 video options or something like that?

Is this possible?
 

koala

Active Member
Not possible with OBS. Every source OBS will receive is decoded, then encoded again for output.

With your goal, to add an overlay to a stream, it's not possible anyway to add that overlay without decoding the stream. It's technically not possible to add video data to already encoded video frames. It's like trying to add more beans to a sealed bean can without opening that can: impossible.
 

olliraa

New Member
Not possible with OBS. Every source OBS will receive is decoded, then encoded again for output.

With your goal, to add an overlay to a stream, it's not possible anyway to add that overlay without decoding the stream. It's technically not possible to add video data to already encoded video frames. It's like trying to add more beans to a sealed bean can without opening that can: impossible.

Ok, thanks for a clear answer :) This leads to the following question: How to minimize the encoding load while still adding the overlay on the video stream from the camera while not lowering the quality? Is it even possible or am I once again trying to eat beans without opening the can? ;)
 

koala

Active Member
OBS Studio is for interactive use. Someone sits in front of a PC and acts as kind of director to create a live stream, and manipulating it while streaming.

It seems you just want to add some static info to some static camera - no need to do anything interactively. In this case, OBS Studio is not the best tool. You need a tool that allows unattended, automated usage. Ffmpeg is such a tool. It's a command line tool, and it can receive video and image data, merge them, encode it, and send it to some streaming provider. However, it's beyond the scope of this forum to figure out corresponding command line options for implementing your specific requirements. It's medium difficulty: you need to define 2 input streams in ffmpeg, merge them, and output the merged streams to a rtmp destination.

About quality: there is always quality loss with recoding. If you want to add something to a video, the best way to do it is before the video is encoded, so it doesn't need to be encoded twice. If the camera is a blackbox and outputs only encoded video, you have no choice to decoding and recoding.

The load of encoding is a common challenge with all video encoding. You need proper hardware that is powerful enough for encoding. You have to make yourself familiar with the computing power required. Rules of thumb: doubling the resolution requires 4 times the computing power, doubling the fps requires double the computing power. Or the other way round: half the resolution requires a quarter the computing power, half the fps requires half the computing power.
 

Lawrence_SoCal

Active Member
About quality: there is always quality loss with recoding. If you want to add something to a video, the best way to do it is before the video is encoded, so it doesn't need to be encoded twice. If the camera is a blackbox and outputs only encoded video, you have no choice to decoding and recoding.

in my mind the question becomes, what is your priority and budget? there are cameras that allow adding an overlay, so figuring out how to do so with your camera (there are ways both in camera and via something placed in front of the lens) or getting a new camera that does support what you are looking for. OR as @koala indicates, get a computer/system powerful enough that the decode/re-encode quality loss is minimized (meets your requirements). If you are trying to make due with what you have, then what @koala said...
 

olliraa

New Member
Thank you for the replies :) I guess the ffmpeg route would be a good way to try at least. I'll start investigating. I'm familiar with command line, so no worries there. I just did not realise before that I actually could do that with ffmpeg.

Thanks!
 

olliraa

New Member
Thank you for the replies :) I guess the ffmpeg route would be a good way to try at least. I'll start investigating. I'm familiar with command line, so no worries there. I just did not realise before that I actually could do that with ffmpeg.

Thanks!

Hmm. It seems ffmpeg can do pretty much everything else, but it cannot use a url as an input :/ Only images/video/audio. The reason I was using OBS was to be able to get the live website to show in the corner of the video. Is there any other tool that I could try to achieve that?
 
Top