Broken Video/Camera (zoom, switch cameras, resetting, etc)
- [x] I have searched open and closed issues for duplicates
- [x] I am submitting a bug report for existing functionality that does not work as intended
- [x] I have read https://github.com/signalapp/Signal-Android/wiki/Submitting-useful-bug-reports
- [x] This isn't a feature request or a discussion topic
Bug description
The whole video system is ridiculously broken. There's multiple components so I give them sections. This list is incomplete but what I just faced today, in the last 3 hrs. I've experienced cameras issues for years, across phones, so I'm sure the team and many users are quite familiar with many of them unless there is not enough dogfooding.
For the most part I opt to take photos from outside the app, then import them in but this is often cumbersome, especially around video as I will have to spend minutes finely cropping the video up to be under 1m and Google's poor interface won't show me crop times and Signal's poor interface won't allow me to crop or send at a lower resolution (sure, let's make that a feature request). It is also useful when I don't want to keep the photo and fill up my library.
Regardless, there are an unacceptable amount of bugs in the app around video. I would prioritize the zooming and video initialization as those are the most consistent and have highest degree of impact. They are also the most straight forward to resolve.
-
Initializing Video When previewing video you are looking through the camera at 1x zoom. If you press and hold for video you zoom out to 0.7x if you have a wide angle lens.
-
Zooming The zoom is performed by sliding your finger up and down the screen. Sensitivity is high and likely impossible to accurately set. This causes the camera to jitter more than a dead enemy in Starfield. This was reported back in November
-
Orientation Camera can be locked into weird orientations that do not match the phone's orientation. Such as opening the camera with the phone in landscape the view will be as if you are holding the phone vertical. Quite disorienting.
-
Blank Screen When Pressing Back Sometimes the camera will just show a blank screen
Steps to reproduce
- Initializing Video
- Get phone with wide angle lens. Open camera from Signal app. Press and hold camera button.
- Zooming
- Start video. Zoom. Try to channel your inner surgeon.
- Orientation
- Open Signal. Turn phone sideways. Press camera button
- Open Signal. Hold phone vertically. Press camera button, turn phone sideways, take a video. Continue holding phone sideways, press back to exit video preview and go back into camera interface. Orientation should be incorrect
- Open Signal, press camera button, change orientation before you see the preview.
- Bug can be inconsistent. I do not know the specific incantation.
- Blank Screen When Pressing Back
- Take picture from Signal app. Press back
- Issue is not consistent but happens enough that it should be able to be experienced with <10 minutes of playing around. If having trouble, try performing different operations like changing cameras or orientation. I'm unsure the exact incantation here.
Possible Solutions
I don't know the ecosystem as well, so suggested solutions are naive. But they can help clarify desired behavior or sometimes give hints, so I'm adding this section for that reasoning.
-
Initializing Video Take zoom value at state before camera button is pressed, use that for initial zoom value on video. This will also have the added benefit of not requiring a person to zoom in or out on what they have already properly framed and lined up in the camera. Don't undo their work.
-
Zooming Change UI. Seriously. There's a reason all the other applications will fix the zoom and require pressing a fixed zoom and/or use a horizontal slider for zoom. There's a reason you press and are not required to hold to record video. It'll be very difficult to properly set the sensitivity level for how to zoom correctly, and it'll be dependent on device to device and change over time. It is out of your control and any time you spend here will only be undone as the phone is used. Even if never upgraded or anything else. I should mention that there are large disability reasoning for this as well. Implementation makes usage very challenging for those without thumbs or other missing or damaged fingers. The implementations is also unusable for anyone who does not have fine motor control (though stock phone apps won't have the same issues!). My use of "unusable" is not exaggeration unless we consider a standard of Blair Witch Project style video shooting be "usable."
Please just change UI. I do not believe this problem can be solved via the standard UI.
- Orientation The bug appears to me as if the orientation is set at some point. Like either when the camera button is pressed or something else. This could be a pull rate issue.
Additional Info
Some of these issues may be related to some of the weird behaviors in calling (both phone and desktop). I'm sure others have experienced the orientation or blank screening there.
Device info
Device: Pixel 6 Pro Android version: 14 Signal version: 6.45.0
Note: report from Nov in Community was using Signal version 6.40.4. But many of these issues have existed for years and across devices. I faced many of them back when I had the Pixel 2 and even before when I had a Nexus 6.
Link to debug log
Will attempt to provide upon sufficient request. These are not necessary for some issues like the zoom which is mostly due to bad UI. I will add video if necessary upon sufficient request but I doubt it'll be necessary or difficult to reproduce.
1. Initializing Video When previewing video you are looking through the camera at 1x zoom. If you press and hold for video you zoom out to 0.7x if you have a wide angle lens.
I partially fixed this issue in #13411, but I need a bit more help to figure out the rest of the behavior.
I'm not an android dev either nor do I know Java. But I looked at the code since you linked it. This is all a guess.
Isn't the issue .getMinZoomRatio()? That's what's making it zoom out, right?
77 happens after you finish recording?
145 happens when you start?
Do either of these events need to change the camera state? If you drop the lines does it just record at the zoom level you are in before you start to record? That would be ideal imo and I think makes the most sense from the user perspective. That you record what you view just like you take a picture at the zoom you see? I guess you could add a default zoom state in the class function but I would think jumping from zoom to 1x would still not be ideal UX.
For jitter, does onZoomIncremented (233) get called when you move your finger or continuous? Not sure how it gets called. If former then the jitter can be solved by not LERPing. Which would be: move range (235) to a class variable so you don't continually compute. I think this line could be an issue too. Does range change due to having a wide angle? Telephoto? It is shrinks the range that could by why this is experienced on our devices and might not be felt on other devices.
Then change cameraController.setZoomRatio((range * increment) + zoomState.getMinZoomRatio()); to something logarithmic? That way small movements don't change zoom much. But if this is run continuously that wouldn't work but the same idea could help. Use an interpolation function that is insensitive to small changes but linear thresholding probably isn't a good idea for the same reason. Power or log should do but you'd need to tune the parameter for the right feel and I suspect that changes by phone.
I still think the format change would be the best solution though.
I have the same problem. https://debuglogs.org/android/7.13.3/c0a45ca4352c903090e982f05bfe1b04c69ee24a64add33e7775d6e41e4d338c
I have to say that the jittery zoom issue still exists too. I understand this is a hard problem to solve, but I think we can all agree that by requiring a user to hold the button to record AND slide their finger to zoom is like trying to solve this problem on hard mode.
I'll also insist that it makes things harder for many that are physically impaired.
If you insist on using this method, at least change LERP to a more appropriate easing function. I'd suggest one of the many s-curves. This can be a quick (one line!) and simple patch to at least improve the situation.
And please, dogfood.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been closed due to inactivity.
Marked stale but not resolved. Don't close as completed unless completed.