signalapp / Signal-Desktop

A private messenger for Windows, macOS, and Linux.
https://signal.org/download
GNU Affero General Public License v3.0
14.69k stars 2.68k forks source link

Shown length of voice messages is always inaccurate #7036

Closed NetSysFire closed 1 month ago

NetSysFire commented 1 month ago

Using a supported version?

Overall summary

This is pretty much exactly #6908, except that this is a supported signal desktop build. The issue has been present since quite some time but I could never bothered to report this until now. This is a minor issue as the effect is purely cosmetic and does not actually affect how a voice message is played.

Steps to reproduce

  1. Receive any voice message from a user.
  2. Play the voice message.

Expected result

The timer and progress bar matches the length of the voice message exactly.

Actual result

The progress bar and timer reaches its end too soon. Any voice message is pretty much always a couple of seconds longer than the UI expects. I think this scales with length, the longer the voice message, the higher the inaccuracy.

With a 2 minutes and 18 seconds long voice message I got ~11 seconds of inaccuracy.

Voice message as displayed in signal desktop: image

The very same voice message as displayed on my linked Android phone: image

The sender of the voice message also uses Android.

Screenshots

No response

Signal version

7.26.0 production

Operating system

Arch Linux

Version of Signal on your phone

7.17.6 (Android)

Link to debug log

In app.log I see the following events spammed after the voice message exceeds the expected length:

{"level":30,"time":"2024-09-28T14:59:41.497Z","msg":"NotificationService not updating notifications. Notifications are enabled; app is focused; there is no notification data"}
{"level":30,"time":"2024-09-28T14:59:42.473Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.494Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.534Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.554Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.575Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.595Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.615Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.636Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.656Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.696Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.716Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.737Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.757Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.778Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.798Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.818Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.859Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.879Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.899Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.920Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.940Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.961Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:42.980Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.021Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.042Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.062Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.083Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.103Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.124Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.143Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.184Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.205Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.224Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.244Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.265Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.286Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.306Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.347Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.367Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.387Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.408Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.428Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.448Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":30,"time":"2024-09-28T14:59:43.469Z","msg":"SmartVoiceNotesPlaybackProvider: `durationchange` event [REDACTED]2a0"}
{"level":40,"time":"2024-09-28T14:59:43.469Z","msg":"ActionRateLogger: got 25 events since 1727535582940: audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/CURRENT_TIME_UPDATED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/CURRENT_TIME_UPDATED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED,audioPlayer/DURATION_CHANGED"}
scottnonnenberg-signal commented 1 month ago

Can you talk about what kind of device sent those messages with the incorrect duration? It's more about the sender than the receiver, based on what we've seen.

NetSysFire commented 1 month ago

Sender is Android, too. A samsung device, probably A15 or the likes. What exact information do you need?

scottnonnenberg-signal commented 1 month ago

We've gotten other reports of inaccurate audio durations when Android sends to Desktop. Maybe you could test the other direction, or Desktop <-> Desktop? It's likely that this is the same bug we've seen with Android in the past.

NetSysFire commented 1 month ago

I did some testing and desktop <-> desktop appears fine. However, when I download one of the affected voice messages and resend them from desktop, same issue. It appears that the android version is recording slightly broken files because if I play the aac file with mpv, I get the exact same issue. Test voice message is displayed as 35 seconds long but is actually 38 seconds long. With an added warning from ffmpeg:

[ffmpeg/demuxer] aac: Estimating duration from bitrate, this may be inaccurate

Unfortunately I can not upload the voice message here for privacy reasons but I may be able to supply one tomorrow.

Edit: Signal desktop produces mp3 files when recording a voice message in contrast to aac on Android.

scottnonnenberg-signal commented 1 month ago

Yeah, I think your best bet is to file the bug on Signal Android with the actual audio file: https://github.com/signalapp/Signal-Android/issues. I'm going to close this.