Jump to content

Emby for Android 3.5.75: video suddenly fast-forwards while audio continues normally


Go to solution Solved by Luke,

Recommended Posts

Posted

Hi,

During playback in Emby for Android, the video suddenly appears to fast-forward while the audio continues at normal speed, causing A/V desynchronization.

This affects more than one file and occurs at different playback positions in different files. For the episode described below, it consistently reproduces around 35:47.

Environment:
- Emby for Android 3.5.75 (com.mb.android, universal Android app)
- Emby Server 4.10.2.0
- TCL Smart TV Pro / G08, MediaTek mt5896, Android 14

Restarting both the TV and server did not help. The issue occurred on 3.5.72 and persists after updating to 3.5.75. The tested video plays correctly in a browser and kodi and VLC.

For this example, seeking to around 35:30 and playing through 35:47 reproduces the issue. It also occurred when watching from the beginning.

I followed the Android logging instructions: enabled app logging, force-stopped and restarted the app, reproduced the issue, and collected the app's file log and corresponding server log.

During the failure, the app log repeatedly reports:

AudioSink$UnexpectedDiscontinuityException:
Unexpected audio track timestamp discontinuity:
expected 1002147689589, got 1002147483647

Subsequent errors repeatedly report:
expected 1002147707647, got 1002147483647

EventLogger also reports repeated batches of 50 dropped frames.

For comparison, FFmpeg successfully decoded both video and audio from 33:00 through 39:00 of this episode without errors.

Please let me know which logs or additional diagnostics would be useful and whom I should send them to privately.

Thank you!

emby_android_1794939595329.txt

Posted

I asked an AI coding assistant to investigate the stack trace and inspect the ARMv7 APK. It found something that may help narrow this down.

The log shows that playback uses FfmpegExtractor. In the shipped libffmpegJNI.so from 3.5.75, the native function FfmpegExtractorJni_ffmpegReadSample converts a timestamp in microseconds to a signed 32-bit integer, then sign-extends it before writing it to the Java timeUs field:

0xf432: vmul.f64 d16, d16, d17  ; multiply by 1000000.0
0xf436: vcvt.s32.f64 s0, d16   ; convert to signed 32-bit
0xf43a: vmov r0, s0
0xf43e: vstr s0, [sp]
0xf442: asrs r0, r0, #31
0xf444: str r0, [sp, #4]
0xf448: blx r3                 ; JNI SetLongField

The destination field was checked against the field ID initialized for timeUs.

That conversion saturates at 2,147,483,647 microseconds = 35:47.483647. This matches the failure point in the captured reproduction and the repeated timestamp in the log:

expected 1002147689589, got 1002147483647

After subtracting the apparent 10^12 offset, the reported value is exactly INT32_MAX.

Posted

Hi, thanks for the tip. We'll review this. In the meantime, you could try 3.5.76 as it has an updated exoplayer. Thanks.

  • Like 1
  • Solution
Posted

Hi, this is resolved in 3.5.78. Thanks.

Bloodlizard
Posted

Everything is OK, thanks for help and fixing this!

  • Thanks 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...