matanui159 / ReplaySorcery

An open-source, instant-replay solution for Linux
GNU General Public License v3.0
851 stars 26 forks source link

Fails to create control socket #134

Closed MithicSpirit closed 2 years ago

MithicSpirit commented 2 years ago

Describe the bug The control socket (/tmp/replay-sorcery/control.sock) is not created. This causes replay-sorcery save fail with stating that Failed to connect socket: No such file or directory.

Desktop:

Configuration: /usr/etc/replay-sorcery.conf:

# The minimum log-level to show
# Possible values: trace, debug, verbose, info, warning, error, fatal, panic, quiet
# Default value: info
logLevel = info

# The minimum log-level to add stacktraces to
# Possible values: trace, debug, verbose, info, warning, error, fatal, panic, quiet
# Default value: error
traceLevel = error

# The duration of the recording in seconds
# Default value: 30
recordSeconds = 30

# The video input backend to use for video recording
# Possible values: auto, hwaccel, x11, kms, kms_service
# Default value: auto
videoInput = auto

# The name of the input video device
# For kms and kms_service, see `replay-sorcery kms-devices`
# Possible values: auto, or a device string
# Default value: auto
videoDevice = auto

# The X, Y, width and height of recording rectangle
# Default value: 0, 0
videoX = 0
videoY = 0
# Possible values: a positive integer or auto
# Default value: auto, auto
videoWidth = auto
videoHeight = auto

# The framerate of the recording
# Default value: 30
videoFramerate = 30

# The video encoder backend to use for video recording
# Possible values: auto, hevc, x264, openh264, x265, vaapi_h264, vaapi_hevc
# Default value: auto
videoEncoder = auto

# The H.264 profile to use for video encoding
# Possible values: baseline, main, high
# Default value: baseline
videoProfile = baseline

# A high-level preset for video encoding performance
# Possible values: fast, medium, slow
# Default value: fast
videoPreset = fast

# The quality to use for video encoding, lower is better
# Possible values: 1-51 or auto
# Default value: 28
videoQuality = 28

# The bitrate to use for video encoding
# Possible values: a positive integer ending in an SI prefix (eg. 1M) or auto
# Default value: auto
videoBitrate = auto

# The number of frames between IDR frames
# Default value: 30
videoGOP = 30

# The width and height to scale the video to
# Possible values: a positive integer or auto
# Default value: auto, auto
scaleWidth = auto
scaleHeight = auto

# The audio input backend to use for audio recording
# Possible values: none, auto, pulse
# Default value: auto
audioInput = auto

# The name of the input audio device
# For pulse, see `pactl list sources`
# Possible values: auto, system, or a device string
# Default value: auto
audioDevice = auto

# The samplerate to use for audio recording
# Default value: 44100
audioSamplerate = 44100

# The audio encoder backend to use for audio recording
# Possible values: auto, aac, fdk
# Default value: auto
audioEncoder = auto

# The AAC profile to use for audio encoding
# Possible values: low (LC), main, high (HE)
# Default value: low
audioProfile = low

# The bitrate to use for audio encoding
# Possible values: a positive integer ending in an SI prefix (eg. 1K) or auto
# Default value: auto
audioBitrate = auto

# The controller backend to use for detecting key presses
# Possible values: auto, debug, x11
# Default value: auto
controller = auto

# The key name and key modifiers (as a set of flags) to press to save a video
# Default value: r
keyName = r
# Possible values: ctrl, shift, alt, super
# Default value: ctrl+super
keyMods = ctrl+super

# Where to save the output file
# Possible values: a strftime formatted file path
# Default value: ~/Videos/ReplaySorcery_%F_%H-%M-%S.mp4
outputFile = ~/Videos/ReplaySorcery/%F_%H-%M-%S.mp4

# A command to run when a video is successfully saved
# Possible values: a printf formatted command
# Default value: notify-send ReplaySorcery "Saved replay as %s"
outputCommand = notify-send ReplaySorcery "Saved replay as %s"

~/.config/replay-sorcery.conf:

# The minimum log-level to show
# Possible values: trace, debug, verbose, info, warning, error, fatal, panic, quiet
# Default value: info
logLevel = info

