Created attachment 161695 [details]
mpv could be more useful on FreeBSD desktops out of the box. The attached patch enables GPU video acceleration options VDPAU, OPENGL, VAAPI, and V4L for testing e.g. webcams. It also enables the ZSH option for completion support in zsh.
Created attachment 161696 [details]
Adding jbeich@ to decide if your proposal should be accepted :)
Just for the record, multimedia/mpv port has been updated to a new release. See bug 203550.
VDPAU and VAAPI require corresponding support in multimedia/ffmpeg. Without it --vo=vdpau and --vo=vaapi would use hardware overlays and scaling but with software decoding. mplayer avoids this issue by using a bundled copy of ffmpeg. --vo=opengl also supports hardware decoding but you still need to build mpv with VDPAU or VAAPI.
With OPENGL --vo=opengl would be picked over --vo=xv by default, see the list in video_out_drivers in video/out/vo.c. It's going to improve non-video scaling (OSD and subtitles) but those stuck with swrast DRI (mainly non-x86) may want --vo=sdl:sw (VIDEO_OPENGL=off) or return of --vo=x11  instead.
V4L should be fine as tv:// and pvr:// don't use v4l support in libavdevice for which there's av:// protocol.
multimedia/ffmpeg can enable VDPAU, VAAPI, V4L by default as well. It's probably a matter of how popular they are to burden package users with more dependencies. libv4l can be pulled by quite a few non-multimedia and non-video-chat packages e.g., blender (via opencv), firefox, wine-staging.
So if we add such OPTIONS as default, we can break things. As jbeich@ pointed previously such OPTIONS should be enable in ffmpeg by default as well.
Let me summarize a bit.
Enabling OPENGL is out of the question because it might break mpv or make it less useful on some devices.
Enabling V4L is ok. It does not require changing other ports and does not
burden users with more dependencies as libv4l is probably installed anyway
through e.g. firefox, opencv, wine-staging, thunderbird, webcamd, ...
Enabling ZSH is ok.
Then there is VDPAU and VAAPI which require ffmpeg support. How do we find out
how popular VDPAU/VAAPI are?
(In reply to tobias.kortkamp from comment #6)
Yes, that's the first disadvantage to use pkg(8) instead use the ports tree to install software.
Probably, you will find interesting to check out the port stats:
> Probably, you will find interesting to check out the port stats:
Unfortunately, the pages produced at bsdstats.org/ports.php are
(In reply to Carlos J Puga Medina from comment #5)
> So if we add such OPTIONS as default, we can break things.
No. Only crappy drivers can, and --vo=xv wouldn't be safe in such a case. I think it's fine to enable the options listed here. User can still disable them via ~/.mpv/config.
LCMS2 can also be enabled by default because it's pulled by wine, gtk30 (via colord), cups (via cups-filters), libreoffice + many image manipulation apps/libs.
Created attachment 161832 [details]
New release was committed, so the patch has been reworked.
A commit references this bug:
Date: Fri Oct 9 05:28:34 UTC 2015
New revision: 398901
multimedia/mpv: enable more options by default
OPENGL, V4L, VAAPI, VDPAU, XINERAMA, ZSH are now enabled to make package
more useful. OPENGL, VAAPI, VDPAU also support hardware decoding but only
if multimedia/ffmpeg is built with VAAPI, VDPAU (currently off by default).
Submitted by: firstname.lastname@example.org
Approved by: Carlos J Puga Medina <email@example.com> (maintainer)