[Bug]: Displayed playback time lags behind real time #1323

Closed
opened 2026-04-24 23:39:44 +02:00 by adam · 6 comments
Owner

Originally created by @UrbanCMC on GitHub (Aug 18, 2023).

Describe the issue

I'm currently listening to an imported audiobook in m4b format that doesn't have any chapters.
I'm attempting to add them myself by listening to the audiobook, pausing when a new chapter begins, and adding a new chapter at that timestamp.

For some reason the displayed timestamp does not match the actual position in the audiobook. When I insert a new chapter it is always off by some time. The longer playback is running, the larger that offset becomes. As an example, the playback timer was displaying 2h 32m at the start of a new chapter, but when listening in the chapter editor, it starts well past the 3h mark.

This also causes issues when pausing playback for a bit, because resuming will then cause playback to continue from the displayed time, resulting in lost progress.

I'm observing this in both FireFox and Edge, with a playback speed of 1x.

Steps to reproduce the issue

  1. Listen to audiobook for some time.
  2. Pause playback, wait a few minutes.
  3. Resume playback. Observe some amount of lost progress.

Audiobookshelf version

v2.3.3

How are you running audiobookshelf?

Docker

Originally created by @UrbanCMC on GitHub (Aug 18, 2023). ### Describe the issue I'm currently listening to an imported audiobook in m4b format that doesn't have any chapters. I'm attempting to add them myself by listening to the audiobook, pausing when a new chapter begins, and adding a new chapter at that timestamp. For some reason the displayed timestamp does not match the actual position in the audiobook. When I insert a new chapter it is always off by some time. The longer playback is running, the larger that offset becomes. As an example, the playback timer was displaying 2h 32m at the start of a new chapter, but when listening in the chapter editor, it starts well past the 3h mark. This also causes issues when pausing playback for a bit, because resuming will then cause playback to continue from the displayed time, resulting in lost progress. I'm observing this in both FireFox and Edge, with a playback speed of 1x. ### Steps to reproduce the issue 1. Listen to audiobook for some time. 2. Pause playback, wait a few minutes. 3. Resume playback. Observe some amount of lost progress. ### Audiobookshelf version v2.3.3 ### How are you running audiobookshelf? Docker
adam added the bug label 2026-04-24 23:39:44 +02:00
adam closed this issue 2026-04-24 23:39:45 +02:00
Author
Owner

@NightHawk1993 commented on GitHub (Aug 18, 2023):

You can import chapters using the asin on chapter look up

@NightHawk1993 commented on GitHub (Aug 18, 2023): You can import chapters using the asin on chapter look up
Author
Owner

@UrbanCMC commented on GitHub (Aug 19, 2023):

That's true, but sadly this audiobook does not come from Audible, so I have to create the chapters manually.

@UrbanCMC commented on GitHub (Aug 19, 2023): That's true, but sadly this audiobook does not come from Audible, so I have to create the chapters manually.
Author
Owner

@nichwall commented on GitHub (Aug 19, 2023):

A few questions:

  1. Have you only used a web browser to get the timestamps?

  2. When you refer to "displayed timestamp", are you talking about the one on the book details page (circled in red) or in the player (circled in purple)? Screenshot is from Android, but same idea in browser.
    Screenshot_20230818-181424.png

I'm not sure if the book details page updates the progress continuously in a browser since I pretty much exclusively use the app. Are you watching it change and it's just behind where the player is?

  1. Playback resuming from the wrong place is being investigated, but hard to reproduce reliably. This may be unrelated but want to make sure. Am I correct about what you are doing below?
    a) Streaming in browser for a while (at least long enough to finish a chapter)
    b) Pausing when you get to the next chapter
    c) Updating the chapter metadata
    d) pressing resume (without refreshing the page or navigating away)
    e) Playback is resuming from somewhere in the previous chapter, far enough back that it is not caused by the audio rewind (up to 30 sec) OR are you skipping to the newly entered chapter time, which is wrong

  2. Is the file a variable or constant bitrate?

@nichwall commented on GitHub (Aug 19, 2023): A few questions: 1. Have you only used a web browser to get the timestamps? 2. When you refer to "displayed timestamp", are you talking about the one on the book details page (circled in red) or in the player (circled in purple)? Screenshot is from Android, but same idea in browser. ![Screenshot_20230818-181424.png](https://github.com/advplyr/audiobookshelf/assets/5686638/3e538628-9d98-4954-95cf-9eba03f160be) I'm not sure if the book details page updates the progress continuously in a browser since I pretty much exclusively use the app. Are you watching it change and it's just behind where the player is? 3. Playback resuming from the wrong place is being investigated, but hard to reproduce reliably. This may be unrelated but want to make sure. Am I correct about what you are doing below? a) Streaming in browser for a while (at least long enough to finish a chapter) b) Pausing when you get to the next chapter c) Updating the chapter metadata d) pressing resume (without refreshing the page or navigating away) e) Playback is resuming from somewhere in the previous chapter, far enough back that it is not caused by the audio rewind (up to 30 sec) OR are you skipping to the newly entered chapter time, which is wrong 4. Is the file a variable or constant bitrate?
Author
Owner

@NightHawk1993 commented on GitHub (Aug 19, 2023):

)

That's true, but sadly this audiobook does not come from Audible, so I have to create the chapters manually.

It doesn't matter yiu just need the asin and it will auto locate

@NightHawk1993 commented on GitHub (Aug 19, 2023): ) > That's true, but sadly this audiobook does not come from Audible, so I have to create the chapters manually. It doesn't matter yiu just need the asin and it will auto locate
Author
Owner

@UrbanCMC commented on GitHub (Aug 19, 2023):

Okay, so after spending a bunch of time trying things out, I have to accept that this was 100% user error.
Playing the audiobook on different browsers or the app would always play from a different position, even though the timestamp is the same on all of them.

I tried a few local media players and saw the same weird behavior there, so I'm at this point certain I screwed up with the rip. I tried a few other audiobooks to compare and couldn't reproduce any of these issues.

My apologies to anyone who wasted their time on this.

@UrbanCMC commented on GitHub (Aug 19, 2023): Okay, so after spending a bunch of time trying things out, I have to accept that this was 100% user error. Playing the audiobook on different browsers or the app would always play from a different position, even though the timestamp is the same on all of them. I tried a few local media players and saw the same weird behavior there, so I'm at this point certain I screwed up with the rip. I tried a few other audiobooks to compare and couldn't reproduce any of these issues. My apologies to anyone who wasted their time on this.
Author
Owner

@nichwall commented on GitHub (Aug 19, 2023):

Glad you got it figured out! It happens.

@nichwall commented on GitHub (Aug 19, 2023): Glad you got it figured out! It happens.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/audiobookshelf#1323