Question / Help IP camera RTSP source - no re-encoding?

scaesare

New Member
I have an IP camera I'm successfully able to add as a video source (media source rtsp://etc...). Is it possible for OBS simply to pass this stream through to the output without a re-encode step?

The issue is CPU load. This machine will also being playing back media (with screen capture as another OBS source for switching to), encoding for internet streaming, and potentially "recording to" another PC via UDP/MPGETS (in order to target a remote auditorium display).

If I could avoid the re-encode step for the IP camera input stream, that might lessen the load. I can set the IP camera stream parameters for the bitrate/resolution/framerate etc.. I need and then OBS ideally wouldn't need to futz with it (other than to obviously decode it for preview, but that's not nearly the load encoding is).

Thanks for any pointers... I've searched the forum to no avail.

-Steve
 

R1CH

Forum Admin
Developer
This is not possible. If you simply want a stream passthrough without any compositing, ffmpeg or VLC may be better suited to your needs.
 

Painted Zebra

New Member
I too am interested in this but I do not understand the reply from R1CH?

Are ffmpeg and VLC alternatives to OBS or to be used in conjunction with OBS?

Because I would like to live stream an IP camera to YouTube and have been doing it successfully using OBS but I have also been thinking about the double encoding issue i.e. the camera encodes the stream to OBS and then OBS encodes the stream to YouTube.

But if I set the encoding in OBS to very fast is this almost the equivalent of no encoding for the live stream leg to YouTube?
 

Tomasz Góral

Active Member
OBS is software video mixer, OBS use FFMPEG for encodeing, but you can self use FFMPEG to encoding e.g. if your source is h.264 can copy stream and send to YT or FB without reencoding (less use CPU), or reencoding (decode h.264 and encode to next h.264) and send to YT or FB, or other services.
 

Painted Zebra

New Member
Thanks Tomasz for the reply. So is there any way to get around the double encoding issue when using an IP Camera?

Maybe turning off the encoding in the camera maybe? Is this even possible?
 

ethaniel

Member
You can use https://hub.docker.com/r/datarhei/restreamer - it's a prebuilt docker container which is very easy to run and has a nice web interface. It allows you to connect your live camera stream (rtsp) directly to multiple destinations (let's say Youtube, Twitch and something else) without reencoding. You can also add sound if you want. If you don't know Docker, this might be a perfect opportunity to learn (all developers use it).

In my case, I prefer to use OBS, because it adds overlays to my live stream from a RTSP camera. However, I have an external script which monitors OBS from another server. If it sees that OBS is down, it brings up the restreamer docker container as a fallback, so viewers don't noticed that the stream is down.

In OBS itself, disabling the Preview also helps save a lot of resources.
 
Last edited:
Top