Title here
Summary here
UxPlay 是一个开源的AirPlay Server. 通过它,可以将iOS/iPadOS设备的屏幕和声音投射到Linux, macOS(Intel芯片和M芯片), 和 Unix系统上,1.57版开始也支持Windows系统。
非常丝滑,清晰度也不错,延时还比较低,还支持硬件加速,整体性能非常出色。
以debian12为例,从源里面直接安装即可。
sudo apt install uxplay
对于Intel和AMD的GPU(核显),使用 VAAPI gstreamer 插件进行硬件解码。Intel测试下来使用核显延时会增加一些,AMD未测试。
sudo apt-get install gstreamer1.0-vaapi
运行uxplay命令,即可启动服务。然后iPhone从右上角下滑,点击
图标,即可搜索到uxplay服务,点击即可投屏。
uxplay
systemctl status avahi-daemon
查看服务状态,systemctl start avahi-daemon
启动服务。UXPLAY(1) User Commands UXPLAY(1)
NAME
uxplay - start AirPlay server
SYNOPSIS
uxplay [-n name] [-s wxh] [-p [n]] [more OPTIONS ...]
DESCRIPTION
UxPlay 1.62: An open-source AirPlay mirroring (+ audio streaming) server.
OPTIONS
-n name Specify the network name of the AirPlay server
-nh Do NOT append "@hostname" at end of the AirPlay server name
-s wxh[@r]Set display resolution [refresh_rate] default 1920x1080[@60]
-o Set display "overscanned" mode on (not usually needed)
-fs Full-screen (only works with X11, Wayland and VAAPI)
-p Use legacy ports UDP 6000:6001:7011 TCP 7000:7001:7100
-p n Use TCP and UDP ports n,n+1,n+2. range 1024-65535
use "-p n1,n2,n3" to set each port, "n1,n2" for n3 = n2+1
"-p tcp n" or "-p udp n" sets TCP or UDP ports separately.
-avdec Force software h264 video decoding with libav decoder.
-vp prs Choose GStreamer h264 parser; default "h264parse"
-vd dec Choose GStreamer h264 decoder; default "decodebin"
choices: (software) avdec_h264; (hardware) v4l2h264dec,
nvdec, nvh264dec, vaapih264dec, vtdec, ...
-vc cnv Choose GStreamer videoconverter; default "videoconvert"
another choice when using v4l2h264dec: v4l2convert.
-vs sink Choose the GStreamer videosink; default "autovideosink"
choices: ximagesink,xvimagesink,vaapisink,glimagesink,
gtksink,waylandsink,osximagesink,kmssink,d3d11videosink,...
-vs 0 Streamed audio only, with no video display window.
-v4l2 Use Video4Linux2 for GPU hardware h264 video decoding.
-bt709 A workaround (bt709 color) that may be needed with -rpi.
-rpi Same as "-v4l2" (for RPi=Rasberry Pi).
-rpigl Same as "-rpi -vs glimagesink" for RPi.
-rpifb Same as "-rpi -vs kmssink" for RPi using framebuffer.
-rpiwl Same as "-rpi -vs waylandsink" for RPi using Wayland.
-as sink Choose the GStreamer audiosink; default "autoaudiosink"
choices:pulsesink,alsasink,pipewiresink,osssink,oss4sink,
jackaudiosink,osxaudiosink,wasapisink,directsoundsink,..
-as 0 (or -a) Turn audio off, streamed video only.
-ao x.y Audio offset time in seconds (default 0.0) in Audio-only mode.
-ca fn In Airplay Audio (ALAC) mode, write cover-art to file fn.
-reset n Reset after 3n seconds client silence (default 5, 0=never).
-nc Do not close video window when client stops mirroring
-nohold Drop current connection when new client connects.
-FPSdata Show video-streaming performance reports sent by client.
-fps n Set maximum allowed streaming framerate, default 30
-f {H|V|I}Horizontal|Vertical flip, or both=Inversion=rotate 180 deg
-r {R|L} Rotate 90 degrees Right (cw) or Left (ccw)
-m Use random MAC address (use for concurrent UxPlay's)
-vdmp [n] Dump h264 video output to "fn.h264"; fn="videodump", change
with "-vdmp [n] filename". If [n] is given, file fn.x.h264
x=1,2,.. opens whenever a new SPS/PPS NAL arrives, and <=n
NAL units are dumped.
-admp [n] Dump audio output to "fn.x.fmt", fmt ={aac, alac, aud}, x
=1,2,..; fn="audiodump"; change with "-admp [n] filename".
x increases when audio format changes. If n is given, <= n
audio packets are dumped. "aud"= unknown format.
-d Enable debug logging
-v Displays version information
-h Displays help information
1.62 January 2023 UXPLAY(1)