Allow recording app audio with -a, deprecate -aa and -aai

Use -a "app:brave" instead of -aa "brave".
Use -a "app-inverse:brave" instead of -aai "brave".

This now allows merging audio devices and app audio into the same audio
track.
This commit is contained in:
dec05eba
2024-11-20 19:09:40 +01:00
parent 6e0f5413d9
commit cbf4cba5a9
5 changed files with 301 additions and 161 deletions

View File

@@ -129,15 +129,6 @@ The replay buffer is stored in ram (as encoded video), so don't use a too large
To save a video in replay mode, you need to send signal SIGUSR1 to gpu screen recorder. You can do this by running `killall -SIGUSR1 gpu-screen-recorder`.\
To stop recording send SIGINT to gpu screen recorder. You can do this by running `killall -SIGINT gpu-screen-recorder` or pressing `Ctrl-C` in the terminal that runs gpu screen recorder. When recording a regular non-replay video this will also save the video.\
To pause/unpause recording send SIGUSR2 to gpu screen recorder. You can do this by running `killall -SIGUSR2 gpu-screen-recorder`. This is only applicable and useful when recording (not streaming nor replay).\
## Audio device name
To record the default output device (desktop audio) you can use the `default_output` option, for example `-a default_output`.\
To record the default input device (microphone) you can use the `default_input` option, for example `-a default_input`.\
To list all available audio devices run `gpu-screen-recorder --list-audio-devices`. The name to use with GPU Screen Recorder will be on the left side and the human readable name is on the right side.\
To record multiple audio devices to multiple audio tracks specify the `-a` option multiple times, for example `-a default_output -a default_input`.\
To record multiple audio devices into one audio track (merged) specify the `-a` option once split with `|` for each audio device, for example `-a "default_output|default_input"`.\
In wireplumber the name of the audio will be in the format `gsr-<audio_device>`, but you can change that name by prefixing the audio device with a name and then a forward slash, for example: `-a "name/default_output"`.\
You can also record audio from specific applications instead of from audio devices by using the `-aa` option to only record the specified applications or `-aai` to record all applications except the ones provided.\
To list all available application to record from run `gpu-screen-recorder --list-application-audio`.
## Simple way to run replay without gui
Run the script `scripts/start-replay.sh` to start replay and then `scripts/save-replay.sh` to save a replay and `scripts/stop-replay.sh` to stop the replay. The videos are saved to `$HOME/Videos`.
You can use these scripts to start replay at system startup if you add `scripts/start-replay.sh` to startup (this can be done differently depending on your desktop environment / window manager) and then go into