jibri icon indicating copy to clipboard operation
jibri copied to clipboard

Jibri Youtube Streaming quality issue

Open Petr0s92 opened this issue 6 years ago • 19 comments

Hello,

I have installed Jibri from the stable branch and I'm facing bitrate issues, as it constantly fluctuates between very low (pixelized) and normal-high. My processor is an i9-9900k and the machine is on a 1G non-congested pipe, so you understand that I shouldn't really be facing these problems.

Is there maybe a way to force a fixed bitrate?

Thank you in advance

Petr0s92 avatar Sep 11 '19 21:09 Petr0s92

please include the Jibri logs (/var/log/jitsi/jibri, include all of the different log files there)

bbaldino avatar Sep 11 '19 21:09 bbaldino

Jibri is receiving very low bitrates from the other clients. This could be an issue on the client's uplink side, or on Jibri's downlink. There are periods where things look ok, like here:

2019-09-11 11:48:01.532 INFO: [1136] org.jitsi.jibri.selenium.JibriSelenium.run() Jibri client receive bitrates: {audio={download=66, upload=0}, download=2455, upload=0, video={download=2389, upload=0}}, all clients muted? false
2019-09-11 11:48:16.527 INFO: [1136] org.jitsi.jibri.selenium.JibriSelenium.run() Jibri client receive bitrates: {audio={download=57, upload=0}, download=2489, upload=0, video={download=2432, upload=0}}, all clients muted? false

but most of the time the incoming video bitrate is much lower, e.g.:

2019-09-11 11:42:46.532 INFO: [1136] org.jitsi.jibri.selenium.JibriSelenium.run() Jibri client receive bitrates: {audio={download=82, upload=0}, download=221, upload=0, video={download=139, upload=0}}, all clients muted? false
2019-09-11 11:43:01.555 INFO: [1136] org.jitsi.jibri.selenium.JibriSelenium.run() Jibri client receive bitrates: {audio={download=80, upload=0}, download=236, upload=0, video={download=156, upload=0}}, all clients muted? false

Where is everything running? I.e., the client, the bridge and Jibri--all the same machines? different machines?

Also, looks like you're using a java version > 8, use java 8 please.

bbaldino avatar Sep 11 '19 22:09 bbaldino

Jitsi and Jibri are running on the same host, just different VMs. Both VMs have plenty of resources, no throttling or 100% CPU. The clients are located all over the continent usually. Could this be the issue?

Petr0s92 avatar Sep 11 '19 23:09 Petr0s92

Could be issues with the clients, yeah. What are their uplinks like? You could try from somewhere and check that client's connection quality (little icon over self-view). We don't run Jibri in a VM though so that hasn't really been tested either.

bbaldino avatar Sep 12 '19 04:09 bbaldino

Their connections range from typical ADSL2+ (1mbit upload usually) to 100mbit+ fiber lines.

Petr0s92 avatar Sep 12 '19 20:09 Petr0s92

The behavior you saw is definitely what I'd expect from a client with 1mbit up.

bbaldino avatar Sep 12 '19 20:09 bbaldino

So essentially the slowest connection in a room drops the quality to it's level for everyone?

Petr0s92 avatar Sep 12 '19 22:09 Petr0s92

So essentially the slowest connection in a room drops the quality to it's level for everyone?

Sorry...I had this draft written a week ago and guess I never hit 'comment':

A single participant with a poor uplink won't prevent others from sending a higher bitrate, if that's what you mean. But if you want the quality to Jibri to be good, the participants' uplink will have to be good and Jibri's downlink will have to be good.

bbaldino avatar Sep 19 '19 20:09 bbaldino

I’m sure it’s something with my setup, but getting similar results. Streaming to YouTube the bitrate drops down sometimes to the 500Kbps range. The logs in jibri x.org reflect this low bitrate as well. The jitsi server is on AWS with very high bandwidth and the Jibri on a 80Mbps upload and download connection. This happens even with no one in the room just single user streaming to YouTube. I have tried with 3 different Jibri installs all with same result. I’m perplexed 🤔. Any ideas or suggestions would be greatly appreciated. Also if it has a factor I’m on the same 80Mbps connection as the Jibri server so understandable it must be able to have several connections through the single 80Mbps connection. But would not consider that an issue?

