-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ability to record gameplay #44
Comments
I was actually able to do this with the following command: Someone also managed to stream to youtube with ffmpeg using this: https://gist.github.com/olasd/9841772 |
Using |
Did you try using the NVENC encoder? That's the build in hardware encoder on Nvidia cards which is also used for recording in Nvidia's Windows software: https://wiki.archlinux.org/index.php/FFmpeg#NVIDIA_NVENC/NVDEC |
I recently tried this again with NVENC using the following command line: This worked much better performance-wise, but I still saw flashing artifacts as shown in the attached screenshot. Also, AMD and Intel users won't be able to use NVENC. |
AMD has AMF/VCE. Intel has QuickSync. Both are supported by OBS. Are we able to make OBS run in the background and implement or use some overlay to control it? It has a websocket plugin, so that may be implemented into the steam buddy. |
OBS just uses ffmpeg in the background, which supports all of these. It would probably require some fiddling to figure out how to figure out how to use the correct encoder. |
I understand that OBS may be too much to implement for just recording. So here some quick search later about accelerating ffmpeg.
All acceleration and NVENC:
https://trac.ffmpeg.org/wiki/HWAccelIntro
Intel QSV (QuickSync Video):
https://trac.ffmpeg.org/wiki/Hardware/QuickSync
https://stackoverflow.com/questions/45181730/ffmpeg-encode-x264-with-amd-gpu-on-windows
AMD VCE/AMF:
https://trac.ffmpeg.org/wiki/Hardware/VAAPI
…-------- Ursprüngliche Nachricht --------
Von: Wouter Wijsman <[email protected]>
Datum: 10.06.20 11:28 (GMT+01:00)
An: gamer-os/steam-buddy <[email protected]>
Cc: Jakub <[email protected]>, Comment <[email protected]>
Betreff: Re: [gamer-os/steam-buddy] add ability to record gameplay (#44)
OBS just uses ffmpeg in the background, which supports all of these. It would probably require some fiddling to figure out how to figure out how to use the correct encoder.
|
From discord, just capturing it here so we don't forget: Samsagax: For those that want to try, you'll need:
Then:
Samsagax: Then you can access the stream by: Also might be neat to just embed the video right in the steambuddy page. |
Here is a working setup for streaming on lan to be picked up to OBS running on a second machine. This is the poor man's setup without a capture card in two machines, you play in the GamerOS one and on the second one, setup OBS with your scene and stream to your preferred stream service. Basic setup:
Then run the relevant ffmpeg command:
Then on the client side (the second machine with OBS) you can test the stream with: Or with OBS set a Media Source and point it to the same URL.
The name of the stream in SLS (and consequently the client side) is configurable with the relevant option inside More than one stream is possible with different inputs on the same server. Also for recording just need to set a file instead of the srt output (and obviously srt server is not needed). |
Some considerations - This will need SLS installed. Will provide our own configuration. - Currently uses FFmpeg with hardcoded values as explained in ChimeraOS#44 discussion. To test from the repo, copy `./config/sls.conf` to `~/.local/share/steam-buddy/settings/sls.conf` and start steam-buddy: ``` $ ./steam-buddy ``` Then after logging in into steam-buddy got to the url: `[steam-buddy-url]/streaming/net/start` to start streaming, and `[steam-buddy-url]/streaming/net/stop` to stop. To consume the stream you can do: ``` $ ffplay -fflags nobuffer -i "srt://[steam-buddy-url]:8080?streamid=live.gameros/live/stream" ```
Now let's talk configurables for ffmpeg: it's a plethora of things. I'm thinking of a friendly way of doing it but the issue is with codec options. So this is what I have in mind and would be great to have some feedback: A single page on steam-buddy to configure the ffmpeg line:
|
* First commit for streaming to LAN Some considerations - This will need SLS installed. Will provide our own configuration. - Currently uses FFmpeg with hardcoded values as explained in #44 discussion. To test from the repo, copy `./config/sls.conf` to `~/.local/share/steam-buddy/settings/sls.conf` and start steam-buddy: ``` $ ./steam-buddy ``` Then after logging in into steam-buddy got to the url: `[steam-buddy-url]/streaming/net/start` to start streaming, and `[steam-buddy-url]/streaming/net/stop` to stop. To consume the stream you can do: ``` $ ffplay -fflags nobuffer -i "srt://[steam-buddy-url]:8080?streamid=live.gameros/live/stream" ``` * Allow for local recording To start: `[steam-buddy-ip]/record/start` To stop: `[steam-buddy-ip]/record/stop` * FFmpeg command change to array for readability Still need the join/split dance so we can work with ACODEC_OPTIONS and VCODEC_OPTIONS Co-authored-by: alkazar <[email protected]>
I think OBS is the optimal solution. |
OTOH: https://youtu.be/GRTs5On4Mqw -this is a recording from the desktop with OBS installed and connected to gameros. It's plausible that OBS would be unnecessary... |
Requirements:
I tested a command-line recording software called
byzanz
that I thought could be used to implement this feature, but it was unstable and couldn't record more than a few seconds at a time before crashing.Any other command-line screen recording software available for Linux?
The text was updated successfully, but these errors were encountered: