[Issue]: Wrong play time shown #5504

Closed
opened 2025-12-22 01:50:56 +01:00 by backuprepo · 9 comments
Owner

Originally created by @stefan1983 on GitHub (Mar 5, 2024).

Originally assigned to: @gnattu on GitHub.

Please describe your bug

Hey there,

I am using Jellyfin 10.8.13 on a Linux server 5.10.0-0.deb10.16-amd64 Debian 5.10.127-2~bpo10+1 (2022-07-28) x86_64.
When using the web browser or any client to play my music, I always get a wrong play time shown. Especially when using gapless tracks (live albums) those are completely off:

Web player:
308967832-20901e66-b8b3-436a-8eac-807f9bbf3e07

Finamp (counts further):
308661745-136cd2cd-dae6-4ce7-9f2e-adc985eeeca9

Is there anything I can do on server side?
The files don't have any issues when playing somewhere else (foobar2000, IINA, VLC...).
That are just standard MP3 or FLAC files.

Reproduction Steps

Just play music in the web or any available jellyfin compatible app (iOS / macOS).

Jellyfin Version

10.8.13

if other:

No response

Environment

- OS: Debian
- Linux Kernel: -
- Virtualization: - 
- Clients: WEB, Jellyfin iOS App, Finamp
- Browser: Safari / Chrome
- FFmpeg Version: -  
- Playback Method: -
- Hardware Acceleration: none
- GPU Model: Intel Onboard
- Plugins:
- Reverse Proxy:
- Base URL:
- Networking:
- Storage:

Jellyfin logs

Attached

FFmpeg logs

No response

Please attach any browser or client logs here

No response

Please attach any screenshots here

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
Originally created by @stefan1983 on GitHub (Mar 5, 2024). Originally assigned to: @gnattu on GitHub. ### Please describe your bug Hey there, I am using Jellyfin 10.8.13 on a Linux server 5.10.0-0.deb10.16-amd64 Debian 5.10.127-2~bpo10+1 (2022-07-28) x86_64. When using the web browser or any client to play my music, I always get a wrong play time shown. Especially when using gapless tracks (live albums) those are completely off: Web player: ![308967832-20901e66-b8b3-436a-8eac-807f9bbf3e07](https://github.com/jellyfin/jellyfin/assets/8542806/55d498fa-c4a2-4e3a-8753-d3f692ec1e9b) Finamp (counts further): ![308661745-136cd2cd-dae6-4ce7-9f2e-adc985eeeca9](https://github.com/jellyfin/jellyfin/assets/8542806/531a347d-1877-437c-aac3-10545ecbd15f) Is there anything I can do on server side? The files don't have any issues when playing somewhere else (foobar2000, IINA, VLC...). That are just standard MP3 or FLAC files. ### Reproduction Steps Just play music in the web or any available jellyfin compatible app (iOS / macOS). ### Jellyfin Version 10.8.13 ### if other: _No response_ ### Environment ```markdown - OS: Debian - Linux Kernel: - - Virtualization: - - Clients: WEB, Jellyfin iOS App, Finamp - Browser: Safari / Chrome - FFmpeg Version: - - Playback Method: - - Hardware Acceleration: none - GPU Model: Intel Onboard - Plugins: - Reverse Proxy: - Base URL: - Networking: - Storage: ``` ### Jellyfin logs ```shell Attached ``` ### FFmpeg logs _No response_ ### Please attach any browser or client logs here _No response_ ### Please attach any screenshots here _No response_ ### Code of Conduct - [X] I agree to follow this project's Code of Conduct
backuprepo 2025-12-22 01:50:56 +01:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@stefan1983 commented on GitHub (Mar 5, 2024):

Attached the log file:
Log.txt

