[BUG] Not providing `-o` always leads to an error
Closed this issue · 1 comments
Describe the bug
Not providing -o
option when trying to record leads to an error.
Info: using h264 encoder because a codec was not specified
[h264_nvenc @ 0x5d252d7d4b40] ignoring invalid SAR: 0/0
gsr info: gsr_kms_client_init: waiting for server to connect
kms server info: connecting to the client
gsr info: gsr_kms_client_init: server connected
gsr info: replacing file-backed unix domain socket with socketpair
kms server info: connected to the client
gsr info: using socketpair
[h264_nvenc @ 0x5d252d7d4b40] ignoring invalid SAR: 0/0
[mp4 @ 0x5d252d7d4680] muxer does not support non seekable output
Error occurred when writing header to output file: Invalid argument
To Reproduce
- Run
gpu-screen-recorder -w DP-3 -f 60 -c mp4
(DP-3 is just my screen)
Desktop (please complete the following information):
- X11 or Wayland: Wayland
- Desktop environment/Window Manager: Hyprland (Wayland)
- Distro: Arch Linux x86_64
- GPU: NVIDIA GeForce RTX 3060 Lite Hash Rate [Discrete]
- Version (latest flatpak version, aur or source): Latest AUR version,
r703.ddf3fa5-1
I'd assume this is intentional if not for the fact that a user is asked to provide EITHER -c
OR -o
.
This is not a bug, it's just mp4 file format that doesn't support this option as the ffmpeg error you can see says: [mp4 @ 0x5d252d7d4680] muxer does not support non seekable output
(stdout is not seekable). It works with other container formats. There is an example of doing this: https://git.dec05eba.com/gpu-screen-recorder/tree/scripts/twitch-stream-local-copy.sh . Here it's used in a real application: https://github.com/nestriness/nestri/blob/3df53e7e38470f5ebe4b5cec64221efcdac49802/.scripts/entrypoint.sh#L277
normally you dont use gpu screen recorder like this unless you have a reason to do it