BSD Ports

multimedia/moonshine 0.16.0_1 FreeBSD

Self-hosted game stream host for Moonlight

System
FreeBSD
Repository
FreeBSD ports
Maintainer
[email protected]
Port added
Last update
Commit
9c878207a1
License
BSD2CLAUSE
Categories
multimedia
Package size
5400.9 KiB, 14814.0 KiB installed

Description

Moonshine is a self-hosted game streaming host compatible with the Moonlight client, an open alternative to Sunshine/GameStream.

It runs a headless Wayland compositor, captures the rendered frames via dmabuf, encodes them on the GPU with Vulkan Video (H.264/H.265), and streams video, Opus audio, and keyboard/mouse/gamepad input to a Moonlight client over the GameStream protocol.

This is the FreeBSD fork, which uses a native virtual_oss, /dev/uinput backend for gamepad injection and Vulkan Video encode via Mesa/RADV.

Install

Binary package:

pkg install moonshine

From the ports tree:

cd /usr/ports/multimedia/moonshine/ && make install clean

To depend on this port in another port's Makefile:

RUN_DEPENDS=	moonshine>0:multimedia/moonshine

Packages

The version each package repository carries. “-” means the repository builds no package of it, “n/a” that there is no such repository.

Repositoryaarch64amd64armv6armv7i386
FreeBSD:14:latest0.16.00.16.0_1---
FreeBSD:14:quarterly0.16.00.16.0n/a--
FreeBSD:15:latest0.16.0_10.16.0_1n/a--
FreeBSD:15:quarterly0.16.00.16.0n/an/an/a
FreeBSD:16:latest0.16.00.16.0_1n/an/an/a
FreeBSD:16:quarterlyn/an/an/an/an/a

Dependencies

As this port's Makefile names them.

Library 2

Runtime 1

The full lists below include those, and their dependencies in turn.

Build dependencies 47
Run dependencies 114

The first 100 are listed.

No port depends on this one.

Configuration

No options to configure.

USES
cargo localbase:ldflags
Service scripts
moonshine

Message after installing

moonshine has been installed. Notes for setting it up:

1. Configuration lives in /usr/local/etc/moonshine/moonshine.toml
   (a moonshine.toml.sample is installed as a starting point).

2. Enable the service with:
     service moonshine enable
     service moonshine start
   By default it runs as root. Set moonshine_user in rc.conf to run it as an
   unprivileged user (see the rc script for all variables).
   A non-root moonshine_user must be in the 'video' and 'audio' groups so it
   can open the GPU/DRM render device and the virtual_oss(8) audio loopback;
   without them moonshine aborts the session (and kills the launched app)
   at stream setup:
     pw groupmod video -m <moonshine_user>
     pw groupmod audio -m <moonshine_user>

3. Pairing a client: when a Moonlight client requests pairing, moonshine logs
   a banner with a URL to open in a browser to enter the PIN, e.g.
     PAIRING REQUESTED - open this URL in a browser to enter the PIN:
         http://<this-host>:47989/pin?uniqueid=...
   When run as a service this banner goes to the log file, not the console
   (default /var/log/moonshine.log, see moonshine_log_file in the rc script):
     tail -f /var/log/moonshine.log
   Open that URL, type the PIN shown on the client, and the pairing completes.

4. Gamepad support uses /dev/uinput, which is not group-accessible by default.
   To reach it as a non-root user, expose it to the 'video' group (see item 2)
   via /etc/devfs.rules:
     [localrules=10]
     add path 'uinput' mode 0660 group video
   with devfs_system_ruleset="localrules" in /etc/rc.conf, then
   'service devfs restart'.

5. Audio capture reads the game's audio from the virtual_oss(8) loopback
   device /dev/dsp.loop. Enable it before starting moonshine:
     service virtual_oss enable
     service virtual_oss start
   The default virtual_oss configuration creates /dev/dsp.loop; point your
   playback applications at it so their audio is streamed to the client.

Files

distinfo 515
FileSizeSHA256
rust/crates/adler2-2.0.1.crate13366320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa
rust/crates/aead-0.5.2.crate15509d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0
rust/crates/aes-0.8.4.crate124812b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0
rust/crates/aes-0.9.3.crate11240835f0f96ce78e38c3dc6d8948aa8163d06385be74000f3c7a95bf1eef35d3ea32
rust/crates/aes-gcm-0.10.3.crate148991831010a0f742e1209b3bcea8fab6a8e149051ba6099432c8cb2cc117dec3ead1
rust/crates/aho-corasick-1.1.5.crate184315c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba
rust/crates/aligned-0.4.3.crate10452ee4508988c62edf04abd8d92897fca0c2995d907ce1dfeaf369dac3716a40685
rust/crates/aligned-vec-0.6.4.crate12609dc890384c8602f339876ded803c97ad529f3842aba97f6392b3dba0dd171769b
rust/crates/anstream-1.0.0.crate28916824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d
rust/crates/anstyle-1.0.14.crate17787940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000
rust/crates/anstyle-parse-1.0.0.crate2204252ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e
rust/crates/anstyle-query-1.1.5.crate1026440c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc
rust/crates/anstyle-wincon-3.0.11.crate12638291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d
rust/crates/anyhow-1.0.104.crate48819330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470
rust/crates/appendlist-1.4.0.crate7252e149dc73cd30538307e7ffa2acd3d2221148eaeed4871f246657b1c3eaa1cbd2
rust/crates/arbitrary-1.4.2.crate38307c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1
rust/crates/arg_enum_proc_macro-0.3.4.crate51020ae92a5119aa49cdbcf6b9f893fe4e1d98b04ccbf82ee0584ad948a44a734dea
rust/crates/arrayvec-0.7.8.crate33260d3fb67a6e08acf24fdeccbac2cb6ac4305825bd1f117462e0e6f2f193345ad56
rust/crates/as-slice-0.2.1.crate6942516b6b4f0e40d50dcda9365d53964ec74560ad4284da2e7fc97122cd83174516
rust/crates/asn1-rs-0.7.2.crate93179b7f43a50ac4fdca5df8e885c21b835997f0a1cdee65494a6847694a98652d9d8

Commit history 5

DateCommitCreditsLog message
9c878207a1 Mikael Urankar lang/rust: Bump revisions after 1.99.0
PR: 299016
8296c49aeb Olivier Cochard multimedia/moonshine: update to 0.16.0
7316461925 Mikael Urankar lang/rust: Bump revisions after 1.98.1
PR: 298139
a99646edfb Olivier Cochard multimedia/moonshine: Update to 0.15.0
a02d354896 Olivier Cochard multimedia/moonshine: new port
Moonshine is a self-hosted game streaming host compatible with the Moonlight client, an open alternative to Sunshine/GameStream.