-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It was always marked as "experimental", and had inherent problems that were never fixed. It was disabled by default, and I don't think anyone is using it.
- Loading branch information
wm4
committed
Mar 28, 2020
1 parent
27b4bdf
commit 71d218e
Showing
5 changed files
with
0 additions
and
338 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this very much is used. This is our native sound API for OpenBSD.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is still used on OpenBSD systems. Could we fix the sndio backend bugs rather than disabling it?
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether it is disabled by default or not doesn't change the fact we have been using the backend for all of these years anyway.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd be happy to help fixing the bug that makes it problematic. The only issue I'm aware of is the one described by the warning message in the source code "Blocking until remaining audio is played... (sndio design bug).\n".
Is there anything else? Any pointers to related discussions are welcome.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dropping sndio will make mpv mostly unusable on openbsd. The extra latency introduced by stuff like pulseaudio will make this useless on most machines.
I don't know about bugs in sndio support, I've been using mpv on my openbsd machines for years by now, yes, with sndio support, and it just works. There are zero patches related to that, the only thing we do is enable it in the build.
Could you point us to a list of bugs to fix ?...
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that, if it's only because it doesn't support all possible sound format outputs nothing on OpenBSD supports the extra formats. That's pretty much another issue entirely.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"sndio is an extra layer, Pulse is an extra layer (I still suspect they simply didn't want to fix ALSA itself), there are many extra layers around" - the way you describe it, it sounds like it's "either sndio or pulse", but that's not the case.
The sound architecture on OpenBSD is either "kernel -> sndio -> software with sndio support" or "kernel -> sndio -> SDL/pulse/libao/whatever -> software without sndio support" - Pulse/SDL/etc do not talk directly to the kernel, they are an extra layer on top of sndio.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That warning is very pedantic. In reality, you don't even notice the blocking, considering you queue at most
a fraction of a second of audio... I just did a few tries alternating with sndio/ao sdl... I do not see ANY pause when I move around in the video. Indeed, I think we're going to patch that warning away locally.
if that's the only "bug" in sndio, it's definitely not worth stopping support for that.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been running mpv on Linux with sndio compiled in manually without issue for quite some time. The notion that the sndio back end is flawed seems greatly exaggerated in my opinion. The only problem encountered is the one mentioned above, that on each seek a warning in printed in the console, and mpv desyncs for a fraction of a second to catch up. In practice this is never a problem, with the exception of the repetitive seeks caused when manually stepping frames. Again, were talking about maybe a 1/4 second delay, not a deal breaker for anyone using sndio in the first place.
I'm sympathetic to @wm4's idea of developers never having to write code for any given back end, and rather target middleware libraries instead. From my experience today however, this concept is idealistic. It seems that most such layers simply introduce new limitations in terms of performance, latency, audio quality, and/or debugging. It should also be noted that PulseAudio is not such a framework, but an audio server of itself, and dropping AO support with the motivation of "use Pulse instead" is non sequitur. Some would argue that the reason sndio exist and is getting such traction is for the purpose of replacing software like PulseAudio.
For a lot of people--such as myself, and I imagine many in the *BSD community--mpv is the player of choice due to its support for features such as this one. Considering how well the AO worked, it would be sad to see it go.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, I somewhat understand @wm4 point of view: The code is specific to an OS that mpv developers don't use, they don't even know if that code woks at all, especially given that OpenBSD doesn't run in qemu with the audio defaults. I bet wm4 got no feedback from sndio AO users, as such feedback goes to the OpenBSD mailing-lists.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also sad to see this go. sndio on Linux has technical merit - I use it because of its simplicity and network transparency features.
And it even seems that the ao was written by @leahneukirchen with at least the partial intention to be useful under Linux.
This is just a Linux user's perspective, for OpenBSD it is of course absolutely vital.
Here's hoping that the bugs wm4 mentions can be resolved, and the burden of maintaining this ao eased.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is a lie that maintaining AO are burden, they happily coexisted for eternity until now.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, it was explicitly enabled by OpenBSD ports for over 4 years (and thus used by default there), so this argument is not worth much.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This assumes a developer has to be aware of arbitrary patches package managers apply to their projects though.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let me reframe things in the proper order: you guys tell us you want to remove some option, we do tell you that we use it.
Now you're saying that you want to remove it because it's not default ?
Pray tell, why the special treatment ?
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not me having any concrete information and you should not think this is what is going on at all (after all, I'm one of the few who so far hasn't heard a better explanation for the removal of the
--thing PARAM
syntax for cli parsing than the user channel's stories of "A user did--log-file A_FILE.mkv
and thus one way of the user to shoot his foot off was taken out"), but I will take a guesstimate here that:Now, of course theoretically the best course of action would be for someone to become an active person in the community, and thus at least make the testing part simpler. But of course, if that would happen right now the likelihood that something would go in before that would depend on the willingness of one to make their job harder at least until whatever the planned rework was done. After that rework would be done, any new, incoming work would then have to work with that, and the burden would not be on the reworking person, but on the person bringing in new code.
Note: This is purely just my delusional thoughts on some of the things here, and most likely have no connection to reality. Personally, I welcome people into the active community.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also I'm going to note that I personally would have preferred this thread to get a response with an mpv log or something similar confirming playback with the AO instead of "We totally do use it!" kind of comments somewhat earlier.
I attempt to understand the feelings, and I am not meaning this in the way that I do not trust anyone in particular here - but it unfortunately often is the case that users think they are utilizing something, while it might be something completely different in reality.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me put things that way: if it's the only concern, leave the abandoned plugins code around, commit the changes, and wait to see if there are patches to fix them.
Specifically: stuff like sndio is not enabled by default. The proper opensource way to handle it is to JUST leave it alone, possibly mark it as broken until someone jumps to fix it, and remove it after a few months.
As it stands, currently it compiles and works (probably not perfectly, but hey, on machines where audio/video is already taxing the cpu, it can be better than other outputs), so just leave it alone.
I've been working on opensource projects for quite a few years by now. in general projects that remove code beforehand are seen as hostile. Fixing things requires more investment: you have to figure out how to re-add it, re-add the glue that makes it compile before fixing it.
I could tell you how I've finally given up on contributing to gcc for instance, because the entry barrier was too steep (send a patch... wait for 3 months for somebody to tell you it was not appropriate because it missed a space before a paren, oh and btw, could you redo the patch because it doesn't apply to current... check that current actually does NOT work at all on your OS, finally figure out the extra patch you need, rince, repeat, 3 months each time).
Leaving it alone, just disabling it (which is most often trivial) announcing that it will be removed if nobody steps in to make it work better is the proper collaborative way.
What do you actually want ? a "perfect" multimedia player that works on a very small collection of backends, or a nitty-gritty real-world player that work on more backends, possibly not perfectly.
... you can actually gain support from the community. I know I use mpv all the time, and if my audio backends stop working, I would be happy to spend time to fix them so they still build.
if you start by removing them because they're not perfect, and you require me to:
Then it's more likely I will give up at some point. mpv is just one amongst 100+ software projects I try to work on...
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(+) Video --vid=1 () (h264 1920x800 29.970fps)
(+) Audio --aid=1 --alang=eng () (aac 2ch 48000Hz)
libEGL warning: DRI3: Screen seems not DRI3 capable
AO: [sndio] 48000Hz stereo 2ch s16
VO: [gpu] 1920x800 yuv420p
that what you mean ? works just fine here.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is on a BSD? Nice. Thank you.
I agree.
It was generally left alone for quite a while. It was marked as experimental according to understanding at that point in 0a44451 in 2014. If you look at the changes in the sndio AO since its initial merge in 2013, that has been quite one-sided. There was one commit in 2015 from the original mplayer patch's author, but otherwise it has been up to a single person to keep it rolling (who does not even use it). And looking at f.ex. 12d93fd there were even seeming improvements done.
While I agree that there apparently there was no communique in any of the release notes etc regarding removal (as far as I can see) or apparent messages for any of the users, but it was pretty clear that this AO had no contact surface with users, and thus became an option for removal. Additionally, there were alternative AOs that would still keep audio output on the systems going, and theoretically might even be more maintained by actual people who care about the audio system. Not saying I agree with the style 100%, but I do see where the ship was headed with this AO.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, as one data-point currently it works just fine on OpenBSD. Specifically, this is mpv-0.32.0
We have no patch to speak of.
We built the port with a lot of configure options:CONFIGURE_ARGS = --confloaddir=${SYSCONFDIR}/mpv
--confdir=${LOCALBASE}/share/examples/mpv
--mandir=${LOCALBASE}/man
--docdir=${LOCALBASE}/share/examples/mpv
--enable-cdda
--enable-dvdnav
--enable-libmpv-shared
--enable-sndio
--enable-sdl2
--disable-alsa
--disable-caca
--disable-cuda-hwaccel
--disable-egl-drm
--disable-gl-wayland
--disable-jack
--disable-rubberband
--disable-oss-audio
--disable-openal
--disable-optimize
--disable-pulse
--disable-rsound
--disable-libsmbclient
--disable-uchardet
--disable-vaapi
--disable-vaapi-drm
--disable-vaapi-x-egl
--disable-vaapi-x11
--disable-vaapi-wayland
--disable-vapoursynth
--disable-vdpau
--disable-vdpau-gl-x11
--disable-videotoolbox-gl
--disable-vulkan
--disable-wayland
Note that some of this is necessary for our pkg system (builds happen on a "shared" system so we have to be explicit as to what we don't want, otherwise we produce packages with "hidden dependencies".
To be fair, mpv defaults to
AO: [sdl] 48000Hz stereo 2ch s32
on my machine, but direct sndio is slightly less expensive, and I do know of configurations where it's a definitive win.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, OpenBSD is not FreeBSD, there are major differences between the OS. We don't have any kind of alsa nor alsa compatibility layer in OpenBSD. So basically, you encourage us to create a layer to non-existent software...
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sndio, as opposed to pulseaudio, is the only network audio system that is usable.
It was working until 0.32 on FreeBSD, no reason to remove it.
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#8314
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OSS is much better than sndio.
sndio:
71d218e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do I use OSS across the network?