Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bad video quality and java issue #1829

Open
tiiiecherle opened this issue Mar 8, 2022 · 20 comments
Open

bad video quality and java issue #1829

tiiiecherle opened this issue Mar 8, 2022 · 20 comments

Comments

@tiiiecherle
Copy link

Hey,

first of all thanks a lot for this project. We use it as an installation on our own archlinux server with all packages up-to-date.
We use the "*-bin" packages from the AUR for Jitsi.

I'm sorry I don't know exactly when but I think this issue started two Jitsi releases ago.

We did not change any Jitsi or component settings and the quality of the videos got really bad and blurry. Additionally I started seeing this in the logs.

Mar 8 14:35:49 archlinux jvb.sh[]: Exception in thread "Global IO poolpool-8-thread-2" java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;

I don't know if the issues are related in any way. Please let me know what else you would need to track down the issue. Perhaps it is already known.

Thanks a lot in advance.

@damencho
Copy link
Member

damencho commented Mar 8, 2022

What is the java version you use to run jvb?

@tiiiecherle
Copy link
Author

I tried with both of these which give me the same feedback and bad video quality.

local/jre-openjdk 17.0.3.u3-1
local/jre8-openjdk 8.332.u03-1

@bgrozev
Copy link
Member

bgrozev commented Mar 8, 2022

Can you post the full exception? Are you using sctp data channels?

@damencho
Copy link
Member

damencho commented Mar 8, 2022

We use the "*-bin" packages from the AUR for Jitsi.

Not sure what java was used to compile those, but you can try java 11 and see whether that changes anything.

@tiiiecherle
Copy link
Author

@damencho Thanks, but this issue did not come up with a new java version but with some Jitsi update.

@bgrozev Does this help?

