Jump to content

Hi everybody!

 

I would like to have a Raspberry Pi 4 quite soon to tinker around with it, and I was thinking, could it handle OBS Streaming?

 

The usecase would be something like this: 1080p, 10fps max, 24/7 stream

On the Pi 4 with 4 gigs of Ram!

 

And if you have other usecases for a Pi4 that would be fun to try, tell me! :D

 

Have a nice day!

Link to comment
https://linustechtips.com/topic/1099156-raspberry-4-obs-streaming/
Share on other sites

Link to post
Share on other sites

4 hours ago, Vena said:

Hi everybody!

 

I would like to have a Raspberry Pi 4 quite soon to tinker around with it, and I was thinking, could it handle OBS Streaming?

 

The usecase would be something like this: 1080p, 10fps max, 24/7 stream

On the Pi 4 with 4 gigs of Ram!

 

And if you have other usecases for a Pi4 that would be fun to try, tell me! :D

 

Have a nice day!

I use an app called MotionOS on a rpi zero W single core CPU w/ 512mb RAM and am able to stream 720p @ ~10fps. Since a rpi4 has quite a bit more processing power, I'd say it (should) work.

 

They also have software (can't recall the name) that turns your rpi into a steam machine. I've tried it on my pi zero, but it didn't quite have enough horsepower to handle the streaming. Another project I worked on last Christmas was a pi light show using lightshowpi. A rpi4 would be overkill for this, but it would teach you a lot as it requires quite a bit of 'tinkering' with relays, config files and I/O ports.

 

Here is an excellent website that walks your through various projects step-by-step: https://projects.raspberrypi.org/en/

Link to post
Share on other sites

1 hour ago, mariushm said:

I guess it would work, but it would depend on the quality settings and bitrate you choose. I don't think it has hardware encoding so it would have to do everything in software using the processor.

 

Okay! Regarding quality it would be 1080p/10fps max, and for the bitrate I think 500 or 1000 would be largely sufficient, as it will be something quite static (hence the 10 fps) Yeah, I read that the ARM does not support hardware encoding, guess I'll have to try it. I hope that something like OBS could work on Raspbian.

 

1 hour ago, steelo said:

I use an app called MotionOS on a rpi zero W single core CPU w/ 512mb RAM and am able to stream 720p @ ~10fps. Since a rpi4 has quite a bit more processing power, I'd say it (should) work.

 

They also have software (can't recall the name) that turns your rpi into a steam machine. I've tried it on my pi zero, but it didn't quite have enough horsepower to handle the streaming. Another project I worked on last Christmas was a pi light show using lightshowpi. A rpi4 would be overkill for this, but it would teach you a lot as it requires quite a bit of 'tinkering' with relays, config files and I/O ports.

 

Here is an excellent website that walks your through various projects step-by-step: https://projects.raspberrypi.org/en/

Ah nice! I was counting on buying a Pi zero as well, even more now Linus made a  "tutorial" to set up a adblocker

Looks good! I'll definitly check that out ;) 

 

 

Thanks for your answers !

Link to post
Share on other sites

You'd probably be better off resizing the capture to 960x540 (because it's half the size of 1080p so a simple bilinear resize that's basically free when it comes to cpu usage will be more than adequate)

If the image is static, then leave the fps to 24 or 30 fps ... the number of fps won't do much to reduce encoding time because the encoder will simply compare two frames and drop the stuff that doesn't change so that's not using cpu time to encode, so 10fps or 24fps... minimal increase in cpu usage. Reducing the actual resolution by 4 times (1080p is 2 million pixels, 540p is 500k pixels) will do much more for cpu usage and the quality would still be high.

Use the tune option (stillimage), increase the keyframe interval to a higher value than default (maximum allowed is once every 250 frames but the default is somewhere around 50-60 frames or 1 keyframe every second... with 24fps you could raise it to something like once every 3-5 seconds...

 

Link to post
Share on other sites

wow

 

That is pretty informative and good to know! I'll definitly think of this when I'll set up the stream

Does that also lower the network output or not? 

 

Anyway, I'll surely test your settings and come back to tell if it was succesful! ;)

 

 

Link to post
Share on other sites

The bitrate depends on you... you can tweak settings  until you get the best quality for the bitrate and cpu usage.

 

For example you could reduce cpu usage by disabling CABAC encoding of stream, which results in maybe around 10-20% more data for same quality but reduces cpu usage ( as an analogy, it's like using zip fast compression before sending data to twitch/youtube, instead of using zip medium-slow compression)

So instead of streaming with 500kbps at 90% cpu usage with CABAC encoding, you could stream at 550-600kbps with maybe 80% cpu usage and same quality. And you could use the spare cpu usage to tweak other parameters that may bring back some quality.

 

You have several budgets you can play with... you have the bandwidth budget, you have the resolution, you have the fps at a much lesser degree, you have the various tweaks and settings of the encoder, your only constraint is pretty much the capabilities of the processor ... that's your limitation. You can juggle with everything else, trading something from one area to gain something in another area and so on.

 

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×