[Major]Opus 16kHz recordings from Android-Audio-Recorder are corrupted

Hi,

Opus 16kHz recordings from Android-Audio-Recorder v3.4.5 cannot be played by VLC (neither by VLC v3.4.0 with Android 8.1 on BlackView BV9500Pro nor by VLC on Ubuntu 20.04 LTS), the sound is jerky.

opusinfo from opustools prints 85766 messages: "WARNING: Sample count behind granule"

Here's the opusinfo output

$ opusinfo toto.opus
Processing file "toto.opus"...

New logical stream (#1, serial: 00007170): type opus
WARNING: Implausibly low preskip in Opus stream (1)
Encoded with Gagravarr.org Java Vorbis Tools v0.8 20160217
WARNING: Sample count behind granule (3840<4800) in stream 1
WARNING: Sample count behind granule (5760<7680) in stream 1
WARNING: Sample count behind granule (7680<10560) in stream 1
WARNING: Sample count behind granule (9600<13440) in stream 1
WARNING: Sample count behind granule (11520<16320) in stream 1
WARNING: Sample count behind granule (13440<19200) in stream 1
WARNING: Sample count behind granule (15360<22080) in stream 1
WARNING: Sample count behind granule (17280<24960) in stream 1
WARNING: Sample count behind granule (19200<27840) in stream 1
WARNING: Sample count behind granule (21120<30720) in stream 1
WARNING: Sample count behind granule (23040<33600) in stream 1
WARNING: Sample count behind granule (24960<36480) in stream 1
WARNING: Sample count behind granule (26880<39360) in stream 1
WARNING: Sample count behind granule (28800<42240) in stream 1
WARNING: Sample count behind granule (30720<45120) in stream 1
WARNING: Sample count behind granule (32640<48000) in stream 1
......
Opus stream 1:
        Pre-skip: 0
        Playback gain: 0 dB
        Channels: 1
        Original sample rate: 16000Hz
        Packet duration:   40.0ms (max),   40.0ms (avg),   40.0ms (min)
        Page duration:     40.0ms (max),   40.0ms (avg),   40.0ms (min)
        Total data length: 12216053 bytes (overhead: 19.7%)
        Playback length: 85m:46.000s
        Average bitrate: 18.99 kb/s, w/o overhead: 15.26 kb/s
Logical stream 1 ended

It says Playback length: 85m:46.000s which is incorrect.

Because the real duration of this recording is 57m:10s.

Hence the durations of toto.opus and that of the decoded stream do not match :

$ opusdec toto.opus toto.wav 
Decoding to 16000 Hz (1 channel)
Encoded with Gagravarr.org Java Vorbis Tools v0.8 20160217
Decoding complete.        
$ mediainfo toto.opus toto.wav 
General
Complete name                            : toto.opus
Format                                   : Ogg
File size                                : 11.7 MiB
Duration                                 : 1 h 25 min
Overall bit rate                         : 19.0 kb/s

Audio
ID                                       : 29040 (0x7170)
Format                                   : Opus
Duration                                 : 1 h 25 min
Channel(s)                               : 1 channel
Channel layout                           : C
Sampling rate                            : 16.0 kHz
Compression mode                         : Lossy
Writing library                          : Gagravarr.org Java Vorbis Tools v0.8 20160217 (UTC 2016-02-17)

General
Complete name                            : toto.wav
Format                                   : Wave
File size                                : 105 MiB
Duration                                 : 57 min 10 s
Overall bit rate mode                    : Constant
Overall bit rate                         : 256 kb/s

Audio
Format                                   : PCM
Format settings                          : Little / Signed
Codec ID                                 : 1
Duration                                 : 57 min 10 s
Bit rate mode                            : Constant
Bit rate                                 : 256 kb/s
Channel(s)                               : 1 channel
Sampling rate                            : 16.0 kHz
Bit depth                                : 16 bits
Stream size                              : 105 MiB (100%)

Can you please help ?

Edited by SebM