Multi bitrate

Andrei Stancu

New Member
Hello,

I want first of all to thank you for the great application you are writing. You are doing an excellent job.

I searched the forum but I did not found something related to multi bitrate. I know that maybe a some point in the future the new obs-studio multiplatform will have this feature but until then I need to do a prof of concept for a multi bitrate stream so I cloned the sources, compiled for windows and now I am just trying to get a start point but I am stuck. Maybe someone can put me into the right direction. I was considering between creating another thread for a new stream that will use a different resolution and (I know ffmpeg is supporting this) set some codec parameters to output a multi bitrate stream. I need to implement this into the application and not using solutions like a second monitor or things like this.

Thank you.
 

dodgepong

Administrator
Community Helper
What exactly do you mean by "multi bit rate"? You mean streaming and having several different bit rates for people to choose from available? That requires separate encoder instances for each bit rate, or perhaps a single stream and multiple encoders taking the stream as input and re-encoding it to a different bit rate. You can't just encode with a single encoder and output multiple bit rates...unless I'm misunderstanding what you mean.
 

Andrei Stancu

New Member
Yes, exactly. I mean streaming to a rtmp server and having the people choose from 2 or maybe more bit rates. If someone has a slower internet connection to choose a lower bit rate to watch the stream.
 

dodgepong

Administrator
Community Helper
You will also have to have a video players that supports such a thing. I assume you're trying to set up your own personal streaming server?
 

Andrei Stancu

New Member
It will be a custom streaming server and a video player that will have support for choosing the bit rate. I know Flash Media Server has support for multi bitrate. I have to do a little more research on this topic. I wanted to know if using obs-studio and separate encoder instances for each bit rate can be a viable solution. Now I have to dig deeper into obs multiplatform code and try to understand the encoding and streaming flow.
 

Andrei Stancu

New Member
I succeeded to create a new instance for the encoder and for the service and now I am broadcasting to 2 rtmp servers in the same time. The problem is that both streams are having the same resolution. This is because it is used the same
video_t instance returned by the obs_get_video function.

obs_encoder_set_video(x264, obs_get_video());

I managed someway to change the height and width for one of the encoders but the video for the second stream is not scaled, is just a crop of the first one. I think I am missing something.
 
I think it would be better to figure out how Twitch does it for your project to work out better. People don't stream with more then one bitrate to Twitch, the site itself downscales to let viewers choose what quality/bitrate to watch at and would probably be much more feasible for you.
 

dodgepong

Administrator
Community Helper
Usually you stream at one bit rate, and then set up the server to transcode for you to lower bit rates/resolutions.
 

Andrei Stancu

New Member
Thank you for you answers. I did some more research and I found as you told me that most of the servers transcode themselves for lower bit rates/resolutions and is not needed to stream with two bit rates. Anyway I almost succeeded to do that. Obs-studio is capable to send two or more streams to different servers with same resolution or a different one. This might be useful if you want to stream to more servers simultaneously.
 
Top