Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ git clone https://github.com/ammen99/wf-recorder.git && cd wf-recorder
meson build --prefix=/usr --buildtype=release
ninja -C build
```
Optionally configure with `-Ddefault_codec='codec'`. The default is libvpx. Now you can just run `./build/wf-recorder` or install it with `sudo ninja -C build install`.
Optionally configure with `-Ddefault_codec='codec'`. The default is libx264. Now you can just run `./build/wf-recorder` or install it with `sudo ninja -C build install`.

The man page can be read with `man ./manpage/wf-recorder.1`.

# Usage
In its simplest form, run `wf-recorder` to start recording and use Ctrl+C to stop. This will create a file called `recording.webm` in the current working directory using the default codec.
In its simplest form, run `wf-recorder` to start recording and use Ctrl+C to stop. This will create a file called `recording.mp4` in the current working directory using the default codec.

Use `-f <filename>` to specify the output file. In case of multiple outputs, you'll first be prompted to select the output you want to record. If you know the output name beforehand, you can use the `-o <output name>` option.

Expand All @@ -81,7 +81,7 @@ wf-recorder -g "$(slurp)"
You can record screen and sound simultaneously with

```
wf-recorder --audio --file=recording_with_audio.webm
wf-recorder --audio --file=recording_with_audio.mp4
```

To specify an audio device, use the `-a<device>` or `--audio=<device>` options.
Expand All @@ -108,8 +108,8 @@ To set a specific output format, use the `--muxer` option. For example, to outpu
wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video2
```

To use GPU encoding, use a VAAPI codec (for ex. `vp8_vaapi`) and specify a GPU device to use with the `-d` option:
To use GPU encoding, use a VAAPI codec (for ex. `h264_vaapi`) and specify a GPU device to use with the `-d` option:
```
wf-recorder -f test-vaapi.webm -c vp8_vaapi -d /dev/dri/renderD128
wf-recorder -f test-vaapi.mkv -c h264_vaapi -d /dev/dri/renderD128
```
Some drivers report support for rgb0 data for vaapi input but really only support yuv planar formats. In this case, use the `-x yuv420p` or `--pixel-format yuv420p` option in addition to the vaapi options to convert the data to yuv planar data before sending it to the GPU.
8 changes: 4 additions & 4 deletions manpage/wf-recorder.1
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ to start recording and use
.Ql Ctrl+C
to stop.
This will create a file called
.Ql recording.webm
.Ql recording.mp4
in the current working directory using the default
.Ar codec.
.Pp
Expand Down Expand Up @@ -165,7 +165,7 @@ screen area that will be recorded:
.Dl $ wf-recorder -g "$(slurp)"
.Pp
You can record screen and sound simultaneously with
.Dl $ wf-recorder --audio --file=recording_with_audio.webm
.Dl $ wf-recorder --audio --file=recording_with_audio.mp4
.Pp
To specify an audio device, use the
.Fl -a<DEVICE>
Expand All @@ -190,12 +190,12 @@ loopback you might use:
.Dl $ wf-recorder --muxer=v4l2 --codec=rawvideo --file=/dev/video2
.Pp
To use GPU encoding, use a VAAPI codec (for ex.
.Ql vp8_vaapi
.Ql h264_vaapi
) and specify a GPU
device to use with the
.Fl d
option:
.Dl $ wf-recorder -f test-vaapi.webm -c vp8_vaapi -d /dev/dri/renderD128
.Dl $ wf-recorder -f test-vaapi.mkv -c h264_vaapi -d /dev/dri/renderD128
.Pp
Some drivers report support for
.Ql rgb0
Expand Down
6 changes: 3 additions & 3 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
option('default_codec', type: 'string', value: 'libvpx', description: 'Codec that will be used by default')
option('default_audio_codec', type: 'string', value: 'libvorbis', description: 'Audio codec that will be used by default')
option('default_codec', type: 'string', value: 'libx264', description: 'Codec that will be used by default')
option('default_audio_codec', type: 'string', value: 'aac', description: 'Audio codec that will be used by default')
option('default_audio_sample_rate', type: 'integer', value: 48000, description: 'Audio sample rate that will be used by default')
option('default_container_format', type: 'string', value: 'webm', description: 'Container file format that will be used by default')
option('default_container_format', type: 'string', value: 'mkv', description: 'Container file format that will be used by default')
option('fallback_audio_sample_fmt', type: 'string', value: 's16', description: 'Fallback audio sample format that will be used if wf-recorder cannot determine the sample formats supported by a codec')
option('pulse', type: 'feature', value: 'auto', description: 'Enable Pulseaudio')
4 changes: 2 additions & 2 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,7 +804,7 @@ Examples:)");
printf(R"(

- wf-recorder Records the video. Use Ctrl+C to stop recording.
The video file will be stored as recording.webm in the
The video file will be stored as recording.mp4 in the
current working directory.

- wf-recorder -f <filename>.ext Records the video. Use Ctrl+C to stop recording.
Expand All @@ -816,7 +816,7 @@ Examples:)");
Video and Audio:

- wf-recorder -a Records the video and audio. Use Ctrl+C to stop recording.
The video file will be stored as recording.webm in the
The video file will be stored as recording.mp4 in the
current working directory.

- wf-recorder -a -f <filename>.ext Records the video and audio. Use Ctrl+C to stop recording.
Expand Down