Automattic / pocket-casts-android

Pocket Casts Android 🎧
Mozilla Public License 2.0
2.55k stars 212 forks source link

Playback skipping around randomly #157

Open mchowning opened 2 years ago

mchowning commented 2 years ago

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 https://github.com/Automattic/pocket-casts-android/issues/157#issuecomment-1251847030, 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 commented 2 years ago

Possibly related of playback skipping forward when casting: https://github.com/Automattic/pocket-casts-android/issues/142

erricgunawan commented 1 year ago

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 commented 1 year ago

Another case: 5563828-zen

mdrockwell commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

thabotswana commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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: https://github.com/Automattic/pocket-casts-android/pull/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 commented 12 months ago

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 commented 11 months ago

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 commented 11 months ago

@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 commented 8 months ago

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

mchowning commented 8 months ago

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 commented 4 months ago

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

Thanks.

erricgunawan commented 4 months ago

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 commented 4 months ago

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

martinmcwhorter commented 4 months ago

Possible solution for auto caching on device:

mdrockwell commented 4 months ago

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 commented 3 months ago

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 commented 3 months ago

"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 commented 3 months ago

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 commented 3 months ago

@joashrajin 👋

Can we report such tickets (https://github.com/Automattic/pocket-casts-android/issues/157#issuecomment-2120480746)

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: https://github.com/Automattic/pocket-casts-android/issues/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 commented 3 months ago

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)

mdrockwell commented 2 months ago

It has a Galaxy S10 for five years until two week ago, and am now on an S24 - it happens on both devices.

Last night, which connected to my car through a Carsifi Android adapter to my 2017 Ford Explorer, it jumped back around two minutes. Today, which listening on my Galaxy ear buds, it jumped back about 20 seconds. It does, however, also happen when just listening on my phone while I carry it around the house.

They say disabling Intelligent Playback Resumption didn't help.

8354436-zd-a8c

martinmcwhorter commented 2 months ago

My work around is to go into the auto download settings, turn on auto download on next. Turn off only download on unmetered wifi.

So as soon as I play an episode, it will download the entire episode rather than stream it.

On Wed 26 Jun 2024, 14:40 mdrockwell, @.***> wrote:

It has a Galaxy S10 for five years until two week ago, and am now on an S24 - it happens on both devices.

Last night, which connected to my car through a Carsifi Android adapter to my 2017 Ford Explorer, it jumped back around two minutes. Today, which listening on my Galaxy ear buds, it jumped back about 20 seconds. It does, however, also happen when just listening on my phone while I carry it around the house.

They say disabling Intelligent Playback Resumption didn't help.

8354436-zd-a8c

— Reply to this email directly, view it on GitHub https://github.com/Automattic/pocket-casts-android/issues/157#issuecomment-2191730349, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAJDT6XAXOWM7A7HF4HMIUTZJLAEHAVCNFSM54HZOHWKU5DIOJSWCZC7NNSXTN2JONZXKZKDN5WW2ZLOOQ5TEMJZGE3TGMBTGQ4Q . You are receiving this because you commented.Message ID: @.***>

erricgunawan commented 2 months ago

Occasionally, skipping may occur. I haven't downloaded it, but no matter how many times I rewind it, the sound still skips in the same place. I think the rest is well done.

8420046-zen (3-star Android App Review)

ashiagr commented 2 months ago

Status Update

We're experimenting with automatic caching of the playing episode in the latest beta (v7.67-r-2). The feature can be enabled or disabled using Cache playing episode advanced setting.

erricgunawan commented 2 months ago

More reports on this in this forum thread:

28 Jun 2024: https://forums.pocketcasts.com/forums/topic/playback-skips-backwards-randomly/page/3/?view=all#post-4363

30 Jun 2024: https://forums.pocketcasts.com/forums/topic/playback-skips-backwards-randomly/page/3/?view=all#post-4394

01 Jul 2024: https://forums.pocketcasts.com/forums/topic/playback-skips-backwards-randomly/page/3/?view=all#post-4400

App version: 7.66 (9245)

mdrockwell commented 2 months ago

This used to be a fantastic app but over the last month even with their supposed patches to fix the issue, it's still skipping episodes ahead and backwards. Audio gets garbled, some episodes have missing chunks of audio, a few episodes the audio is scrambled so 2 different portions of the episode play together. Until this is fixed I'm leaving this at 2 stars.

8426510-zd-a8c — 2 star app review

App version: 7.66 (9245)

erricgunawan commented 2 months ago

Audio skips around in podcasts

8450130-zen - 2 star App Review

App version name: 7.66 (9245)

mdrockwell commented 1 month ago

From the forums:

STILL not working. Still leaping backwards randomly. In fact, it’s worse than ever. Just listened to an episode of “The Horror Show” and it happened EVERY SINGLE TIME after they would take a commercial break, but randomly. This is getting really old. You guys have been aware of this problem for AGES now, and STILL haven’t fixed it. Downloading every episode is not a solution.

I know you say it has to do with “dynamic ads”. Okay, great. So you know what is causing the problem. So fix it. None of the other podcast apps have this issue (despite also having dynamic ads inserted), so maybe try harder than just shrugging and saying “Uhhh I dunno. Try downloading the episodes I guess?”

erricgunawan commented 1 month ago

Was great, but the last couple of months has seen podcasts randomly missing sections, skipping backwards or forwards by several seconds, and I have been unable to find a solution

8519137-zen - 3 star App Review

Device: Google Pixel 7 Pro App version code: 9251 App version name: 7.68 Android version: Android 14 (SDK 34)

Liztowoju commented 1 month ago

I use spotify and have the same problem, skips stories.

https://forums.pocketcasts.com/forums/topic/playback-skips-backwards-randomly/page/4/?view=all#post-4948

Liztowoju commented 1 month ago

Seconded

https://forums.pocketcasts.com/forums/topic/filter-request-copy-filter/?view=all#post-4941

azollafox commented 1 month ago

Version 14, Samsung A54. And the App is version 7.68, which is the most current issued by the Play Store in my region, at this time.

https://forums.pocketcasts.com/forums/topic/playback-repeating-in-middle-of-podcasts/page/2/?view=all#post-4998

DavidGreen63 commented 2 weeks ago

A new update for the App came, now running version 7.70 (9260), but the issue on this thread is still on-going.

However, the point I wanted to bring up was that I am noticing that the first audio skip often occurs just after position 04:30. … is that a clue?

It is a bit hard to determine exactly as I don't stare at the screen watching the time bar. And is still limited to the one channel that has more than 500 episodes, c.1650 not played currently.

DavidGreen63 commented 1 week ago

Today I noticed two things;

A channel I listen to (Lateral - Tom Scott), maybe had a skip which I didn't notice as the stream repeated the last c.20 seconds. This channel only has 100 episodes, so it ruined the pattern I had noticed where playback issues only occurred on channels with more than 500 episodes.

I encountered a playback skip (backwards) when I was trying out Antenna (open source Podcast player App), to see if the issue would occur with that application. Since it did, then either that App has the same bug, or maybe the issue is related to the source of the stream.

ashiagr commented 6 days ago

Hi there 👋

Appreciate your efforts in identifying the pattern of the issue. The next time it occurs, could you please send over the logs through the Pocket Casts app? Navigate to Profile > Help & Feedback > Get in touch, and include specifics such as the impacted podcasts/episodes and the exact time of occurrence. These logs include additional information that could assist us in pinpointing the root cause.