GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
MOONLIGHT(1) Moonlight Embedded Manual MOONLIGHT(1)

Moonlight Embedded - Open source implementation of NVIDIA's GameStream

Usage: moonlight <action> [options] [host]
moonlight <configfile>

Pair this computer with the host.
Unpair this computer with the host.
Stream game from host to this computer.
List all available games and application on host.
Quit the current running game or application on host.
Create a mapping for the specified INPUT device.
Show help for all available commands.

Load configuration file CONFIG. All options specified before -config will be overwritten by the options in CONFIG. This options can be used multiple times.
Save the configuration provided by the options on the command line and all loaded configuration files to the file CONFIG.
-720
Use the resolution 1280x720 for streaming. This is the default option.
-1080
Use the resolution 1920x1080 for streaming.
-4k
Use the resolution 3840x2160 for streaming.
Change the horizontal resolution to WIDTH
Change the vertical resolution to HEIGHT
Change the number of frame per second to FPS. Defaults to 60 FPS.
Change bitrate to BITRATE Kbps. By default the bitrate depends on the selected resolution and FPS. For resolution 1080p and 60 FPS and higher, 20 Mbps is used. For resolution 1080p or 60 FPS and higher, 10 Mbps is used For other configurations, 5 Mbps is used by default.
Change the network packetsize to PACKETSIZE bytes. The packetsize should the smaller than the MTU of the network. This value must be a multiple of 16. By default, 1392 is used on LAN and 1024 on WAN.
Select codec to use. Can be 'auto', 'h264', 'h265', 'hevc', or 'av1'. Not all video decoders support H.265/HEVC or AV1. Will still use H.264 if server doesn't support HEVC or AV1.
Try to use yuv444 format.Better video quality but not efficiency. Note: hevc(h265) with yuv444 format is the more common combination. Need sunshine host support(version >=24.0) and just support vaapi or x11 platform. If meet h264+YUV444P, 'x11' platform is recommended.
Fake grab keyboard and mouse on embedded(not SDL) platform. Not grab window anymore. Use Ctrl+Alt+Shift+M to switch.
Enable optimizations for LAN or WAN streaming.
Change the requested app to execute to APP. By default Steam is started.
Stop GFE from changing the graphical settings of the requested game or application.
Play the audio on the host computer instead of this device.
Enable surround sound instead of stereo.
Change the directory to save encryption keys to DIRECTORY. By default the encryption keys are stored in $XDG_CACHE_DIR/moonlight or ~/.cache/moonlight
Use MAPPING as the mapping file for all inputs. This mapping file should have the same format as the gamecontrollerdb.txt for SDL2. By default the gamecontrollerdb.txt provided by Moonlight Embedded is used.
Select platform for audio and video output and input. <PLATFORM> can be vaapi, X11, x11, x11_vaapi, wayland_vaapi, rk or fake etc.

Platform 'x11/x11_vaapi/vaapi' will choose x11/wayland/gbm display automatically. Platform 'X11' will force to x11 server.

Don't stream if resolution is not officially supported by the server
Send quit app request to remote after quitting session
Disable all input processing (view-only mode)
Disable gamepad mouse emulation (activated by long pressing Start button)
Enable verbose output
Enable verbose and debug output
Enable the INPUT device. By default all available input devices are enabled. Only evdev devices /dev/input/event* are supported.
Using SDL gamepad driver instead of evdev when using 'x11' or 'x11_vaapi'(not sdl) platform.
Swap x/y and a/b for gamepad.Only effected on embedded(not sdl) platform.
Use <DEVICE> as audio output device on embedded system such as Raspberry Pi. The default value is 'sysdefault' for ALSA and 'hdmi' for OMX on the Raspberry Pi.
Display the stream in a window instead of fullscreen. Only available when X11 or SDL platform is used.

Moonlight Embedded will load a configuration file from:

  $XDG_CONFIG_HOME/moonlight/moonlight.conf
  (fallback to ~/.config/moonlight/moonlight.conf)

If no user specified configuration file is available the configuration will be loaded from:

  /usr/local/etc/moonlight/moonlight.conf

A documented example configuration file can be found at /usr/local/etc/moonlight/moonlight.conf.

 Xbox360 controller need xb360gp(4) or 'multimedia/webcamd and cuse(3)'.
 X-input or d-input gamepads need hgame(4) or webcamd.
 FreeBSD supports some controllers.Please see hgame(4) xb360gp(4)
 ps4dshock(4) and FreeBSD forums.
 Embedded platforms such as 'x11/x11_vaapi/vaapi' use evdev driver.
 May be only evdev(not sdl) could support xbox360 seriers on FreeBSD.
 Use '$ moonlight map -input /dev/input/eventN >>
      ~/.config/moonlight/gamecontrollerdb.txt' 
 to create mapping for embedded(not sdl) platform.
 Or use 'x11/antimicrox' to create mapping for sdl platform.
 $HOME/.config/moonlight/gamecontrollerdb.txt could be created and used
 by default.
 Option '-sdlgp' can enable sdl gamepad driver instead of evdev for
 embedded platform.
 Note: No rumble feature now.

 Use Ctrl+Alt+Shift+Q or Play+Back+LeftShoulder+RightShoulder to quit the
 streaming session.
 Use Ctrl+Alt+Shift+Z to Grab/Ungrab keyboard.
 Use Ctrl+Alt+Shift+M to fakeGrab/normalGrab keyboard.
 Use Ctrl+Alt+Shift+G to Enable/Disable vitual key on the top of touchpad
 for the windows precision touchpad.
 It could not grab the keyboard Using sdl platform.

Pair:
# moonlight pair 192.168.0.1

Connect:
The following cmd means to connect 192.168.0.1 with a resolution 2560x1600.
# moonlight stream -app Desktop -width 2560 -height 1600 192.168.0.1
The following cmd means to connect 192.168.0.1 with a resolution 1080p
and the fps 120.And try to decoding with GPU.
# moonlight stream -app Steam -width 1920 -height 1080 -fps 120 \
-platform 'x11_vaapi' 192.168.0.1
Do not want grab keyboard and mouse:
# moonlight stream -app Desktop -width 1920 -height 1080 -fps 120 \
-platform 'vaapi' -fakegrab 192.168.0.1
Try yuv444 video mode for better video quality:
# moonlight stream -app Desktop -width 1920 -height 1080 -fps 120 \
-platform 'vaapi' -yuv444 -codec hevc 192.168.0.1

 Platform 'sdl' and 'x11' is decoding with cpu.
 Only platform 'x11/vaapi/x11_vaapi/wayland' support yuv444 video mode.
 Only some gpu support yuv444 video mode. And need sunshine host support.
 Platform '*vaapi' is decoding with gpu.
 If you want to decoding with intel gpu,you must do:
   1.Use platform 'x11_vaapi' or 'wayland_vaapi' or 'vaapi'
   2.Install package:libva-intel-driver/libva-intel-media-driver.
 Multi keyboard may meet bugs.Please man kbdmux or kbdcontrol.
 And try to disable kbdmux or use -input to specify wanted keyboards or mouses.

Iwan Timmer <irtimmer@gmail.com>

2025-07-17 moonlight 2.7.4

Search for    or go to Top of page |  Section 1 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.