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

Audio/Video desync #3550

Closed
LukasThyWalls opened this issue May 7, 2020 · 35 comments · Fixed by #3837
Closed

Audio/Video desync #3550

LukasThyWalls opened this issue May 7, 2020 · 35 comments · Fixed by #3837
Labels
ASAP Issue needs to be fixed as soon as possible bug Issue is related to a bug player Issues related to any player (main, popup and background)

Comments

@LukasThyWalls
Copy link

LukasThyWalls commented May 7, 2020

Version

  • NewPipe 0.19.3 (Autoupdate version)
  • Xiaomi Mi 9 Lite, Android 10, MIUI 11.0.2

Steps to reproduce the bug

  1. Open any video... i tested with different videos from different channels, all of them with this issue.

Expected behavior

The video plays normally, with the audio in sync (Tested today with 0.19.2).

Actual behaviour

The video plays normally, but looking carefully, the video and audio began to go out of sync slowly (with video first). In 10-15 minutes the sync is between half second and a second, but in 3-5 minutes it is very noticiable.
If you choose any other resolution, move the scroll time, rewind or forward, the video and audio come again in sync, and it began slowly to lost sync again.
This happens with 0.19.3, i uninstall and installed 0.19.2, and this is not happening with that version.

Screenshots/Screen recordings

(I will need to post at least a 10 minutes video play, but i can post it if needed)

Logs