# The minimum log-level to add stacktraces to
# Possible values: trace, debug, verbose, info, warning, error, fatal, panic, quiet
# Default value: error
traceLevel = error

# The duration of the recording in seconds
# Default value: 30
recordSeconds = 60

# The video input backend to use for video recording
# Possible values: auto, hwaccel, x11, kms, kms_service
# Default value: auto
videoInput = kms_service

# The name of the input video device
# For kms and kms_service, see `replay-sorcery kms-devices`
# Possible values: auto, or a device string
# Default value: auto
videoDevice = auto

# The X, Y, width and height of recording rectangle
# Default value: 0, 0
videoX = 0
videoY = 0
# Possible values: a positive integer or auto
# Default value: auto, auto
videoWidth = auto
videoHeight = auto

# The framerate of the recording
# Default value: 30
videoFramerate = 30

# The video encoder backend to use for video recording
# Possible values: auto, hevc, x264, openh264, x265, vaapi_h264, vaapi_hevc
# Default value: auto
videoEncoder = auto

# The H.264 profile to use for video encoding
# Possible values: baseline, main, high
# Default value: baseline
videoProfile = baseline

# A high-level preset for video encoding performance
# Possible values: fast, medium, slow
# Default value: fast
videoPreset = fast

# The quality to use for video encoding, lower is better
# Possible values: 1-51 or auto
# Default value: 28
videoQuality = 28

# The bitrate to use for video encoding
# Possible values: a positive integer ending in an SI prefix (eg. 1M) or auto
# Default value: auto
videoBitrate = auto

# The number of frames between IDR frames
# Default value: 30
videoGOP = 30

# The width and height to scale the video to
# Possible values: a positive integer or auto
# Default value: auto, auto
scaleWidth = auto
scaleHeight = auto

# The audio input backend to use for audio recording
# Possible values: none, auto, pulse
# Default value: auto
audioInput = auto

# The name of the input audio device
# For pulse, see `pactl list sources`
# Possible values: auto, system, or a device string
# Default value: auto
audioDevice = auto

# The samplerate to use for audio recording
# Default value: 44100
audioSamplerate = 44100

# The audio encoder backend to use for audio recording
# Possible values: auto, aac, fdk
# Default value: auto
audioEncoder = auto

# The AAC profile to use for audio encoding
# Possible values: low (LC), main, high (HE)
# Default value: low
audioProfile = low

# The bitrate to use for audio encoding
# Possible values: a positive integer ending in an SI prefix (eg. 1K) or auto
# Default value: auto
audioBitrate = 30K

# The controller backend to use for detecting key presses
# Possible values: auto, debug, x11
# Default value: auto
controller = auto

# The key name and key modifiers (as a set of flags) to press to save a video
# Default value: r
keyName = DONT_ACTIVATE
# Possible values: ctrl, shift, alt, super
# Default value: ctrl+super
keyMods = ctrl+super
# I don't want this to activate (using qtile commands to run 
# `replay-sorcery save` instead)

# Where to save the output file
# Possible values: a strftime formatted file path
# Default value: ~/Videos/ReplaySorcery_%F_%H-%M-%S.mp4
outputFile = ~/media/videos/replay-sorcery/%F_%H-%M-%S.mp4

# A command to run when a video is successfully saved
# Possible values: a printf formatted command
# Default value: notify-send ReplaySorcery "Saved replay as %s"
outputCommand = notify-send ReplaySorcery "Saved replay as %s"

Logs:

-- Journal begins at Tue 2021-08-24 13:48:14 EDT, ends at Sat 2021-10-30 18:10:39 EDT. --
Oct 30 18:10:39 archimedes systemd[1379]: Started ReplaySorcery: an open-source, instant-replay solution for Linux..
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Real user ID: 1000
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Effective user ID: 1000
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Reading config file '/usr/etc/replay-sorcery.conf'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'logLevel' to 'info'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'traceLevel' to 'error'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'recordSeconds' to '30'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoInput' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoDevice' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoX' to '0'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoY' to '0'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoWidth' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoHeight' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoFramerate' to '30'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoEncoder' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoProfile' to 'baseline'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoPreset' to 'fast'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoQuality' to '28'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoBitrate' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoGOP' to '30'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'scaleWidth' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'scaleHeight' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'audioInput' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'audioDevice' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'audioSamplerate' to '44100'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'audioEncoder' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'audioProfile' to 'low'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'audioBitrate' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'controller' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'keyName' to 'r'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'keyMods' to 'ctrl+super'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'outputFile' to '~/Videos/ReplaySorcery/%F_%H-%M-%S.mp4'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'outputCommand' to 'notify-send ReplaySorcery "Saved replay as %s"'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Reading config file '/home/mithic/.config/replay-sorcery.conf'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'logLevel' to 'info'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'traceLevel' to 'error'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'recordSeconds' to '60'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoInput' to 'kms_service'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoDevice' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoX' to '0'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoY' to '0'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoWidth' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoHeight' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoFramerate' to '30'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoEncoder' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoProfile' to 'baseline'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoPreset' to 'fast'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoQuality' to '28'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoBitrate' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'videoGOP' to '30'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'scaleWidth' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'scaleHeight' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'audioInput' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'audioDevice' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'audioSamplerate' to '44100'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'audioEncoder' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'audioProfile' to 'low'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'audioBitrate' to '30K'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'controller' to 'auto'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'keyName' to 'DONT_ACTIVATE'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'keyMods' to 'ctrl+super'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'outputFile' to '~/media/videos/replay-sorcery/%F_%H-%M-%S.mp4'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Setting 'outputCommand' to 'notify-send ReplaySorcery "Saved replay as %s"'...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: ReplaySorcery  Copyright (C) 2020-2021  ReplaySorcery developers
Oct 30 18:10:39 archimedes replay-sorcery[10084]: This program comes with ABSOLUTELY NO WARRANTY.
Oct 30 18:10:39 archimedes replay-sorcery[10084]: This is free software, and you are welcome to redistribute it
Oct 30 18:10:39 archimedes replay-sorcery[10084]: under certain conditions; see COPYING for details.
Oct 30 18:10:39 archimedes replay-sorcery[10084]: FFmpeg version: n4.4
Oct 30 18:10:39 archimedes replay-sorcery[10084]: [h264_vaapi @ 0x55b0f568c240] Filter graph: hwmap=derive_device=vaapi,crop=1920:1080:0:0,scale_vaapi=1920:1080:nv12
Oct 30 18:10:39 archimedes replay-sorcery[10084]: [h264_vaapi @ 0x55b0f568c240] H.264 baseline profile is not supported, using constrained baseline profile instead.
Oct 30 18:10:39 archimedes replay-sorcery[10084]: [h264_vaapi @ 0x55b0f568c240] Driver does not support some wanted packed headers (wanted 0xd, found 0x1).
Oct 30 18:10:39 archimedes replay-sorcery[10084]: [h264_vaapi @ 0x55b0f568c240] Quality attribute is not supported: will use default quality level.
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Created VA-API encoder
Oct 30 18:10:39 archimedes replay-sorcery[10084]: PulseAudio server: PulseAudio (on PipeWire 0.3.39) 15.0.0
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Connecting to Pulse Audio device: alsa_output.usb-Logitech_G432_Gaming_Headset_000000000000-00.analog-stereo.monitor...
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Created PulseAudio device
Oct 30 18:10:39 archimedes replay-sorcery[10084]: X11 version: 11.0
Oct 30 18:10:39 archimedes replay-sorcery[10084]: X11 vendor: The X.Org Foundation v12013000
Oct 30 18:10:39 archimedes replay-sorcery[10084]: Created X11 controller
matanui159 commented 2 years ago

You need to set controller = command in the config:

image
MithicSpirit commented 2 years ago

Ah ok, that fixed it. I think that the sample config needs to be updated then since it doesn't seem like controller should manage this and, even if it did, command isn't even listed as a possible value for it:

# The controller backend to use for detecting key presses
# Possible values: auto, debug, x11
# Default value: auto
controller = command
matanui159 commented 2 years ago

I do need to add command to that, seem to have forgotten. It's kind of hard to describe controller though, technically its still correct it is just that in Wayland the only way to detect keypresses is by binding a key combo to a command.