@stefan1983 commented on GitHub (Mar 5, 2024): Attached the log file: [Log.txt](https://github.com/jellyfin/jellyfin/files/14500578/Log.txt)
Author
Owner

@stefan1983 commented on GitHub (Mar 5, 2024):

I would be able to deliver sample files if needed.

@stefan1983 commented on GitHub (Mar 5, 2024): I would be able to deliver sample files if needed.
Author
Owner

@stefan1983 commented on GitHub (Mar 5, 2024):

I just found out that it is specific to macOS Safari. When using another browser, there is no such issue.
Currently I am using Safari Version 17.3.1:

image
@stefan1983 commented on GitHub (Mar 5, 2024): I just found out that it is specific to macOS Safari. When using another browser, there is no such issue. Currently I am using Safari Version 17.3.1: <img width="396" alt="image" src="https://github.com/jellyfin/jellyfin/assets/8542806/226820da-aaf6-40d8-8034-b5acb4168a78">
Author
Owner

@gnattu commented on GitHub (Mar 5, 2024):

It seems to be related to jellyfin/jellyfin-roku#1629, and it happens to certain media files where the playback time is encoded weirdly.

@gnattu commented on GitHub (Mar 5, 2024): It seems to be related to jellyfin/jellyfin-roku#1629, and it happens to certain media files where the playback time is encoded weirdly.
Author
Owner

@Chaphasilor commented on GitHub (Mar 9, 2024):

@stefan1983 you could try re-encoding your files with ffmpeg or Audacity. If @gnattu is correct and it's a problem with the track itself, that might help 🤔

@Chaphasilor commented on GitHub (Mar 9, 2024): @stefan1983 you could try re-encoding your files with ffmpeg or Audacity. If @gnattu is correct and it's a problem with the track itself, that might help 🤔
Author
Owner

@stefan1983 commented on GitHub (Mar 11, 2024):

So, after re-encoding to m4a files (ALAC) I was able to see the correct play time in the jellyfin apps.

But I am still wondering though why the original FLAC files didn't show any issue when playing outside of jellyfin (foobar2000, IINA, VLC...).

@stefan1983 commented on GitHub (Mar 11, 2024): So, after re-encoding to m4a files (ALAC) I was able to see the correct play time in the jellyfin apps. But I am still wondering though why the original FLAC files didn't show any issue when playing outside of jellyfin (foobar2000, IINA, VLC...).
Author
Owner

@gnattu commented on GitHub (Mar 11, 2024):

Well, at this point, we cannot do much here.

For some tracks/formats (FLAC/VBR MP3), we have to set AVURLAssetPreferPreciseDurationAndTimingKey : true on Apple platforms; otherwise, seeking would result in incorrect timing (off by a few seconds or completely off). This option will have a performance impact, so it is disabled by default.

This option can be set by native players, but I'm not sure if there is any way to set it for browsers. Perhaps we can implement an audio-remuxing mechanism to remux FLAC into fmp4 containers and stream it, which could potentially solve this issue not only for Apple platforms but also for the Roku case I've linked.

@gnattu commented on GitHub (Mar 11, 2024): Well, at this point, we cannot do much here. For some tracks/formats (FLAC/VBR MP3), we have to set `AVURLAssetPreferPreciseDurationAndTimingKey : true` on Apple platforms; otherwise, seeking would result in incorrect timing (off by a few seconds or completely off). This option will have a performance impact, so it is disabled by default. This option can be set by native players, but I'm not sure if there is any way to set it for browsers. Perhaps we can implement an audio-remuxing mechanism to remux FLAC into fmp4 containers and stream it, which could potentially solve this issue not only for Apple platforms but also for the Roku case I've linked.
Author
Owner

@jellyfin-bot commented on GitHub (Aug 20, 2024):

This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs.

If you have any questions you can use one of several ways to contact us.

@jellyfin-bot commented on GitHub (Aug 20, 2024): This issue has gone 120 days without an update and will be closed within 21 days if there is no new activity. To prevent this issue from being closed, please confirm the issue has not already been fixed by providing updated examples or logs. If you have any questions you can use one of several ways to [contact us](https://jellyfin.org/contact).
Author
Owner

@BBaoVanC commented on GitHub (Aug 21, 2024):

This is still an issue, please do not close.

@BBaoVanC commented on GitHub (Aug 21, 2024): This is still an issue, please do not close.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: starred/jellyfin#5504
No description provided.