Skip to content
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

Playback skipping around randomly #157

Open
mchowning opened this issue Jul 21, 2022 · 35 comments · Fixed by #2242
Open

Playback skipping around randomly #157

mchowning opened this issue Jul 21, 2022 · 35 comments · Fixed by #2242
Assignees
Labels
bug Something isn't working migrated Issue originated in the ShiftyJelly repo

Comments

@mchowning
Copy link
Contributor

mchowning commented Jul 21, 2022

Original report from 5359958-zen:

My app is sometimes skipping around different parts of the episode I am listening to randomly. This has been happening for a couple of days. My phone is in my pocket listening on a Bluetooth headset and the episode will just all the suddenly jump to a different time stamp. Phone is still locked with screen off in pocket, I have ruled out accidental touches.

Update

The most common cause of this is what was suggested in #157 (comment), basically that dynamic ads within an episode are changing as an episode is being streamed and that's causing the jumps. If this is true then that means:

  1. Downloading the episode avoids the issue (let us know if you have the issue with a downloaded episode) and
  2. The issue is more likely to occur if you take a break in listening to the episode (if you take a 2 week break in the middle of listening to an episode, there is a much higher chance that a dynamic ad will change compared to if you listen to an episode straight through).
  3. The issue is more likely to occur the longer an episode is and the further into the episode you are
@mchowning mchowning added bug Something isn't working migrated Issue originated in the ShiftyJelly repo labels Jul 21, 2022
@mchowning
Copy link
Contributor Author

Possibly related of playback skipping forward when casting: #142

@erricgunawan
Copy link

erricgunawan commented Sep 20, 2022

An interesting theory from 5559956-zen regarding this might be caused by ads:

I'm pretty frequently having an issue where the podcast audio will suddenly jump backwards or forwards in time during playback. I don't have touch controls enabled on my bluetooth headphones so I don't think it's just them randomly activating the rewind playback control. I think it tends to happen more often around ad breaks. For example, the ad read will finish and the host will start talking for a few seconds but then the audio jumps backwards and now I'm listening to the end of the ad read again. I think I've experienced this with both the windows and android apps.

