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

add a sndio fix from smplayer so that sndio can be readded #9205

Closed
FrostKnight opened this issue Sep 11, 2021 · 8 comments
Closed

add a sndio fix from smplayer so that sndio can be readded #9205

FrostKnight opened this issue Sep 11, 2021 · 8 comments

Comments

@FrostKnight
Copy link

Hyperbola 0.4 mpv 0.32.0
I don't know which version this problem started in,

"Audio/Video desynchronisation detected! Possible reasons include too slow
hardware, temporary CPU spikes, broken drivers, and broken files. Audio
position will not match to the video (see A-V status field)."

I am using sndio btw, but strangely enough, using smplayer instead of mpv has this option which prevents mpv from breaking like this.
I wondered, if you could either A: add the synchronization option from smplayer under general and audio called:
Audio/Video auto synchronization, or B: tell me where I can find a fix to this for linux, or C: give me an idea of what would be needed to be done.

I am on Hyperbola's testing version currently and alsasound doesn't work all the time, also, I prefer sndio because it is more lightweight.

Anywho, would greatly appreciate if someone would be willing to put this option in.

I am willing to test if you want, let me know! I have some vms of Hyperbola so I can test it easily.

@Dudemanguy
Copy link
Member

There is #8314 which adds sndio back to mpv. It needs some touchups though.

@FrostKnight
Copy link
Author

Oh, does it have the smplayer fix I mentioned?

Also, I did some digging, and mplayer doesn't have this problem, which is astounding to me... I wonder if a fix could be added from their stuff. Although, I dunno how this would be done.

I should have been more clear, sndio works very well with mpv, except for mp4 video files. ;)

That is the issue, that smplayer and mplayer have fixes for.

Also, even if smplayer uses mpv instead of mplayer, the option smplayer has, that I mentioned, fixes the problem completely.

Thanks for showing me that though. :)

@Dudemanguy
Copy link
Member

I have no idea about smplayer or how it works. However, the audio API was completely rewritten in 0.33 (sndio wasn't ported which is why it was removed) so the behavior may be different.

@FrostKnight
Copy link
Author

Smplayer is just a gui for mpv, tbh

@FrostKnight
Copy link
Author

I found out something very bizzare, it seems that mpv does in fact have a way to make sndio work with mpv and have none of the desync problems!

mpv --audio-device=sndio yourfile.mp4

Then it works 100% :)

I wonder if this works on OpenBSD as well as Hyperbola. I would be greatly interested to know the answer to this!

This issue probably can be closed I guess. As long as this fix exists and works for BSD's as well as other sndio using distros. I think?

Feel free to disagree if you wish though! But yeah, it works for me!

@Dudemanguy
Copy link
Member

Certain BSDs may have patched in sndio by themselves, but sndio support is not upstream in mpv's master branch so it's a valid feature request. See #9298 for the latest attempt.

@FrostKnight
Copy link
Author

Ah cool, good to know. I know Hyperbola has this option in it. Maybe it was removed from master? Idk... ;)

I saw #9298

Thanks though!

I actually commented there, in hindsight, I wonder if I spoke too soon.

Or if that option doesn't exist in Master anymore in general... who knows right?

;)

@Dudemanguy
Copy link
Member

Dudemanguy commented Jan 23, 2022

sndio support was added back with #9298.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants