signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.54k stars 6.12k forks source link

[Video Chat] image freezes/stuck after a time or when switching cameras #8685

Closed peterpanondrugs closed 2 years ago

peterpanondrugs commented 5 years ago

Bug description

Video image freezes/stuck after a time or when switching to rear camera. Turning the camera anew on and off doesn't help. Reinstalling the app neither.

Steps to reproduce

Actual result: Video image freezes/stuck Expected result: Video image should continue running like in the other versions. I can't tell which one was the last working version.

Device info

Device: Samsung S7 Android version: 8.0.0 Signal version: 4.35.3

Link to debug log

https://debuglogs.org/fcfbe39774fec94041413896257c2055bda2f7570b18475f135fe4a12c8230f0

lckarssen commented 5 years ago

The same has been happening to me (at least for a couple of months).

Not sure if it is related, but since a week or two, maybe three, the receiving party also sees my video frozen (with the front facing camera, so not even switching cameras) after a couple of minutes of video calling.

Device info

Device: Samsung S7 Android version: 7.0.0 Signal version: 4.35.3

Vaesper commented 5 years ago

Same problem (also happening for a few months).

Device: OnePlus One (bacon) Android version: 8.1.0 Signal version: 4.35.3

five-c-d commented 5 years ago

This problem was brought up in the forum, https://community.signalusers.org/t/video-call-freezes-for-other-user/7022/3 has the relevant excerpts from the debuglog of @peterpanondrugs ...key portion was

E ACodec  : [OMX.Exynos.VP8.Encoder] ERROR(0x90000006)
E ACodec  : signalError(omxError 0x90000006, internalError -2147483648)
E MediaCodec: Codec reported err 0x90000006, actionCode 0, while in state 6

This is caused about ~20 seconds after successful CALL_CONNECTED, by flipping to the back-cam (or vice versa), and is seemingly specific to Samsung devices with the Exynos CPU, and is also specific to the VP8 codec.

Possibly this is a problem upstream, but they are marking it "patches welcome / reproduction steps on our AppRTCmobile test-apk needed" and not working towards a fix it looks like. https://bugs.chromium.org/p/webrtc/issues/detail?id=8736 + https://bugs.chromium.org/p/webrtc/issues/detail?id=9797 are the main bug-reports. Discussion here from August 2018 was helpful, https://github.com/oney/react-native-webrtc/issues/501#issuecomment-415245947 and in particular switching to another codec does work around the freeze.

If other folks will please post debuglog URLs from the caller AND the callee devices, shortly after hanging up on a cryptocall exhibiting the video-freeze issue, that will potentially help narrow down the exact range of impacted chips/devices. You can paste them here into github, or paste them over in the signalUsers thread linked at top of this comment

JeffMusgrave commented 5 years ago

Same issue here happening for the past few months like @Vaesper.

Samsung Galaxy S7 Android 8.0 Signal 4.37.1 (but its been happening for several versions now)

This issue has effectively made video calls completely unusable. Hope there's a fix down the pipe, either from the signal team or people working on webrtc.

peterpanondrugs commented 5 years ago

[Update] Now my chatpartner isn't able to see me starting directly a video call: debug. https://debuglogs.org/25ee3cb5d8256413af447563477de547450cf5d7494d8a6911d36b683135a652

Cre0 commented 5 years ago

Same issue here, it's happening over LTE and Wifi. The freezes seems to occur very random, everything from first second on established connection and at other times after 20 minutes. @five-c-d how can I change video codec? Just change it in mediaprofiles.xml, from like h.264 to h.263 or mpeg-4?

Oneplus One Android: 7.1.2 & 9.0 Signal 4.38.2 (begun from 4.35.3 from what I can remember and every version since)

Edit: Can try to grab logs from both caller and the callee. I know the other device is a Samsung galaxy s6 running android 7.0, with Signal 4.37.2

Edit2: Still trying to wrap my head around this. If the other person is freezing on my phone and never the other way around, for me to change codec (regardless of encoding or decoding) won't change that right? It's the person on Samsung galaxy s6 that needs to change their codec as a workaround?

derbederMRP commented 5 years ago

I have the same problem for months. Today it happened in first 15 seconds of video call too. It makes video calls impossible to use. I can ask for other sides debug log too if it will help.

