iamscottxu / obs-rtspserver

RTSP server plugin for obs-studio
https://obsproject.com/forum/resources/obs-rtspserver.1037/
GNU General Public License v2.0
463 stars 53 forks source link

Bitrate doesn't exceed 2800 kbps #75

Closed dam034 closed 3 years ago

dam034 commented 3 years ago

Hi, I'm trying to stream a 1080p video source received by a hdmi input. The quality of the source is excellent and fluid, like the television signal. In OBS I can see the source to the quality I just wrote. In settings panel, I put 30000kbps stream, but when I connect a client to see the stream, it doesn't exceed 2800kbps, causing you to lose a lot of video quality. I'm trying to stream in LAN, where the speed is 1gbps. While streaming, the CPU usage is about 10% and GPU usage about 30%.

I want to increase the bitrate from 2800kbps to 20000-30000kbps to have the source quality also on lan clients.

brodi1 commented 3 years ago

Hi @dam034

Could you please provide more information? Such as:

dam034 commented 3 years ago

Hi, sorry for the delay.

So I have:

If necessary, I can make images/videos of any kind.

brodi1 commented 3 years ago

Hi, @dam034

Thanks. Could you take a screenshot of your settings?

I myself often have problems with VLC .... Maybe there's a bug that needs to be fixed?. Try SMPlayer or mpv both work for me

If you try out SMPlayer you can press CTRL + I to see the information, you should also see the bitrate.

dam034 commented 3 years ago

Now I've taken screenshots of OBS:

obs1 obs2

I used VLC, OBS (to see the stream) and vMix to receive the stream from the server, and despite the settings, the bitrate remains within 2800kbps.

I'm willing to do more tests if needed to understand what the problem is.

brodi1 commented 3 years ago

I usually always use the Advanced (Avanzate) option .... now I've selected your settings and now I don't get more than 2800kbps.

Have you already tried whether the advanced option makes a difference?

Don't forget to:

It works for me when I switch to the advanced option

dam034 commented 3 years ago

Sorry, but I can't understand what you want to tell.

So I show the advanced and video settings in obs: obs3 obs4

If I was wrong somewhere, could you tell me the error?

If it's possible, can you show your right settings?

brodi1 commented 3 years ago

@dam034 grafik

and in English: Settings->Output->Output Mode=Advanced Encoder: x264 Rescale Output: disabled Rate Control: CBR

dam034 commented 3 years ago

Sorry for the delay.

So I tried with your settings and these settings: obs rtsp

And when I'm viewing the stream on a pc in the same lan, I can encounter some systematic problems:

With my settings, the bitrate can reach 70mbps, so no problem for my lan, which has 1gbps speed.

Now I want to know if the problem is on the server or on the clients.

p.s.: I have another problem of another type with this plugin, can I open another issue or continue here?

brodi1 commented 3 years ago

@dam034

you selected CRF.... have you tried CRB?

Here some info about encoding methods:

Summaries the strengths and weaknesses of the four encoding methods

TechniqueOperationStrengthsWeaknessesUse for
CBR– Adjusts quality to achieve bitrate
– Same bitrate entire file
– Consistent bitrate
– Single pass
– Overall quality
– Transient quality
– Live
– VOD with constrained bandwidth
Constrained VBR– Adjusts quality to achieve bitrate
– Adjusts bitrate to scene complexity
– Overall quality
– Transient quality
– Bitrate variability
– Cost (2 or more passes)
– Most other VOD
CRF– Adjusts data rate to achieve quality– Single pass
– Delivers set quality level
– No bitrate control– Archiving
– Mezz file creation
Capped CRF– CRF with data rate maximum– Per-title method
– Single pass
– Transient quality
– Bitrate variability
– VOD
– Live

Source: https://ottverse.com/what-is-cbr-vbr-crf-capped-crf-rate-control-explained/

p.s.: I have another problem of another type with this plugin, can I open another issue or continue here?

A: You can open a new issue

dam034 commented 3 years ago

So I tried 2 methods, CBR and CRF: rtsp1 rtsp2

The OBS server is on Win 10 Pro platform, with GPU encoding unavailable.

I tried some tests with another pc in the same lan at 1 gbps speed, and it doesn't have the GPU encoding either: 1) VLC on Win 10, CBR method, it works without problems; 2) VLC on Ubuntu 18.04, CBR method, it works without problems; 3) OBS on Ubuntu 18.04, CBR method, very low quality, you can see the big squares; 4) VLC on Win 10, CRF method, it looks good, but when the bitrate slows down, the image freezes until the bitrate returns to high; 5) VLC on Ubuntu 18.04, CRF method, it looks good, but when the bitrate slows down, the image freezes until the bitrate returns to high; 6) OBS on Ubuntu 18.04, CRF method, very low quality, you can see the big squares and it freezes when bitrate slows down.

I am very satisfied with tests #1 and #2, although at the beginning of the connection, the image does not come immediately. As I press Start, the audio arrives after not even a second, but to get the image I have to wait 10 seconds, but for me this fact is not a problem. These are VLC settings when I open the stream: vlc

Now I created this RTSP server to send the stream to a pc where there is a software streaming which will receive the data. But OBS (client) doesn't receive the signal well.

What do you advise?

brodi1 commented 3 years ago

@dam034 now it's getting a bit off topic. The bitrate problem is already solved..... If you need further help, I'll be happy to help even if it has little to do with the plugin. Is it ok if I close this issue and help you via e-mail / matrix?

dam034 commented 3 years ago

Yes, you can close this issue.

I'm opening another issue, as requested in previous post.