Mar  8 13:59:38 archlinux jvb.sh[162136]: Got sctp association state update: 1
Mar  8 13:59:38 archlinux jvb.sh[162136]: sctp is now up.  was ready? false
Mar  8 13:59:38 archlinux jvb.sh[162136]: Exception in thread "Global IO poolpool-8-thread-3" java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
Mar  8 13:59:38 archlinux jvb.sh[162136]: 	at org.jitsi.videobridge.datachannel.protocol.OpenChannelMessage.parse(OpenChannelMessage.java:60)
Mar  8 13:59:38 archlinux jvb.sh[162136]: 	at org.jitsi.videobridge.datachannel.protocol.DataChannelProtocolMessageParser.parse(DataChannelProtocolMessageParser.java:55)
Mar  8 13:59:38 archlinux jvb.sh[162136]: 	at org.jitsi.videobridge.datachannel.DataChannelStack.onIncomingDataChannelPacket(DataChannelStack.java:59)
Mar  8 13:59:38 archlinux jvb.sh[162136]: 	at org.jitsi.videobridge.Endpoint$DataChannelHandler.setDataChannelStack$lambda-4(Endpoint.kt:1129)
Mar  8 13:59:38 archlinux jvb.sh[162136]: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Mar  8 13:59:38 archlinux jvb.sh[162136]: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Mar  8 13:59:38 archlinux jvb.sh[162136]: 	at java.lang.Thread.run(Thread.java:750)
Mar  8 13:59:38 archlinux jvb.sh[162136]: Jicofo 2022-03-08 13:59:38.674 SCHWERWIEGEND: [81] [confId=d168c4cd82961606 epId=9d2289ba gid=19730 stats_id=Philip-ifP conf_name=NAME@conference.REALM] DataChannelStack.onIncomingDataChannelPacket#81: Could not find data channel for sid 0
Mar  8 13:59:41 archlinux jvb.sh[162136]: Got sctp association state update: 1
Mar  8 13:59:41 archlinux jvb.sh[162136]: sctp is now up.  was ready? false
Mar  8 13:59:41 archlinux jvb.sh[162136]: Exception in thread "Global IO poolpool-8-thread-6" java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
Mar  8 13:59:41 archlinux jvb.sh[162136]: 	at org.jitsi.videobridge.datachannel.protocol.OpenChannelMessage.parse(OpenChannelMessage.java:60)
Mar  8 13:59:41 archlinux jvb.sh[162136]: 	at org.jitsi.videobridge.datachannel.protocol.DataChannelProtocolMessageParser.parse(DataChannelProtocolMessageParser.java:55)
Mar  8 13:59:41 archlinux jvb.sh[162136]: 	at org.jitsi.videobridge.datachannel.DataChannelStack.onIncomingDataChannelPacket(DataChannelStack.java:59)
Mar  8 13:59:41 archlinux jvb.sh[162136]: 	at org.jitsi.videobridge.Endpoint$DataChannelHandler.setDataChannelStack$lambda-4(Endpoint.kt:1129)
Mar  8 13:59:41 archlinux jvb.sh[162136]: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
Mar  8 13:59:41 archlinux jvb.sh[162136]: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
Mar  8 13:59:41 archlinux jvb.sh[162136]: 	at java.lang.Thread.run(Thread.java:750)
Mar  8 13:59:46 archlinux jvb.sh[162136]: Jicofo 2022-03-08 13:59:46.388 SCHWERWIEGEND: [80] [confId=d168c4cd82961606 epId=626292d4 gid=19730 stats_id=Gage-mEu conf_name=NAME@conference.REALM] DataChannelStack.onIncomingDataChannelPacket#81: Could not find data channel for sid 0
Mar  8 13:59:46 archlinux jvb.sh[162136]: Jicofo 2022-03-08 13:59:46.406 SCHWERWIEGEND: [80] [confId=d168c4cd82961606 epId=9d2289ba gid=19730 stats_id=Philip-ifP conf_name=NAME@conference.REALM] DataChannelStack.onIncomingDataChannelPacket#81: Could not find data channel for sid 0
Mar  8 13:59:47 archlinux jvb.sh[162136]: Jicofo 2022-03-08 13:59:47.710 SCHWERWIEGEND: [80] [confId=d168c4cd82961606 epId=9d2289ba gid=19730 stats_id=Philip-ifP conf_name=NAME@conference.REALM] DataChannelStack.onIncomingDataChannelPacket#81: Could not find data channel for sid 0
Mar  8 13:59:47 archlinux jvb.sh[162136]: Jicofo 2022-03-08 13:59:47.755 SCHWERWIEGEND: [80] [confId=d168c4cd82961606 epId=626292d4 gid=19730 stats_id=Gage-mEu conf_name=NAME@conference.REALM] DataChannelStack.onIncomingDataChannelPacket#81: Could not find data channel for sid 0
Mar  8 13:59:56 archlinux jvb.sh[162136]: Jicofo 2022-03-08 13:59:56.396 SCHWERWIEGEND: [93] [confId=d168c4cd82961606 epId=626292d4 gid=19730 stats_id=Gage-mEu conf_name=NAME@conference.REALM] DataChannelStack.onIncomingDataChannelPacket#81: Could not find data channel for sid 0
Mar  8 13:59:56 archlinux jvb.sh[162136]: Jicofo 2022-03-08 13:59:56.397 SCHWERWIEGEND: [93] [confId=d168c4cd82961606 epId=9d2289ba gid=19730 stats_id=Philip-ifP conf_name=NAME@conference.REALM] DataChannelStack.onIncomingDataChannelPacket#81: Could not find data channel for sid 0
Mar  8 13:59:57 archlinux jvb.sh[162136]: Jicofo 2022-03-08 13:59:57.701 SCHWERWIEGEND: [93] [confId=d168c4cd82961606 epId=9d2289ba gid=19730 stats_id=Philip-ifP conf_name=NAME@conference.REALM] DataChannelStack.onIncomingDataChannelPacket#81: Could not find data channel for sid 0
Mar  8 13:59:57 archlinux jvb.sh[162136]: Jicofo 2022-03-08 13:59:57.746 SCHWERWIEGEND: [93] [confId=d168c4cd82961606 epId=626292d4 gid=19730 stats_id=Gage-mEu conf_name=NAME@conference.REALM] DataChannelStack.onIncomingDataChannelPacket#81: Could not find data channel for sid 0
Mar  8 13:59:58 archlinux jvb.sh[162136]: Jicofo 2022-03-08 13:59:58.554 SCHWERWIEGEND: [80] [confId=d168c4cd82961606 epId=9d2289ba gid=19730 stats_id=Philip-ifP conf_name=NAME@conference.REALM] DataChannelStack.onIncomingDataChannelPacket#81: Could not find data channel for sid 0
Mar  8 13:59:58 archlinux jvb.sh[162136]: Jicofo 2022-03-08 13:59:58.556 SCHWERWIEGEND: [80] [confId=d168c4cd82961606 epId=9d2289ba gid=19730 stats_id=Philip-ifP conf_name=NAME@conference.REALM] DataChannelStack.onIncomingDataChannelPacket#81: Could not find data channel for sid 0