ChildLearningClub avatar Jul 08 '20 03:07 ChildLearningClub

Well, if there's no one else in the room then the bitrate will be very low, as there isn't much to send :) If there's little motion, then video just won't take up very many bits. Are you actually seeing quality issues in the video? Or just noticing the low bitrate?

bbaldino avatar Jul 08 '20 17:07 bbaldino

@bbaldino That makes sense what you are saying, but the bitrate seems to fluctuate without changing anything, and yes the video quality is reduced in the recording, as well. here the resulting video. I apologies I had the audio input set for another input. Another time I had poor video quality between the other caller, but the video recording to Jibri was good. log.0.txt

ChildLearningClub avatar Jul 08 '20 23:07 ChildLearningClub

Are other participants in the call seeing similar quality as the recording? Or is everything good there?

bbaldino avatar Jul 08 '20 23:07 bbaldino

The call seems to be good quality usually, although the other day it was blurry most of the call as reported by the receiver, yet everything was clear on my end as well as the local recording to jibri was Crystal clear. just tested with meet.jit.si and getting similar results video. I know the videos go through some processing on youtubes end, but as you can see from the video can't make out the wording. have set for normal latency didn't change anything else on that end.

ChildLearningClub avatar Jul 08 '20 23:07 ChildLearningClub

The call was made from here in Japan South, and I see running on the amazon west server, so that I would not think was a problem and the video-bridge I have running is on their server in Tokyo.

ChildLearningClub avatar Jul 08 '20 23:07 ChildLearningClub

Well I guess that's YouTube's 720 video stream, did a test with OBS with YouTube's recommended 2500 Kbps stream and held the same bit-rate throughout the video and can't make out the wording on that either, maybe just after it processes it. Video. Okay Well Turns out it's just YouTube, "YouTube today announced that all of its streams will be in standard definition by default. " Article Appears this is still in effect. as far as the fluctuating bit-rate that was mentioned, I see that as well, on the jibri server stream and not from obs.

ChildLearningClub avatar Jul 09 '20 00:07 ChildLearningClub

Jibri is receiving very low bitrates from the other clients. This could be an issue on the client's uplink side, or on Jibri's downlink

Here is my local bandwidth test

server@jibri2:/var/log/jitsi/jibri$ iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 10.148.0.7, port 49304
[  5] local 10.148.0.29 port 5201 connected to 10.148.0.7 port 49306
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-1.00   sec   159 MBytes  1.33 Gbits/sec                  
[  5]   1.00-2.00   sec   140 MBytes  1.17 Gbits/sec                  
[  5]   2.00-3.00   sec   140 MBytes  1.18 Gbits/sec                  
[  5]   3.00-4.00   sec   141 MBytes  1.18 Gbits/sec                  
[  5]   4.00-5.00   sec   140 MBytes  1.18 Gbits/sec                  
[  5]   5.00-6.00   sec   139 MBytes  1.17 Gbits/sec                  
[  5]   6.00-7.00   sec   140 MBytes  1.17 Gbits/sec                  
[  5]   7.00-8.00   sec   140 MBytes  1.17 Gbits/sec                  
[  5]   8.00-9.00   sec   140 MBytes  1.17 Gbits/sec                  
[  5]   9.00-10.00  sec   140 MBytes  1.18 Gbits/sec                  
[  5]  10.00-10.04  sec  6.93 MBytes  1.46 Gbits/sec                  
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth
[  5]   0.00-10.04  sec  0.00 Bytes  0.00 bits/sec                  sender
[  5]   0.00-10.04  sec  1.39 GBytes  1.19 Gbits/sec                  receiver
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------