Samsung Galaxy S7 Android 8.0

Debug log: https://debuglogs.org/97590e9baa33d3e91a0b9bd7329c331359bf7405ce8810ea20a8647316f28c52

JeffMusgrave commented 5 years ago

Any word on whether this bug is going to get any attention? Video calls are still totally unusable as of right now.

ghost commented 4 years ago

Is there anyone working on this issue so that it can be resolved finally, have been having this issue for months now, still can't have a video call properly and it crashes all the time.

greyson-signal commented 4 years ago

There's been a lot of changes to video calling since this issue was reported. If you experience it, please submit a debuglog.

ghost commented 4 years ago

Here are my Logs for when I have video called and it has crashed, I am using a Samsung s6: https://debuglogs.org/3ed9f95fdd0f93733f463494488d17ca19cbdb00f8e9ff6496e0a9d54459ce59 Here is my friends logs during the same call: https://debuglogs.org/ad267bdc5ecf0ef2305bdac36ef42eb4e997be0d8422828196295a90e937aa18 We both started to call around 17:22 CET and 16:22 GMT and then on his side my stream frozen and just turned black and he couldn't see any thing that I had shown him on my camera but his stream had continued without any issue and I could still see what he was streaming. These logs are when I have used the front facing camera when I was streaming and it has crashed from there.

As for the rear this is the logs where it also became black and he couldn't see anything, it happened on 17:42 CET: https://debuglogs.org/adce263e8300204d6a131d78d3c90de6bcf1b4e7dd0a7ec1ac2d480c894aa848

Hopefully this can help out in fixing this issue so that the video calling feature can finally become usable. If there are any other questions or logs that need to be collected, then I will be happy to help to provide them.

ghost commented 4 years ago

I have built the newest Signal build 4.54.2, with the commit (Add SM-G920F and BLK-L09 to LegacyCameraModels) which makes Samsung s6 use Legacy mode has fixed the #9150 issue, but still when video calls are being done then my video feed would freeze or go entirely black and then the person who is viewing the stream would not be able to see what is being shown live. So not entirely sure on what the issue is or could it still be app based issue that could be solved?

j850 commented 4 years ago

I experienced the same problem several times. After some time (5-15min) the video image during a video call freezes on my device. The video image on the call partners device is still normal then, the image freeze always only happens on my device. The issue does not seem to be related to switching from back to front camera, it happens also when I stay in the app and only use the front camera all the time.

Here is the corresponding debug log I made shortly after hanging up the last time the issue occured: https://debuglogs.org/c6fc3b779586b4849a5998d75ff720ba4ff92e2ffde7b9a0451572c8c8f12f22

Device: Samsung S7 Android version: 8.0.0 Signal version: 4.54.3

j850 commented 4 years ago

Here are two further debuglogs, that were created after the image was frozen in a video call. It is again the same characteristic, that the image only freezed on my device but not on my call partners device.

First debuglog (unfortunately no idea what caused the image freeze): https://debuglogs.org/1392b9ca077f9080d03f1a7cdb4a9786f11cf639ade8e2caf7ff3845be79741b

The second debuglog reports an image freeze after my call partner switched from back camera to front camera: https://debuglogs.org/0d5f25fced5c646622bea987835fe671e75529ef5eb09b03c5f4783e7d90bef7

derbederMRP commented 4 years ago

I also have the issue for a long time. Here is the debug log:

https://debuglogs.org/a2761922504a5d4b0b13f80f28c20ec6f5586d0c65e3a1896ce9bd3f27bede31

Image gets frozen after some minutes of video call.

saghul commented 4 years ago

FWIW we (Jitsi) had similar issues and switching to the software encoder seems to have helped.

ghost commented 4 years ago

FWIW we (Jitsi) had similar issues and switching to the software encoder seems to have helped.

Is this fix going to be implemented into any future versions of signal so that this issue can finally be resolved in the end?

JeffMusgrave commented 4 years ago

Is this fix going to be implemented into any future versions of signal so that this issue can finally be resolved in the end?

