-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pausing book (local or streamed) randomly chooses where playback will resume (forward or backwards from actual paused point) #804
Comments
With downloaded books the playback position should not be affected by server updates. You can test this by going on airplane mode and playing the downloaded book. When you do that are you still getting this error of the position jumping around? Also, are these mp3 or m4b or other audio files? |
Testing Airplane mode now. I can see where there was a client server time sync issue. Before placing the phone on Airplane, I noticed the server showed I had 3h 14m remaining and the client on my phone reported 2:37 minutes remaining. Coming out of Airplane mode the client and server synced the time remaining. Uninstalling app, removing cached files, restarting phone, re-installing / configuring app results in no change. Added test of only streaming (not locally downloaded) and book tends to jump forward apx 30 seconds after being paused while accessing another app. ie: playing game while book playing in background, pause book, let ads roll by on other app, un-pause book and fumble back to locate where I paused the book. All audiobooks in my collection are m4b. |
When testing in Airplane mode, playback and pause worked as normal. Pause times were 5, 10 and 30 minutes. Only jumped back to the max of 30 seconds. When I paused, went back to WiFi and resumed playback all was ok. During lunch I paused again and resumed playback 45 minutes later. I opened the app to go to history and pressed play on my ear bud. Noticed the progress bar jump back a bit. Looked at history and it was an 8 minute jump back. I have listened off and on since then and of course no jump back. |
This same issue is happening to me. It's always jumping backwards. I have the book downloaded |
It would be great if we can confirm that this is specific to downloaded books, which I think it is. Keep in mind that there is an automatic rewind after pausing for X amount of minutes. Some of this sounds like it might be the auto-rewind feature. As of v0.9.65 this is the auto-rewind times for android: val time: Long = System.currentTimeMillis() - lastPauseTime
val seekback: Long
if (time < 10000) seekback = 0 // 10s or less = no seekback
else if (time < 60000) seekback = 3000 // 10s to 1m = jump back 3s
else if (time < 300000) seekback = 10000 // 1m to 5m = jump back 10s
else if (time < 1800000) seekback = 20000 // 5m to 30m = jump back 20s
else seekback = 29500 // 30m and up = jump back 30s
return seekback You can disable this in the settings, "Disable auto rewind". |
So it's not related to stream vs download
Seems more like it's playback speed.
Now back at 1x, issue hasn't happened
But at 1.3x it happens often
…On Thu, Jul 27, 2023, 9:46 AM kaos3000 ***@***.***> wrote:
I had disabled the auto rewind after seeing the suggestion yesterday.
Since then there has been 3 occasions the jump back occurred. Not sure of
the 1st which was late yesterday on another book. But the 2nd and 3rd were
on a new book. The 2nd time was 5 minutes jump back. This time was 11
minutes and I was able to take a screenshot. The jump back happened
immediately after the Pause event.
The book is a newly downloaded book from this morning. The Pause and Play
were via ear bud this time. I can provide logs if wanted but they do not
have any errors or show the jump back that I can see.
[image: Screenshot_20230727_093759_audiobookshelf]
<https://user-images.githubusercontent.com/40123829/256591793-049acc2e-215d-4dad-b8ae-b6940b3437f5.jpg>
—
Reply to this email directly, view it on GitHub
<#804 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACFMCFACWADTUWBTDYUHPELXSKEM3ANCNFSM6AAAAAA2V2X2EU>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
I've experienced it with the auto rewind disabled with a downloaded book. I've removed the book and listened to it streaming for 20 hours of the same book and it's not jumped back since moving to streaming. |
I noticed this behavior doesn't happen when I pause from the application. But when I use the lock screen or notification bar to pause the audiobook, it skips back |
I generally control my books by bluetooth headset. Not sure if this happens with both or not |
I noticed a possible point of issue. 2023-07-31 09:53:25 ERROR Api called without a token /items/31f5c29b-4cb9-4f23-aa4a-e07eaf317cdb/play may be related |
Another likely cause could be that Android Mediaplayer's getcurrentposition API has a known issue where it returns incorrect values |
I have been having issues as well with proper playback save. if I pause playback by either using the lock screen pause button on my android phone or by turning off my headphones and do not actually go on the app, it seams that for file downloaded locally once I go back on the title, it will start from the last known point on the server and sometime lose a whole listening session. I am going to try and replicate the issue. |
I tried a few more things.
|
I have what I believe is the same issue with downloaded books. |
![Screenshot_20230804_144144_audiobookshelf](https://github.com/advplyr/audiobookshelf-app/assets/9093396/ab7507e2-c43d-43b4-82ec-e5361b35c8f4)
Here is a screenshot of it going back from 14:57 to 14:49. Went back 8
minutes, the book is downloaded again. Maybe I paused it using the android
lock screen widget, not sure....
Speed is at 1.3x
Ill reproduce it a couple more times with the book downloaded, then ill remove the book and stream it again and see if it happens
|
I believe this is the same issue I am experiencing with Downloaded books playing a 1x speed as well. I will start a downloaded book to fall asleep to, and use the auto sleep timer. When I wake up and resume the book, the position is at the place it was when I started it the first time. Ive seen similar activity in my history as screenshots posted above - but only for downloaded books. I don't seem to see the same behavior when Streaming the book from the server. |
I saw this post https://discord.com/channels/942908292873723984/981321213882282035/1138130906670956636 and went thru the process. The book I am currently listening to had not been downloaded prior. I was streaming it to avoid the jump back. After setting the server connection back up, I downloaded the book and began listening to it. This was around My last pause was at
Seeing this, before I started playback via bluetooth ear bud, I went into the app on my phone and see a jump back from pause stamp Logs covering this listening session: https://pastebin.com/PaS2VJJp |
I listened to a brand new downloaded book using server version 2.3.3 and only one client of Android 0.9.65. I normally wait for the app to finish establishing a connection to the server, but the only time I was able to get the progress to incorrectly reset when I pressed play immediately unlocking my phone (had the app open when it locked). Here is the gist of my logs during the several days I listened, with notable sections down below (the gist is a TSV so you can download it and open in Excel to see my columns for easier filtering). During playback where the session is still active, I get the following debug logs repeatedly (with the time correctly updating)
After a period of time, the socket will close as my user goes offline. I don't know if this is due to a timeout or me going into poor cell service. Sometimes the reason is
After going offline, I'll get
After my user goes back online, the server does not update the progress of the book, which I think is because I am waiting for the app to finish "Loading server data".
Some noteable lines in the log:67-74, end of session where clientEmitter errors were occurring, unlocked phone and pressed Play before allowing app to connect to server. Playback reset to last progress update from client (before clientEmitter error), minus the rewind time 687-697, not sure what this error is, but several listening sessions after this which behaved normally. 1674-1692, looks like the progress kept updating even with the clientEmitter. Did not "not updating progress" after reconnection. 2204-2219, looks like there was a disconnection and client emitter errors, and then a reconnection which continued syncing correctly. Not sure if I paused it for a second at that point, or just happened to unlocked my phone immediately after the socket closed. |
I realize this issue got a bit off track from the originally posted issue. Are all of these comments related to #808 and #828? Also @falchonhand, was the original file you reported this issue with a variable or constant bitrate file? I'm thinking that may be how you ended up skipping forward when resuming, but could be completely wrong. |
I'm not actually certain how to determine if it is variable or constant. The issue for mine, I only use the android app for listening. Oddly enough, it happened to me on the same book as issue #828 . Though mine doesn't reset to 0%, it just loses random amounts of progress. This also occurred on my wifes iphone, though, it was a different book. If you have a simple method of checking CBR vs VBR I would be glad to test it |
There have been 3 releases since this issue was raised and one of them (0.9.66) fixed a bunch of sync issues. Is this still an issue on the latest app v0.9.68 and server v2.6.0? |
Not the og reporter but I was following this issue because in the past I had similar issues and now got the notification. In the last months I listened to a bunch of audiobooks and had no issues with position sync or jumping between sessions. I keep versions up to date usually within days of release so for me I can say issues went away some versions ago. I checked history and I listened to both m4b and mp3 books and also a few streaming and a few downloaded. |
No more issues for me for months, so i would say this is no longer an issue, good to close |
Awesome thanks. 0.9.66 probably fixed this. |
not sure why this is still getting action, it was solved a while back. Do I need to do something to close it? |
Steps to reproduce
Expected behaviour
Actual behaviour
This issue began to occur after updating docker 2.3.2 (I think) where my entire library vanished and notice on github page instructed to delete file absdatabase. This has occurred on, a book I was in the middle of listening (local download) during both updates, a new book downloaded 4 days ago 7/20/2023, and on a book being streamed (all different books)
Environment data
Audiobookshelf Version:
Android Issue
Android version: 13
Device model: Pixel 6 Pro
Stock or customized system: Stock
iOS Issue
iOS Version:
iPhone model:
The text was updated successfully, but these errors were encountered: