meshenger-app / meshenger-android

P2P Voice/Video phone App for local networks.
GNU General Public License v3.0
698 stars 108 forks source link

Quality sharpness #126

Closed CWTakiku closed 3 months ago

CWTakiku commented 1 year ago

How to improve clear picture quality, adjustment does not seem to work

mwarning commented 1 year ago

Have you tried Meshenger 4.2.4? And have you tried changing the resolution via the menu (small gear icon in the left top corner) during a call?

CWTakiku commented 1 year ago

Yeah, I don't know if it's my phone's camera, but I changed it to capture and cast, and it's blurry, even though I set resolution first

mwarning commented 1 year ago

Then it is hard to say why WebRTC cannot or won't capture a higher quality video stream.

CWTakiku commented 1 year ago

I switched to h264 encoding and the sharpness improved a lot, but the latency issues remained

mwarning commented 1 year ago

hm, where did you switch it to h264?

CWTakiku commented 1 year ago

I customized the encoderFactory, which uses vp8 by default, and I changed it to h264

mwarning commented 1 year ago

Please share you changes. Maybe it is enough to expose the vp8 and h264 setting. Then I could add those as settings.

CWTakiku commented 1 year ago

image

mwarning commented 1 year ago

Nice. Have you tried to just disable VP8? https://github.com/meshenger-app/meshenger-android/blob/master/app/src/main/kotlin/d/d/meshenger/call/RTCCall.kt#L531 (with enabled hardware accelaration)

CWTakiku commented 1 year ago

Yes, it didn't work when I just set vp8 to false, I used a custom coding factory that worked, and now my picture quality and fluency have improved when I coded with h264 and reduced the frame rate, but there is a key problem that sometimes my picture gets blurry for a moment due to the webrtc strategy image

mwarning commented 1 year ago

Thank you. I will give it a try.

mwarning commented 1 year ago

@CWTakiku can you try a fresh install of https://github.com/meshenger-app/meshenger-android/commit/48756d0e44fe56c6c797202c1dd13005b7859197 on both phones?

Btw., the video codec limit to h264 makes by phone unable to connect. I am still investigating.

CWTakiku commented 1 year ago

I looked at your commit history, it seems that you did not set up a custom factory, just configured the default acceleration factory, I will provide my coding factory class for you to see 新建 文本文档 (8).txt

mwarning commented 1 year ago

@CWTakiku thank you, I will give it a try. I did not commit my custom factory, since it broke the call feature for me.

mwarning commented 1 year ago

I tried the code with only isSupportedH264 returning true (like in your screenshot), but now the phones cannot establish a connection.

Aside from that, the picture quality with the current master is pretty good (HD).

CWTakiku commented 1 year ago

What you need is that both the receiver and the sender need to set up the custom encoder to establish the connection, and how does your image quality improve

mwarning commented 1 year ago

hm, I had the same software on both devices. Here is the source code: https://github.com/meshenger-app/meshenger-android/tree/h264

mwarning commented 1 year ago

I will do an intermediate release with enabled hardware decoding by default (it wasn't working right before). Then let's do more testing.

CWTakiku commented 1 year ago

Ok, theoretically it's OK, but it's been proven to work on my side and has been used in my own projects

mwarning commented 3 months ago

Let's close this issue. It seem to be resolved. But the CPU overuse detection might still ruin the day. But it can be disabled in the setting on the users own risk.