At least if we had some sort of switch in the settings for hardware/software encoding that would be nice (at least if that's the real problem signal is having).

ionphractal commented 4 years ago

Just to put in my coin. It happens on my Nokia 6.1 (Android 9 and recently 10) as well as on a Sony Xperia XA2 Ultra (Android 9) where I could get the debug log from: https://debuglogs.org/e0aa830195db4e97cc014ded22269205e84d523820c353b0bfe3e7073c820e05

It could be related to round trip time as I couldn't replicate it between above two when they were not far apart network wise yet they still show the same pattern when calling to Japan (both call partners have a >100Mbit cable/fiber connection like myself yet but an older smartphone) . Additionally it hasn't been always the case. I can't directly associate it to a version but there was a time between last year August and December where I had no issues at all calling to Japan. But starting in January you can bet it crashes, yet not at a 100% chance. Currently when I notice a slight but periodic single stutter in my own camera image, it is most certain to happen, then my camera completely freezes and the call will be disrupted/cut off after around 10s though audio and the call partner's video still work until the end.

saghul commented 4 years ago

FWIW, here is how those with affected devices might be able to test this.

Here: https://github.com/signalapp/ringrtc/blob/d816012799dfacf9c9b69f30b7cf2bdcac57b78c/src/android/api/org/signal/ringrtc/CallManager.java#L762 replace DefaultVideoEncoderFactory with SoftwareVideoEncoderFactory (it takes no parameters).

You'll need to rebuild the ringrtc library, then Signal itself.

Note that CPU usage will be higher.

ghost commented 4 years ago

FWIW we (Jitsi) had similar issues and switching to the software encoder seems to have helped.

As Jitsi had managed to fix the issue I have tried there app, Jitsi Meet, on my Samsung s6 and there is no Video problem everything works and no black screens.

FWIW, here is how those with affected devices might be able to test this.

Here: https://github.com/signalapp/ringrtc/blob/d816012799dfacf9c9b69f30b7cf2bdcac57b78c/src/android/api/org/signal/ringrtc/CallManager.java#L762 replace DefaultVideoEncoderFactory with SoftwareVideoEncoderFactory (it takes no parameters).

You'll need to rebuild the ringrtc library, then Signal itself.

Note that CPU usage will be higher.

As for the fix which Saghul had proposed I was unable to build the RIngRTC due to many errors I was getting during the building process. And so if any other developer is up to the challenge they would be welcome to build the RingRTC library with the changes which he has proposed and then build the Signal app with it, and so if they could upload the APK, I will be willing to test it out to see if the issue has been fixed.

But as I have tested the Jitsi Meet program and so it has fixed the issue, I would say that it would be appropriate if the signal team could implement such a change in Encoders through the use of a toggle in a settings tab for example. As suggested here:

Is this fix going to be implemented into any future versions of signal so that this issue can finally be resolved in the end?

At least if we had some sort of switch in the settings for hardware/software encoding that would be nice (at least if that's the real problem signal is having).

erik55 commented 4 years ago

I always have this problem with the Samsung S6 (calling from S9). The image sent from the S6 freezes after rapid movements. Or sometimes without any obvious reason.

haltman-at commented 4 years ago

I've been having this issue as well -- or rather, I don't see the screen freeze, but the person I'm talking to does.

Debug log for me: https://debuglogs.org/aba40dd9c8e930fcaa07b91f5703c1cb95480097d611895809c05d789ece2121

Debug log for the person who sees the freezing: https://debuglogs.org/0f1b6f127b160323bc55ef903882b622c667de5a387913ad757ad95ae40dd9fc

Tectract commented 3 years ago

BUMP. This is a major, critical bug. Signal video freezes and is unusable on Android, as of January 2021.

mehmetalianil commented 3 years ago

This happens to me when the amount of change in the video streamed is high, when there is a jerky motion, or when the camera is changed.

cbkerr commented 3 years ago

I also have this issue where the video of my chatpartner freezes on my device after chatpartner switches video from front to back camera. We are both on the latest Signal update from January.

My device: SM-G955U1 (Samsung Galaxy S8+)

Chatpartner's device: SM-J337AZ (Samsung Galaxy Amp Prime 3) Its chipset is apparently, 64bit - Samsung Exynos 7 Quad 7570 (14nm) , in agreement with the comment above.

I will update with debug logs when we have a chance to reproduce.

reglos commented 3 years ago

Same problem on a Samsung Galaxy S6 edge.

stale[bot] commented 2 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.