@damencho
Copy link
Member

damencho commented Mar 8, 2022

@damencho Thanks, but this issue did not come up with a new java version but with some Jitsi update.

Yes, we have seen a similar problem with jigasi. Compiled with java 11 and running with java8. I'm just saying you can quickly fix it by running java11.

Can you confirm what is the java version that was used to create the binary packages you use?

@damencho
Copy link
Member

damencho commented Mar 8, 2022

jitsi/jigasi@8d5b46b

@bgrozev
Copy link
Member

bgrozev commented Mar 8, 2022

@tiiiecherle The exception indeed explains the low quality. PR #1830 should fix it. You can also setup websockets instead of SCTP data channels, or run on jre9+ (I don't think we've tested 17 though).

@tiiiecherle
Copy link
Author

@damencho and @bgrozev
Thank you both for the fast and really good help and support.

Indeed using jre11-openjdk seems to fix the issue for now.

Thanks also for implementing a fix so fast. I will stick with version 11 for now.

It would be nice if one of the next versions would be working with the latest java again.

Thanks again ;)

I think for now this can be closed.

@tiiiecherle
Copy link
Author

One last question for this issue:
I'm using this switch for testing latest and lowest installed java version. Is that the correct way of doing it?
VIDEOBRIDGE_GC_TYPE=G1GC

@tiiiecherle
Copy link
Author

@tiiiecherle The exception indeed explains the low quality. PR #1830 should fix it. You can also setup websockets instead of SCTP data channels, or run on jre9+ (I don't think we've tested 17 though).

What changes are necessary to switch to using websockets?

Is there a documentation about it somewhere?

Thanks

@bgrozev
Copy link
Member

bgrozev commented Mar 8, 2022

@bgrozev
Copy link
Member

bgrozev commented Mar 8, 2022

One last question for this issue:
I'm using this switch for testing latest and lowest installed java version. Is that the correct way of doing it?
VIDEOBRIDGE_GC_TYPE=G1GC

I don't understand your question. You can use this flag to force G1, but the shell script sets the preferred version automaticall (https://github.com/jitsi/jitsi-videobridge/blob/master/jvb/resources/jvb.sh)

@tiiiecherle
Copy link
Author

tiiiecherle commented Mar 8, 2022

@bgrozev

1
Thanks for the web socket link. I don't know when I will have time to try, but I keep it in mind.

2
Now I am a little confused about the java versions. I don't know where but I read somewhere that VIDEOBRIDGE_GC_TYPE=G1GC this sets up jvb to use the latest java version (in my case 17) instead of the default one. If this is not the case then I never tried version 17 and I can not tell yet if the issue would happen on version 17.

Edit: added rephrased question below.

@tiiiecherle
Copy link
Author

It seems that JAVA_VERSION= is just used in the script to detect which value to use for VIDEOBRIDGE_GC_TYPE= parameter, right?

So I rephrase the question and sorry for the confusion.

What is the recommended way for testing another java version that is not the system default?

@bgrozev
Copy link
Member

bgrozev commented Mar 8, 2022

Now I am a little confused about the java versions. I don't know where but I read somewhere that VIDEOBRIDGE_GC_TYPE=G1GC this sets up jvb to use the latest java version (in my case 17) instead of the default one.

That's incorrect (just confirming what you already found out).

What is the recommended way for testing another java version that is not the system default?

It's best to change the system's default java.

@tiiiecherle
Copy link
Author

@bgrozev
Thanks, for testing I changed the default system java to version 17 and the issue is not present. Everything seems to work. Thanks again. I guess now this can be closed.

@rasos
Copy link

rasos commented Jun 14, 2022

JVBs do not run anymore on JRE8. We get:

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/jitsi/videobridge/MainKt has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

since upgrading to 2.1-665 and with 2.1-681. We thought that #1830 still allows using JRE8.

Sure, JVBs work well with JRE11, however we are running some bridges on BigBlueButton servers (to share resources and save energy costs) which still support JRE8 only (BBB 2.4).

@damencho
Copy link
Member

We migrated all jitsi components to support java11+. Java8 is no longer an option in any of the components.

@saghul
Copy link
Member

saghul commented Jun 14, 2022

The Debian package shouldn't install with JDK8 even.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants