Closed Foxboron closed 1 year ago
I think ffmpeg wont work, but gamescope exposes a pipewire stream. Try using something like this: https://git.sr.ht/~emersion/gamescope-pipewire-demo/
For reference: https://github.com/Plagman/gamescope/issues/213 https://github.com/Plagman/gamescope/pull/219
Funny enough I didn't need to specify the path and stuff just works. Currently trying to figure out how to sync up audio and video and not going so well :)
gst-launch-1.0 -e pipewiresrc do-timestamp=true ! videoconvert ! vaapih264enc ! h264parse ! flvmux streamable=true skip-backwards-streams=true name=mux ! rtmpsink location='rtmp://192.168.1.4/live/external.stream live=1' pulsesrc device="alsa_output.pci-0000_04_00.5-platform-acp5x_mach.0.HiFi__hw_acp5x_1__sink.monitor" ! audioconvert ! audioresample ! faac ! mux.
I wonder if OBS may work for the RTMP streaming/recording? It doesn't look like there is pipewire support outside of screen capture on Wayland, but there's an external plug-in that seems promising https://github.com/feldim2425/obs-pipewire
I did a blogpost on how to properly stream from the Steam Deck a while ago.
Have you had any luck with the Audio/Video Sync? Also, have you found a way to record locally without the need for an RTMP Stream? I have tried every way I can think to do it with absolutely no luck.
I have an obs studio branch that uses the gamescope pipewire interface
@CptnRogers https://git.sr.ht/~avery/recapture
Golang that uses the gstreamer interface
This is above my head sadly so I'm not super sure what the proper solution is :)
If I use kmsgrab on the Steam Deck with
It will crash with
[kmsgrab @ 0x561e6ec9d180] Plane 55 framebuffer format changed: now 34325258
whenever I swap between the UI and the game.This seems to be because gamescope is actively changing the buffer format: https://github.com/Plagman/gamescope/blob/master/src/drm.cpp#L144
Where as ffmpeg assumes it will be the same for the entire recording session. https://github.com/FFmpeg/FFmpeg/blob/master/libavdevice/kmsgrab.c#L172
I'm not sure if this is solveable or if this is inherently an issue with ffmpeg. But thought I'd write an issue.