dec05eba / gpu-screen-recorder-issues

GPU Screen Recorder issue tracker
20 stars 0 forks source link

[BUG] Not providing `-o` always leads to an error #40

Closed alexlnkp closed 3 months ago

alexlnkp commented 3 months ago

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

  1. Run gpu-screen-recorder -w DP-3 -f 60 -c mp4 (DP-3 is just my screen)

Desktop (please complete the following information):

I'd assume this is intentional if not for the fact that a user is asked to provide EITHER -c OR -o.

dec05eba commented 3 months ago

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