(It's not a crash, If i can log something, tell me)

@LukasThyWalls LukasThyWalls added the bug Issue is related to a bug label May 7, 2020
@Stypox
Copy link
Member

Stypox commented May 8, 2020

Strange... we didn't change anything related to the player from version 0.19.2. Could you test the apk provided in #3513?

@wb9688
Copy link
Contributor

wb9688 commented May 8, 2020

@Stypox: Well, the following are all the commits that changed something in the player between those 2 releases (made with git log --pretty=oneline --abbrev-commit v0.19.2..v0.19.3 app/src/main/java/org/schabi/newpipe/player/ | grep -v Merge):

00262b4 Better detection of TV devices
0ec22c7 Fix pause button is not focused on player control activation
54ceb85 Don't break navigation if player Views other than controls are focused
d1d942f Fix Checkstyle violations in MediaSourceManager
53b3bda Comply with Checkstyle rules
a50e430 Fix checkstyle issues and improve code formatting
46918ee formatting changes
fe18896 made formatting changes
9487b53 changed popup resizing
3855e48 Save and restore playback parameters into/from preferences
63bcc04 Move things back to its original place
fda5405 Improve code style to be more consistent
caa1de8 Rename FireTvUtils to AndroidTvUtils and isFireTv() to isTV()
a1e02f7 Default to landscape orientation for Android TV
6e76610 Eliminate bunch of ExoPlayer warnings
d23227d Implement global focus highlight
d29e0aa Improve usability of MainVideoActivity with directional navigation

(It's not a crash, If i can log something, tell me)

@LukasThyWalls: Download the latest RC from #3479, connect your phone to your PC, and use adb logcat. If your phone is rooted, you could also use an app like aLogcat or CatLog to get those logs.

@LukasThyWalls
Copy link
Author

I just tested NewPipe_v0.19.3_RC4 and with that version the issue is not happening...

@Stypox
Copy link
Member

Stypox commented May 8, 2020

Well, RC4 is the same as 0.19.3 afaik

@LukasThyWalls
Copy link
Author

Ok, now make more sense. It's some kind of config issue.
The reason because NewPipe_v0.19.3_RC4 wasn't doing it is because i was using the default configuration, when i imported the exported settings it began to do it.

So, i'm going to import the DB but not the settings into regular v0.19.3, and put all the settings again like i want. Then if i see something i will report it.

Also, i attached the newpipe.settings from the imported data and the logcat during 10 minutes of use of NewPipe_v0.19.3_RC4 with the issue (I'm not importing the whole result logcat because there is a 10 MB text file with logs since 10 hours ago, if it's needed i can attach it)

NewPipeDebug_Logcat.txt
newpipe_settings.zip

@Stypox
Copy link
Member

Stypox commented May 9, 2020

Thank you for the logs!
Could you test the apk provided in #3513? (no need for any log in this case, just check if it fixes your problem by chanche)

@LukasThyWalls
Copy link
Author

Thank you for the logs!
Could you test the apk provided in #3513? (no need for any log in this case, just check if it fixes your problem by chanche)

Ok, the point there is the imported configuration.

When i use the default configuration, there isn't any issue, when i imported my database WITHOUT the configuration, there isn't any issue. These with v0.19.3, v0.19.3 RC4 #3479, and the provided #3513

But if i imported WITH the configuration, the issue appears. As when i updated from v0.19.2 (which it didn't had the issue) to v0.19.3, some stored config seems to cause this.

Now i'm using v0.19.3, importing my old database but without importing the config. I reconfigured it by hand from the default one to make it more or less like the old config and it seems i don't have this issue anymore.

So, you can close this issue if i'm the only one with the problem, with maybe the issue came from a random error stored in the settings and related with my phone model/version, a concrete settings what i didn't set again by chance (i think not), anyway the exported settings causing the issues to me are attached above. I suppose there is not need to waste more time in this, maybe only for knowledge if there are related issues in the future, as you can fixed it reseting the config. But if there is something more i can do, tell me.

Thanks.

@juantxorena
Copy link

I just want to add that I had the same problem, and the configuration "solution" proposed by @LukasThyWalls worked.

I'm going to test in a long video to see if it's really fixed.

@ghost
Copy link

ghost commented May 12, 2020

I'm also experiencing this issue. I'll try LukasThyWalls fix later and see if it works.

My device is a pixel 3xl Android 10 with the April 2020 security update installed (latest one as of today)

@mgolden356
Copy link

mgolden356 commented May 16, 2020

I also had this issue, and it was fixed this way. I have a Moto g⁷ power on Android 9 (with the latest security update), with the F droid update at 0.19.3.

The issue came back 6 days later.

@gkeegan
Copy link
Contributor

gkeegan commented May 16, 2020

If those fixes don't work for you guys you can just tap back to exit the video, then resume it. It should sync up again temporarily.

@Godecki
Copy link

Godecki commented May 20, 2020

Same issue for me on newest build

@macearl
Copy link

macearl commented May 26, 2020

I'm experiencing the same problem on a newly-ish installed NewPipe 0.19.13
I've been using it for a couple of days and did not import any previous settings.

I attached a logcat i grabbed during playback until the delay was clearly noticeable.

newpipe_adb.zip

After this i also tried the workaround of cleaning the storage and only importing the database without settings with the apk in #3513 and the F-Droid Version, for now both have no A/V Desync issue, i'll have to see if it returns after a couple of days like for mgolden356

@vadiof
Copy link

vadiof commented Jun 2, 2020

I have the same issue. 0.19.13 (from F-droid) was the first version I've faced with this issue on. Found this discussion, I've reinstall the app and subscribed to all channels again without importing any data. Desync disappeared. But sometime later, just the day before F-droid provided update to 0.19.14, the issue showed up again. After update to 0.19.14 and then to 0.19.15 it is still exist.

P.S. Could someone help me the info about how import database without settings since I can see only one file that is exported by NewPipe?

@Stypox
Copy link
Member

Stypox commented Jun 2, 2020

@vadiof you import normally, and when the dialog asking for "Also import settings" appears, you answer "No"

@vadiof
Copy link

vadiof commented Jun 2, 2020

@Stypox thank you! Didn't notice this dialog before

@loque036
Copy link

loque036 commented Jun 6, 2020

I am experiencing this bug as well ever since i updated to 0.19.3 and i found a fix for it, no need to wipe out the settings or anything like i've seen suggested above, just changing the playback speed of the video to 1.01x seems to get rid of the desync and the video still looks as if its played at normal speed.

For reference, my device is a OnePlus 6 running syberia os (android 10)

@B0pol
Copy link
Member

B0pol commented Jun 7, 2020

I also experience audio desync in version 0.19.5

@B0pol B0pol changed the title Audio/Video desync with 0.19.3 Audio/Video desync Jun 7, 2020
@B0pol
Copy link
Member

B0pol commented Jun 7, 2020

And I can confirm speed 1.01 works around it. Lowering quality is another workaround I've found

@LukasThyWalls
Copy link
Author

Lowering quality is another workaround I've found

Yes, temporaly because it began to loose sync with time again since you changed the quality (at least as when

I only want to point out that this happened to me when i upgraded NewPipe from 0.92 to 0.93, but with 0.93 i configured again from default settings (i kept the subcriptions), and with 0.94 and 0.95 upgrades i haven't had this issue anymore. The "troubled" exported settings are uploaded above.

@B0pol B0pol mentioned this issue Jun 10, 2020
@coolsan06
Copy link

I've also noted this issues but some songs are also are gliched if you listed to a song some part glitch out and repeat themselves or just skip to parts of the video also commenting on the last post is their going to be a fix as the new update rolls around in 0.19.4 or is it a problem happening to only a select few because I started a big thread yesterday and could not find anyone else without the same problem only my LG v30 and samsung Galaxy note 9 seen these issues only until. My thread was closed and I was redirected to this thread.

@coolsan06
Copy link

Sorry some parts are wrong on the other post let me correct them I could not find anyone else with the same problem sorry for the confusion.

@loque036
Copy link

For some reason the 1.01 speed trick to fix the desync stopped working after about a week and as much as i wipe out the settings and lower the quality the desync continues, this is getting pretty annoying. Haven't tried 0.19.3 or .4 but i'm expecting the same results. Time to roll back to 0.19.2 again i guess.

@coolsan06
Copy link

No yeah I messed up the versions i thought it was 19.3 but in reality it was 19.5. is it a problem everybody has or is it just for people without android 10. Due to the update i think this is happening.

@mgolden356
Copy link

I've been noticing this since 19.2, .3, .4, .5. I feel like it has something to do with toggling the speed, but not exactly sure when the desync gets triggered from what input. I know reuploading database without settings gives at least a good one day+ fix. Will always be testing more.

@coolsan06
Copy link

I barely noticed it with this patch but some things are also glitched like music or some videos

@theScrabi
Copy link
Member

theScrabi commented Jun 29, 2020

Guys I'm havigg it with 0.19.5 and it rendes NewPipe for me almost unusable. I cant watch talk shows or anything else as I have a desync of id guess half a second if I don't pause the video regularly. I don't want to hustle but to me this looks like an ASAP because so far all of my devices are inflicted by this issue. So I'd guess many people have this issue.

@Stypox Stypox added ASAP Issue needs to be fixed as soon as possible player Issues related to any player (main, popup and background) labels Jun 30, 2020
@Stypox
Copy link
Member

Stypox commented Jun 30, 2020

theScrabi do you have some time to do a git bisect between 0.19.2 and 0.19.3 and find out which commit caused the issue?

@Stypox
Copy link
Member

Stypox commented Jun 30, 2020

3855e48 this is the commit that caused the issue, found it using git bisect
Now proceeding to investigate and fix the bug.

@Stypox
Copy link
Member

Stypox commented Jun 30, 2020

@LukasThyWalls @juantxorena @ajtpak @mgolden356 @Godecki @macearl @vadiof @loque036 @B0pol @coolsan06 @theScrabi could you test the apk provided in #3837 and confirm it fixes the issue?

@macearl
Copy link

macearl commented Jun 30, 2020

for me the issue went away after i did a clean flash of an OS update, since then i have not been able to reproduce this issue, sorry i can't be of more help.

@theScrabi
Copy link
Member

I see. Could it be that maybe only lineage users are inflicted?

@coolsan06
Copy link

Skypox I will test if the apk you supplied fixes the issue thank you its a anoying bug andthank you for trying to fix it.

@coolsan06
Copy link

Also I tried the ×1.01 trick but I found a better version. That has lasted almost 3 weeks now ×1.02 should fix the problem

@Stypox
Copy link
Member

Stypox commented Jul 1, 2020

@theScrabi no, I was able to reproduce the issue on my phone using the settings provided in a comment above. I have a Huawei P9 lite with the original Android

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASAP Issue needs to be fixed as soon as possible bug Issue is related to a bug player Issues related to any player (main, popup and background)
Projects
None yet
Development

Successfully merging a pull request may close this issue.