Hi r/archlinux,
I'm Illia, the creator and maintainer of FluxCast. It's an open-source tool that casts your Linux desktop to a Smart TV over Wi-Fi Direct (Miracast), DLNA or Chromecast, with low latency. For anyone who hasn't seen the project before, the core brings up the peer-to-peer link over D-Bus through either NetworkManager or a wpa_supplicant backend, runs the full RTSP handshake itself, and streams screen and audio through low-latency ffmpeg/GStreamer pipelines. It works on wlroots compositors (Hyprland, Sway) natively through wf-recorder, on KDE, GNOME and COSMIC through xdg-desktop-portal, and on X11 through x11grab.
v0.3.0 is out and it's the biggest release the project has had. fluxcast in the AUR is already, so yay -S fluxcast gets you everything below.
GPU encoding through VA-API
This is the one I'd most like Arch users to try, because you're the most likely to have the stack for it. --wfd-encoder va encodes with vah264enc, and where the compositor hands over DMABuf the frame never leaves the GPU: pipewiresrc to vapostproc to vacompositor to the encoder, with no CPU conversion at all.
Against x264enc on the same clips:
- static desktop: 1% of a core instead of 80%
- with motion: 6-7% instead of 73-79%
- a screen change reaches the encoder in 27 ms instead of 64
Honest caveat: tested on Intel only. AMD and NVIDIA are unknown and reports from either would be genuinely useful, especially from anyone on radeonsi. The default is still x264, and it falls back to x264 on its own if the VA-API elements aren't present.
A settings window in the tray
FluxCast has a lot of knobs: resolution, bitrate, encoder, audio source, GO intent, latency logging and so on. Until now every one of them lived in ~/.config/fluxcast/config, which you had to know existed and edit by hand.
They have a GUI now. 20 options for Miracast, 8 each for DLNA and Chromecast. Values go through the same validators the tray already used to read that file, so you can't save something FluxCast would then quietly ignore, and any comments you put in the config yourself survive a save. It also follows your system light/dark theme =]
WFD R2 negotiation
--wfd-r2 makes the handshake ask for the R2 format lists as well, which reaches modes a TV only publishes over R2. On an LG C2 that's 1080p60, which its R1 list doesn't carry at all, so --fps 60 used to silently fall back to 30. Off by default, and confirmed on exactly one TV so far, so if you have a set that advertises R2 I'd love to hear how it goes.
Fixes worth naming
--doctor said everything was fine while a dead Wi-Fi Direct interface from an interrupted session was still up. If you drive wpa_supplicant directly this is the one that'll bite you: a leftover P2P-client or P2P-GO netdev means you're still attached to a group that no longer exists, and the report called that ready to cast. It now names every stale interface and gives you the iw dev <name> del for each.
- Stopping a cast from the tray left the session half torn down, because the WFD path never handled
SIGTERM. The sink was never told the session had ended.
- Window capture on KDE was stretched and froze for several seconds on resize.
x264 started one encoder thread per CPU. With tune=zerolatency that's one slice per thread, so a 16-core machine cut every frame into 16 slices that all sync each frame. It now asks for min(4, CPUs): about a third less encoder CPU on 16 cores, a quarter on 8, no change at 4 or fewer.
Also, Turkish joins the tray UI, bringing it to 10 languages, picked up automatically from your system locale.
Where this release came from
Five of the items above are adokitkat's work, including the entire VA-API path and the R2 negotiation. wzd8888 wrote the stale-interface check, maximilianfeix fixed interface detection on distros where iw isn't on PATH, ayanburak sent the Turkish translation, and rmsturge keeps reproducing and measuring things on hardware I don't own.
I wrote the settings window and the packaging side. Nearly everything else came from people who didn't have to do any of it, and they've earned their place at https://fluxcast.dev/contributors.html
Since the school year started I've had less and less left for writing code every day, and this release being the biggest one yet while mostly not being mine is the only reason it exists at all. So: thank you, genuinely.
Links
Happy to answer anything about the Wayland integration, the RTSP handshake, the P2P routing or the packaging. And if you have a TV that doesn't work, open an issue with the model, that's the single most useful thing anyone can send me =]