Bug 251916 - multimedia/mpv: enable pulseaudio by default
Summary: multimedia/mpv: enable pulseaudio by default
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-multimedia (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-12-17 10:22 UTC by Usama Khan
Modified: 2021-02-23 09:30 UTC (History)
3 users (show)

See Also:
bugzilla: maintainer-feedback? (multimedia)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Usama Khan 2020-12-17 10:22:47 UTC
Feature Request in multimedia/mpv:

Please enable Pulseaudio option in the port of "multimedia/mpv" by default, so that the Pulseaudio plugin is included in the official binary.

Background:
FreeBSD uses OSS. I works well in physical machines, but when use in virtual machines (VirtualBox), the audio hangs every time when the audio track is fast forwarded. A fix is mentioned on the web, to add following line /etc/rc.conf:
sndiod_flags="-a on"
But it did not solve the problem. 
However, when multimedia/mpv is installed from ports (after enabling Pulseaudio option), then the audio works very well with Pulse Output. As, for virtual machines, the only fix of the problem is to add PulseAudio every time, therefore, it would be beneficial to enable it by default in the ports.
Comment 1 VVD 2020-12-17 21:11:35 UTC
Don't think other users of the mpv will be happy…

I'm build mpv self from ports with custom options.
Comment 2 Goran Mekić 2020-12-17 23:32:09 UTC
The negative side of just "pkg install pulseaudio" is that it has autostart so you sudenly find your self in wonder why normal setup that worked just few minutes ago doesn't work any more. I wouldn't mind pulseaudio as dependency on any app if pulseaudio autostart would be off by default with pkg-message instructing users how to turn it on.
Comment 3 Usama Khan 2020-12-18 09:09:29 UTC
Goran Mekić's suggestion is more appropiate. In this way Pulseaudio can be added without affecting other users.
Comment 4 Alex S 2020-12-18 10:28:53 UTC
(In reply to Zetro Track from comment #3)

> Goran Mekić's suggestion is more appropiate. In this way Pulseaudio can be added without affecting other users.

It can't be, applications usually look for libpulse.so, not for the running daemon: https://unix.stackexchange.com/questions/204522/how-does-pulseaudio-start.
Comment 5 Goran Mekić 2020-12-18 11:36:41 UTC
(In reply to Alex S from comment #4)
You see the part where "autostart" is mentioned? I would just like for "autostart = no" be in /usr/local/etc/pulse/client.conf by default, that's all.
Comment 6 Usama Khan 2020-12-18 12:49:48 UTC
(In reply to Alex S from comment #4)
The second post in this thread mentions that:
1. The first reply is outdated, and
2. The current role of Systemd in Linux
Systemd exhibits such kind of behaviour, as mentioned in the post. So, as FreeBSD does not have Systemd, so is it valid here?
Comment 7 Jamie Landeg-Jones 2020-12-19 05:54:17 UTC
As I posted on the mailing list:

The problem with your request is that people who don't want pulseaudio
on their systems end up getting it (and any dependencies) anyway.

Personally, I won't let it near any of my systems (but I use ports rather
than pkg, so that's moot)

However, there is a solution, and you don't need to make your own
repository - simply make a package for mpv:

cd /usr/ports/multimedia/mpv
make package

Set the options how you want them, and it will build a package file
that you can add on every machine using "pkg add"

(see "man ports" for more information)

Does this help?
Comment 8 Usama Khan 2020-12-19 13:33:51 UTC
(In reply to Jamie Landeg-Jones from comment #7)

Thanks for your reply. I will definitely check "make package". But, actually I am not worried about myself because I can build mpv from ports. I am more concerned about my students.

I am a Teacher in an Educational Institute. Besides my usual job, I am also teaching Linux System Administration on voluntary basis (as a hobby project). However, for some time, I am getting frustrated by the chaos in the Linux World (lack of coherence, distros, fhs, package managers etc.). So I am planning to gradually move all my systems from Linux to Unix (FreeBSD). I am not only moving myself towards FreeBSD, but also trying to take my students with me. However, unlike me, almost all of my students came from Windows background, and expect similar functionality in other OSes (Android and Windows like OSes are making new generations lazy and dumb).

Many years ago, the student dropout from my course was high (due to lack of proper support in Linux). But, due to increased support (in last few years), this dropout rate has decreased dramatically and now more and more students stick with Linux.

Now, as I am trying to move my students towards FreeBSD, the same thing is happening here due to lack of certain things. Presently, it is very difficult to keep students motivated due lack of few things (especially Multimedia/Games/Entertainment stuff which may not be much important for us, but the young people want it badly). For instance, I advised some of my students to install FreeBSD in VirtualBox. But all of them came back with complains (e.g related to lack of Pulseaudio). So, I guided them about compiling mpv and other multimedia softwares from Ports and add Pulseaudio support. However, installing mpv (from Ports) will create further problems, i.e. when any of them will upgrade his system (pkg upgrade), his/her Pulse support will be gone. So, in order to fix this problem they have to lock the package. A kind of cat and mouse game.

The story does not end here, and whenever any of my student will install FreeBSD in VirtualBox, he/she will come back (to me) with Pulseaudio complain. As I am teaching them Linux for many years, I know that how easily students get demotivated and move back to their previous OS. So, that's why I am requesting to enable Pulseaudio support in Ports, so that I can keep my students motivated and stick to FreeBSD.
Comment 9 Goran Mekić 2020-12-19 14:44:03 UTC
As audio enthusiast using FreeBSD and teaching in local hackerspace, I totally understand what you're talking about. One thing that makes upgrade easier is having your own repository and poudriere build. As it is not straight forward how one can configure that, please feel free to ping me, I will be more than happy to help with any problems, audio, FreeBSD or education (but you probably have much more experience in the last one than me).
Comment 10 Usama Khan 2020-12-19 14:46:02 UTC
Today's upgrade (pkg upgrade) brought Pulseaudio support in audacious-plugins. So, after this upgrade, pulseaudio dependencies are already installed in our systems. So, I hope that other maintainers will also think on the same lines and add this needed feature to their Ports.
Comment 11 Usama Khan 2020-12-19 14:49:58 UTC
(In reply to Goran Mekić from comment #9)
As I am not a native English speaker, so please elaborate your following sentence:
"Please feel free to ping me"
Does "Ping me" here means "Contact me"?
Regards
Comment 12 Goran Mekić 2020-12-19 14:51:49 UTC
(In reply to Zetro Track from comment #11)
Exactly. Feel free to contact me and we'll figure out something.