server@jibri2:/var/log/jitsi/jibri$ iperf3 -c jvb1.domain.com
Connecting to host jvb1.domain.com, port 5201
[  4] local 10.148.0.29 port 57296 connected to 10.148.0.7 port 5201
[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd
[  4]   0.00-1.00   sec  1.01 GBytes  8.65 Gbits/sec    0   1.90 MBytes       
[  4]   1.00-2.00   sec  1.14 GBytes  9.81 Gbits/sec    0   1.90 MBytes       
[  4]   2.00-3.00   sec  1.15 GBytes  9.89 Gbits/sec    0   2.57 MBytes       
[  4]   3.00-4.00   sec  1.15 GBytes  9.89 Gbits/sec    0   3.09 MBytes       
[  4]   4.00-5.00   sec  1.15 GBytes  9.89 Gbits/sec    0   3.09 MBytes       
[  4]   5.00-6.00   sec  1.15 GBytes  9.89 Gbits/sec    0   3.09 MBytes       
[  4]   6.00-7.00   sec  1.13 GBytes  9.71 Gbits/sec    0   3.09 MBytes       
[  4]   7.00-8.00   sec  1.14 GBytes  9.79 Gbits/sec  251   2.17 MBytes       
[  4]   8.00-9.00   sec  1.15 GBytes  9.88 Gbits/sec  512   1.65 MBytes       
[  4]   9.00-10.00  sec  1.15 GBytes  9.89 Gbits/sec    0   1.73 MBytes       
- - - - - - - - - - - - - - - - - - - - - - - - -
[ ID] Interval           Transfer     Bandwidth       Retr
[  4]   0.00-10.00  sec  11.3 GBytes  9.73 Gbits/sec  763             sender
[  4]   0.00-10.00  sec  11.3 GBytes  9.73 Gbits/sec                  receiver

iperf Done.

But the log.0.txt is

2021-06-13 18:05:23.262 INFO: [17] org.jitsi.jibri.selenium.status_checks.MediaReceivedStatusCheck.log() Jibri client receive bitrates: {audio={download=29, upload=0}, download=115, upload=0, video={download=86, upload=0}}, num participants: 1, numMutedParticipants: 0, numJigasis: 0, all clients muted? false
2021-06-13 18:05:38.269 INFO: [17] org.jitsi.jibri.selenium.status_checks.MediaReceivedStatusCheck.log() Jibri client receive bitrates: {audio={download=30, upload=0}, download=115, upload=0, video={download=85, upload=0}}, num participants: 1, numMutedParticipants: 0, numJigasis: 0, all clients muted? false
2021-06-13 18:05:53.268 INFO: [17] org.jitsi.jibri.selenium.status_checks.MediaReceivedStatusCheck.log() Jibri client receive bitrates: {audio={download=30, upload=0}, download=114, upload=0, video={download=84, upload=0}}, num participants: 1, numMutedParticipants: 0, numJigasis: 0, all clients muted? false
2021-06-13 18:06:08.267 INFO: [17] org.jitsi.jibri.selenium.status_checks.MediaReceivedStatusCheck.log() Jibri client receive bitrates: {audio={download=29, upload=0}, download=114, upload=0, video={download=85, upload=0}}, num participants: 1, numMutedParticipants: 0, numJigasis: 0, all clients muted? false
2021-06-13 18:06:23.262 INFO: [17] org.jitsi.jibri.selenium.status_checks.MediaReceivedStatusCheck.log() Jibri client receive bitrates: {audio={download=29, upload=0}, download=113, upload=0, video={download=84, upload=0}}, num participants: 1, numMutedParticipants: 0, numJigasis: 0, all clients muted? false
2021-06-13 18:06:38.267 INFO: [17] org.jitsi.jibri.selenium.status_checks.MediaReceivedStatusCheck.log() Jibri client receive bitrates: {audio={download=30, upload=0}, download=114, upload=0, video={download=84, upload=0}}, num participants: 1, numMutedParticipants: 0, numJigasis: 0, all clients muted? false
2021-06-13 18:06:53.262 INFO: [17] org.jitsi.jibri.selenium.status_checks.MediaReceivedStatusCheck.log() Jibri client receive bitrates: {audio={download=29, upload=0}, download=114, upload=0, video={download=85, upload=0}}, num participants: 1, numMutedParticipants: 0, numJigasis: 0, all clients muted? false
2021-06-13 18:07:08.270 INFO: [17] org.jitsi.jibri.selenium.status_checks.MediaReceivedStatusCheck.log() Jibri client receive bitrates: {audio={download=29, upload=0}, download=114, upload=0, video={download=85, upload=0}}, num participants: 1, numMutedParticipants: 0, numJigasis: 0, all clients muted? false

And ffmpeg.0.txt

2021-06-13 17:10:35.340 INFO: [88] ffmpeg.log() frame=   14 fps=0.0 q=21.0 size=       0kB time=00:00:00.44 bitrate=   0.9kbits/s speed=0.876x
2021-06-13 17:10:35.340 INFO: [88] ffmpeg.log() frame=   29 fps= 29 q=21.0 size=       0kB time=00:00:00.95 bitrate=   0.4kbits/s speed=0.942x
2021-06-13 17:10:36.340 INFO: [88] ffmpeg.log() frame=   44 fps= 29 q=21.0 size=       0kB time=00:00:01.43 bitrate=   0.3kbits/s speed=0.952x
2021-06-13 17:10:36.341 INFO: [88] ffmpeg.log() frame=   59 fps= 29 q=21.0 size=       0kB time=00:00:01.95 bitrate=   0.2kbits/s speed=0.968x
2021-06-13 17:10:37.341 INFO: [88] ffmpeg.log() frame=   74 fps= 29 q=21.0 size=       0kB time=00:00:02.46 bitrate=   0.2kbits/s speed=0.976x
2021-06-13 17:10:38.341 INFO: [88] ffmpeg.log() frame=   89 fps= 29 q=24.0 size=       0kB time=00:00:02.97 bitrate=   0.1kbits/s speed=0.983x
2021-06-13 17:10:38.341 INFO: [88] ffmpeg.log() frame=  105 fps= 30 q=24.0 size=     256kB time=00:00:03.46 bitrate= 605.0kbits/s speed=0.983x
2021-06-13 17:10:39.342 INFO: [88] ffmpeg.log() frame=  119 fps= 30 q=24.0 size=     512kB time=00:00:03.97 bitrate=1056.4kbits/s speed=0.985x
2021-06-13 17:10:39.342 INFO: [88] ffmpeg.log() frame=  135 fps= 30 q=22.0 size=     512kB time=00:00:04.46 bitrate= 939.1kbits/s speed=0.984x
2021-06-13 17:10:40.342 INFO: [88] ffmpeg.log() frame=  150 fps= 30 q=25.0 size=     768kB time=00:00:04.96 bitrate=1266.2kbits/s speed=0.985x
2021-06-13 17:10:40.342 INFO: [88] ffmpeg.log() frame=  165 fps= 30 q=24.0 size=    1024kB time=00:00:05.46 bitrate=1534.6kbits/s speed=0.985x
2021-06-13 17:10:41.343 INFO: [88] ffmpeg.log() frame=  181 fps= 30 q=25.0 size=    1280kB time=00:00:06.00 bitrate=1747.7kbits/s speed=0.989x
2021-06-13 17:10:41.343 INFO: [88] ffmpeg.log() frame=  196 fps= 30 q=22.0 size=    1280kB time=00:00:06.50 bitrate=1612.9kbits/s speed=0.988x
2021-06-13 17:10:42.343 INFO: [88] ffmpeg.log() frame=  211 fps= 30 q=25.0 size=    1536kB time=00:00:07.01 bitrate=1794.4kbits/s speed=0.99x
2021-06-13 17:10:42.344 INFO: [88] ffmpeg.log() frame=  227 fps= 30 q=24.0 size=    1792kB time=00:00:07.53 bitrate=1948.7kbits/s speed=0.991x
2021-06-13 17:10:43.344 INFO: [88] ffmpeg.log() frame=  242 fps= 30 q=25.0 size=    2048kB time=00:00:08.03 bitrate=2088.3kbits/s speed=0.99x
2021-06-13 17:10:43.344 INFO: [88] ffmpeg.log() frame=  257 fps= 30 q=26.0 size=    2048kB time=00:00:08.54 bitrate=1963.5kbits/s speed=0.991x
2021-06-13 17:10:44.345 INFO: [88] ffmpeg.log() frame=  272 fps= 30 q=25.0 size=    2304kB time=00:00:09.07 bitrate=2078.9kbits/s speed=0.995x
2021-06-13 17:10:44.345 INFO: [88] ffmpeg.log() frame=  288 fps= 30 q=25.0 size=    2560kB time=00:00:09.56 bitrate=2192.2kbits/s speed=0.991x

Do you have any idea about why the download is low? Is that the reason make my record video become low quality?

coffeduong avatar Jun 13 '21 10:06 coffeduong

Did anyone have same issue? What’s your opinion in this case?

coffeduong avatar Jun 15 '21 02:06 coffeduong

Still researching but can't found any clue ... :(

coffeduong avatar Jun 27 '21 04:06 coffeduong