I have a theory about what's causing this. It's more and more common for podcasts to have dynamically inserted target ads (e.g. https://podads.podbean.com/). Pocket casts is using HTTP range requests to only download the next part of the audio file while streaming. Since those requests are spread out, sometimes it gets served a different audio file with different ad reads inserted. Maybe the ad reads are different lengths of time or maybe they just compressed differently with variable bit rate so they occur at different points in the file.

I don't think I've ever experienced this issue when listening to old episodes of e.g. the History of Rome podcast where there obviously aren't any targeted ad reads. I don't think I've experienced this issue when the episode is downloaded ahead of time. The issue seems to be occurring more and more frequently which I guess is due to more podcasts using these dynamic ads and because I switched more of my listening from auto-downloaded files to streaming.

If that is the cause of the issue, maybe there's a header that pocket casts can send with its requests to ensure it always gets the same version of the file? Maybe we just have to download the whole file at once.

I asked them for a log in the next time this happened again.

@ezebecke
Copy link

Another case: 5563828-zen

@mdrockwell
Copy link

mdrockwell commented Dec 5, 2022

Hi I have a problem with my PocketCasts app and my Pixel 7. When I try to play an episode, after 8-10 the player loop back 1-2 seconds. This happen on every episode of every podcast. This happen on smartphone speaker or Bluetooth.

Phone: Google - Panther - Pixel 7 - panther
Kernel: 5.10.107-android13-4-00004-g6522bf85d262-ab8935228 - abfarm-release-2004-0125
Android version: 13 SDK 33
App version : 7.27.1 (9055)

5764209-zen

(Debug logs in the ticket.)

@martinmcwhorter
Copy link

I am having the same issue. The ads theory makes sense to me. This seems to happen more since local ads based on geoip have started being spliced into podcasts.

Have other podcast apps had issues since the length of a podcast became dynamic?

@mdrockwell
Copy link

5782439-zd-woothemes:

Whenever I go back to a podcast, it forgets where I was and puts me back like 15 or 20 minutes. I have a galaxy s22 with all the latest updates.

They've already tried disabling intelligent playback resumption and "It happens all the time. All podcasts all the time."

(Debug logs in the ticket.)

App version : 7.27.1 (9055)
Phone: samsung - b0q - SM-S908U - b0q
Kernel: 5.10.81-android12-9-25490797-abS908USQU2BVKD - 21DK7B12
Android version: 13 SDK 33

@thabotswana
Copy link

Another report in 5830791-zen

When I open pocket casts, whatever this app is still in the background or has been killed from background, the current episode will keep rewind 8 times, just like im touch the rewind button. But that's not because of touch by mistake because there is no touch behavior when I open the “show touch on screen” on system settings.

This weird thing happens every times when I open Pocket Casts and only happens on my Android Device.

App version : 7.28 (9059)
Phone: Xiaomi - MI 10 - Mi 10 - umi
Android version: 11 SDK 30

@joashrajin
Copy link

Feedback from 5825326-zd-woothemes

I see where the problem is. If I try to stream a podcast, the app, during streaming, download the episode. When the episode finish to download, enter in loop for 1 second.

@mdrockwell
Copy link

About half of my podcast episodes contain a "skip" where the track skips ahead or back in time. The playhead doesn't move but the skip is audible when listening, like the audio is out of order. This seems like a bug in the app, where there's a glitch while the episode is downloading / caching. Is there any way to fix this? It's very frustrating.

5868501-zd-woothemes

@thabotswana
Copy link

at a certain point in most podcasts I listen to it jumps backwards approx 30 seconds and replays what I have just listened to it.

5855610-zen

@thabotswana
Copy link

5929871-zen

Every time Freeletics launches the 5 second countdown, this PocketCast app returns to playback minutes before where it stopped. I tried to turn off Intelligent Playback and use an Unrestricted Battery setting. Nothing prevents this.

I have a Google pixel 7 with the newest Android version.

@mchowning mchowning self-assigned this Feb 10, 2023
@mchowning
Copy link
Contributor Author

Every time Freeletics launches the 5 second countdown, this PocketCast app returns to playback minutes before where it stopped.

I can reproduce some weirdness with Freeletics. I'm looking into it.

@mchowning
Copy link
Contributor Author

I'm not going to be able to look into this more right now, so removing my assignment.

@mchowning mchowning removed their assignment Feb 14, 2023
@thabotswana
Copy link

Bug report: Pocket Casts occasionally skips back randomly while playing.

Version: Pocket Casts 7.30 running on Pixel 6 on Android 13.

Symptoms: The skip amount varies from around 15 seconds to 1 minute or so. There's no audible click or gap when this happens. Instead, it seamlessly repeats a portion that it just played. This has been happening randomly since at least December.

Possibly related: Sometimes it takes maybe 5-10 seconds to start playing a podcast that's already been downloaded.

5997585-zen

@mdrockwell
Copy link

While playing, it's not unusual for the podcast to jump back and replay the previous minute or so again before continuing with normal playback. There's no warning, I just realise that I'm listening to the same thing I've just heard again.

6207278-zd-woothemes

@mdrockwell
Copy link

When I am listening to podcasts, the podcast will go back and keep going back a couple of times, so I end up listening to the same bit three times. I have turned off Intelligent Playback Resumption, but that is only if I am resuming a podcast.

I am using a Pixel 5 running Android 13 with app version 7.40. I have tried restarting my phone and reinstalling the app, but the problem persists.

6430171-zd-woothemes

@mchowning
Copy link
Contributor Author

mchowning commented Jul 6, 2023

One user had these logs, which are a bit weird because I don't think we generally continue saving the time in the database when playback is paused. I'm not convinced that this is related to this issue, but it is odd.

I 05/7 10:12:41 System fired 'Audio Becoming Noisy' event, pausing playback.
I 05/7 10:12:41 Giving up audio focus
I 05/7 10:12:41 Giving up audio focus. Request granted
I 05/7 10:12:41 Paused - Not transient
I 05/7 10:12:41 Saved time in database 1145.120
I 05/7 10:12:41 stopForeground state: 2 (update notification)
I 05/7 10:12:42 Audio device removed: T25, Bluetooth a2dp
I 05/7 10:12:51 Saved time in database 1145.120
I 05/7 10:13:12 Saved time in database 1145.120
I 05/7 10:13:31 Saved time in database 1145.120
I 05/7 10:13:59 Saved time in database 1145.120
I 05/7 10:14:22 Saved time in database 1145.120
I 05/7 10:14:32 Saved time in database 1145.120
I 05/7 10:14:42 Saved time in database 1145.120
I 05/7 10:14:54 Audio device added: T25, Bluetooth sco (telephony)
I 05/7 10:14:54 Audio device added: T25, Bluetooth sco (telephony)
I 05/7 10:14:54 Audio device added: T25, Bluetooth a2dp
I 05/7 10:14:54 Saved time in database 1145.120
I 05/7 10:14:55 Event from Media Session to play. Controller: au.com.shiftyjelly.pocketcasts pid: 8407 uid: 10269
I 05/7 10:14:55 Trying to gain audio focus
I 05/7 10:14:55 Audio focus gained
I 05/7 10:14:55 Play 1145.120 System Player.

and then again later

I 05/7 10:41:42 Saved time in database 1506.751
I 05/7 10:41:42 stopForeground state: 2 (update notification)
I 05/7 10:41:52 Saved time in database 1506.751
I 05/7 10:42:02 Saved time in database 1506.751
I 05/7 10:42:12 Saved time in database 1506.751
I 05/7 10:42:22 Saved time in database 1506.751
I 05/7 10:42:32 Saved time in database 1506.751
I 05/7 10:42:42 Saved time in database 1506.751
I 05/7 10:42:52 Saved time in database 1506.751
...
I 05/7 11:05:12 Saved time in database 1506.751
I 05/7 11:05:16 Loaded podcast 1dc55150-91a3-013a-d836-0acc26574db2 from database

6489105-zd-woothemes

@mchowning
Copy link
Contributor Author

Forum user reporting something that sounds very similar here.

When I am listening to an episode, about two thirds into the episode, I notice that I am listening to what I have already heard. The episode skips back a few minutes, but the progress bar (or timestamp I think) doesn’t move. Once the progress bar gets to the end, it goes to the next episode. But because of the skip back, the episode hasn’t actually finished. So it is going to the next queued episode even though there is still about 4 minutes left in the current episode.

@sarcasticadmin
Copy link

sarcasticadmin commented Aug 24, 2023

Also having this issue as well (I emailed in my debug.log to support):

Phone: Pixel 7
Android version: 13 (GrapheneOS Build number TQ3A.230805.001.2023080800)
App: 7.45 (9128)
Intelligent playback resumption: disabled

The following podcast episode had the issue. It replayed about 15 min of the podcast halfway through. From what Ive heard about the Twit network they do insert dynamic adds into their podcasts:

37187090-0be2-012e-fb10-00163e1b201c
Security Now (Audio)
Last episode: 4725739b-7f73-4e73-80d1-969ecbdb64e8
Audio effects: off Silence removed: OFF Speed: 1.0 Boost: off
Auto download? false
Custom auto archive: false
Auto add to up next: off

S0 E936 - When Heuristics Backfire - OpenSUSE, SanDisk and Western Digital, 8Base, TSSHOCK

@mchowning
Copy link
Contributor Author

I created a podcast and intentionally inserted/removed ads from it to test this out, and that did result in the content skipping forward/backward like these users are reporting (including ending episodes before the end when dynamic ads are shortened/ or removed).

I don't know of any good ways to avoid that, but perhaps an improvement would be to show a toast anytime a user is listening to an episode that has a duration that changes by more than 30 seconds or so. That way users would at least have some indication as to why the playback is changing. Of course, most users wouldn't notice this since they wouldn't be looking at their phone. We could make it a full-blown notification, but that feels a bit heavy-handed. 🤔

I've created a PR with this change here: #1312. If nothing else, the logs will at least help us know if dynamic ads aren't the problem because we'll see users complaining about this without any logs showing that the episode duration has changed.

@sarcasticadmin
Copy link

Thanks @mchowning for your work on reproducing the problem and in #1312 for the toast and the logs. Ill try that out in 7.47.

I can confirm that downloading the podcasts with dynamic ad insertions is a valid workaround for the time being.

@mchowning
Copy link
Contributor Author

I took a look at the number of times the app is seeing that a podcast duration changes while a user is listening to the podcast, and this is happening millions of times a month, with many of the duration changes being over 5 minutes, so this does match up with the duration changes being why playback jumps for so many people.

@CookieyedCodes
Copy link

@mchowning any thoughts on how to improve it? Other then enabling auto download of now playing (which was actually the case pre 7.20 I think actually, I can't remember exactly but it was one of the first things post sale) or a download first num episodes of upnext (like apple watch & regardless should come to wear os app regardless too 😉)

Truthfully because Ire hasn't bitten onto dynamic ad tech as much as of yet & that I download all episodes (it's a problem 😅, hence my multiselect fix concerns/suggestions) it's not really an issue for me, at that I deal with a post or two at least once a month on the subreddit & find it fascinating that people don't know about dynamic ad tech 😅.

The day I can save my selection as a playlist (particularly my upnext order 😉) I'll probably get interested in the autoplay functionality & then it might be a bigger issue for me😅 (if only the stream to download hitch could be seemless)

@mchowning
Copy link
Contributor Author

There was a similar issue regarding playback skipping around due to dynamic ads on AntennaPod's repo, but no solutions.

@mchowning
Copy link
Contributor Author

mchowning commented Dec 15, 2023

It seems like the best idea might be to somewhat selectively cache the entire episodes on the device.

The hard part would be striking the right balance because we wouldn't want to cache everything. For example, if a user listened to the first minute of 5 different, very long, podcast episodes while they were on mobile data, I'm sure they wouldn't have wanted the app to download the entire episode each time they switched to a different one.

I'm just thinking out loud, but maybe some combination of

(a) not caching particularly large episodes (or video episodes) at all
(b) not caching an entire episode until it had been played for something like 5 minutes and
(c) not caching with mobile data if the user has the setting for warning before using mobile data turned on

could avoid the vast majority of playback skips without having too much of an impact on the device's data usage. It feels like striking the right balance here would be difficult.

@PCigales
Copy link

I also face this problem, that I had never met with Google Podcast, and opened an issue in the repository of AntennaPod: AntennaPod/AntennaPod#7110
I proposed a few potential solutions:

  • caching the whole content in memory provided its size does not exceed a max value defined by the user in the settings, as suggested above
  • ensuring than any token provided by the server to identify the session, either in the url or in the headers of the response to the first request, is sent back in further requests
  • only using one range request with no end indicated and read successive blocks as playback progresses, as the server, if well implemented, should ensure that the data remains identical during the process (but does it indeed ?)
  • taking into account the total size indicated in the content-range header of the response, if any (supposing no chunked transfer encoding), to recalculate the right position, in the case, which seems to be frequent, where the ad is only inserted at the beginning

Thanks.

@erricgunawan
Copy link

3-star Android app review (8083122-zen):

hey, why does it rewind like 2 minutes all the time? at first I thought it was just me doing it in my pocket... it's not

Device: Motorola moto g 5G - 2023
App version code: 9214
App version name: 7.61.1

@CmpCtrl
Copy link

CmpCtrl commented Apr 26, 2024

Please prioritize fixing the skipping issues. The app has exactly one job.

@martinmcwhorter
Copy link

martinmcwhorter commented Apr 27, 2024 via email

@mdrockwell
Copy link

mdrockwell commented May 10, 2024

Well, this morning it started not only jumping forward but jumping backwards.
I download the podcasts, don't listen from streaming. It does it on multiple podcasts : The Tech Guys (twit), Security Now (twit) Android Faithful, Wheel Bearings. These are the ones it has done it on this week and last week. Two weeks ago it did not skip at all. It's been doing it off and on for months.

App version : 7.62.2 (9229)
Phone: samsung - e2q - SM-S926U - e2q
Android version: 14 SDK 34
Ticket: 8163164-zd-a8c

@joashrajin
Copy link

This did not fix the issue. In fact, every time I have resumed listening to a podcast since making this change, playback has resumed 1-2 minutes later than where I left off. It's really frustrating to have to jump backwards several skips to find where I was.

8163481-zd-a8c

@joashrajin
Copy link

"Episode kept playing for a few seconds even though the 'time remaining' was 0:00. This made the "skip last ... seconds" not work properly anymore."

8046547-zd-a8c

@joashrajin
Copy link

Started using this to replace my Google podcasts. It randomly skips content in my podcasts from time to time- just jumps a few seconds ahead. Sometimes it's once, then it stops. A few times it has been ongoing and repeated over and over for long stretches ruining entire segments and interviews. Even if I rewind to try again the skips are in the exact same places. I'm trying a few other options such as podcast addict or downcast. I can't stand this anymore!

8217277-zd-a8c

@ashiagr
Copy link
Contributor

ashiagr commented May 21, 2024

@joashrajin 👋

Can we report such tickets (#157 (comment))

Episode kept playing for a few seconds even though the 'time remaining' was 0:00. This made the "skip last ... seconds" not work properly anymore.

under this GH issue: #744

Criteria for such issues:

  1. Large MP3 format episode
  2. The episode keeps playing for a few more seconds than the original duration
  3. Inaccurate seeking in-between the file

@erricgunawan
Copy link

Every podcast I listen to has at least one moment where it will skip back 2, 3, 4 minutes. Sometimes more than once. Very irritating. Otherwise it's been a good replacement for Google Podcasts, especially after the most recent update.

8260330-zen (3-star Android App Review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working migrated Issue originated in the ShiftyJelly repo
Projects
None yet
Development

Successfully merging a pull request may close this issue.