matanui159 / ReplaySorcery

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

Audio not recording, "Generic error in an external library" #171

Open overseerboots opened 1 year ago

overseerboots commented 1 year ago

Audio not being recorded Failed to create PulseAudio device: Generic error in an external library Failed to create audio thread: Function not implemented

Audio is recorded when replaysorcery is restarted

Desktop:

Configuration:

# 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 = x11

# 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 = 1920
videoHeight = 1080

# 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"

Logs:

May 24 00:20:31 endeavourbtw systemd[602]: Started ReplaySorcery: an open-source, instant-replay solution for Linux..
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Reading config file '/usr/local/etc/replay-sorcery.conf'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'logLevel' to 'info'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'traceLevel' to 'error'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'recordSeconds' to '30'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoInput' to 'x11'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoDevice' to 'auto'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoX' to '0'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoY' to '0'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoWidth' to '1920'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoHeight' to '1080'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoFramerate' to '30'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoEncoder' to 'auto'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoProfile' to 'baseline'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoPreset' to 'fast'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoQuality' to '28'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoBitrate' to 'auto'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'videoGOP' to '30'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'scaleWidth' to 'auto'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'scaleHeight' to 'auto'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'audioInput' to 'auto'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'audioDevice' to 'auto'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'audioSamplerate' to '44100'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'audioEncoder' to 'auto'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'audioProfile' to 'low'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'audioBitrate' to 'auto'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'controller' to 'auto'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'keyName' to 'r'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'keyMods' to 'ctrl+super'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'outputFile' to '~/Videos/ReplaySorcery/%F_%H-%M-%S.mp4'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Setting 'outputCommand' to 'notify-send ReplaySorcery "Saved replay as %s"'...
May 24 00:20:31 endeavourbtw replay-sorcery[939]: Failed to open config file '/home/boots/.config/replay-sorcery.conf': No such file or directory
May 24 00:20:31 endeavourbtw replay-sorcery[939]: ReplaySorcery  Copyright (C) 2020-2021  ReplaySorcery developers
May 24 00:20:31 endeavourbtw replay-sorcery[939]: This program comes with ABSOLUTELY NO WARRANTY.
May 24 00:20:31 endeavourbtw replay-sorcery[939]: This is free software, and you are welcome to redistribute it
May 24 00:20:31 endeavourbtw replay-sorcery[939]: under certain conditions; see COPYING for details.
May 24 00:20:31 endeavourbtw replay-sorcery[939]: FFmpeg version: n6.0
May 24 00:20:31 endeavourbtw replay-sorcery[939]: [libx264 @ 0x560a5a34e2c0] Filter graph: scale=1920x1080,format=yuv420p
May 24 00:20:32 endeavourbtw replay-sorcery[939]: [libx264 @ 0x560a5a34e2c0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
May 24 00:20:32 endeavourbtw replay-sorcery[939]: [libx264 @ 0x560a5a34e2c0] profile Constrained Baseline, level 4.0, 4:2:0, 8-bit
May 24 00:20:32 endeavourbtw replay-sorcery[939]: [libx264 @ 0x560a5a34e2c0] 264 - core 164 r3095 baee400 - H.264/MPEG-4 AVC codec - Copyleft 2003-2022 - http://www.videolan.org/x264.html - options: cabac=0 ref=1 deblock=0:0:0 analyse=0:0 me=dia subme=0 psy=1 psy_rd=1.00:0.00 mixed_ref=0 me_range=16 chroma_me=1 trellis=0 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=0 threads=1 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=0 weightp=0 keyint=30 keyint_min=3 scenecut=0 intra_refresh=0 rc=cqp mbtree=0 qp=28 ip_ratio=1.40 aq=0
May 24 00:20:32 endeavourbtw replay-sorcery[939]: Created x264 encoder
May 24 00:20:32 endeavourbtw replay-sorcery[939]: PulseAudio server: PulseAudio (on PipeWire 0.3.71) 15.0.0
May 24 00:20:32 endeavourbtw replay-sorcery[939]: Connecting to Pulse Audio device: @DEFAULT_SINK@.monitor...
May 24 00:20:33 endeavourbtw replay-sorcery[939]: Failed to setup PulseAudio stream
May 24 00:20:33 endeavourbtw replay-sorcery[939]:  - /home/boots/ReplaySorcery/src/audio/pulsedev.c:160 (pulseDeviceStreamCreate)
May 24 00:20:33 endeavourbtw replay-sorcery[939]:  - /home/boots/ReplaySorcery/src/audio/pulsedev.c:206 (pulseDeviceStreamAuto)
May 24 00:20:33 endeavourbtw replay-sorcery[939]:  - /home/boots/ReplaySorcery/src/audio/pulsedev.c:194 (pulseDeviceStreamAuto)
May 24 00:20:33 endeavourbtw replay-sorcery[939]:  - /home/boots/ReplaySorcery/src/audio/pulsedev.c:356 (rsPulseDeviceCreate)
May 24 00:20:33 endeavourbtw replay-sorcery[939]:  - /home/boots/ReplaySorcery/src/audio/adevice.c:34 (rsAudioDeviceCreate)
May 24 00:20:33 endeavourbtw replay-sorcery[939]:  - /home/boots/ReplaySorcery/src/audio/audio.c:63 (rsAudioThreadCreate)
May 24 00:20:33 endeavourbtw replay-sorcery[939]:  - /home/boots/ReplaySorcery/src/main.c:196 (main)
May 24 00:20:33 endeavourbtw replay-sorcery[939]: Failed to create PulseAudio device: Generic error in an external library
May 24 00:20:33 endeavourbtw replay-sorcery[939]: Failed to create audio thread: Function not implemented
May 24 00:20:33 endeavourbtw replay-sorcery[939]: Failed to grab key: 10
May 24 00:20:33 endeavourbtw replay-sorcery[939]:  - /home/boots/ReplaySorcery/src/control/x11ctrl.c:45 (x11ControlGrabKey)
May 24 00:20:33 endeavourbtw replay-sorcery[939]:  - /home/boots/ReplaySorcery/src/control/x11ctrl.c:34 (x11ControlGrabKey)
May 24 00:20:33 endeavourbtw replay-sorcery[939]:  - /home/boots/ReplaySorcery/src/control/x11ctrl.c:120 (rsX11ControlCreate)
May 24 00:20:33 endeavourbtw replay-sorcery[939]:  - /home/boots/ReplaySorcery/src/control/control.c:40 (rsDefaultControlCreate)
May 24 00:20:33 endeavourbtw replay-sorcery[939]:  - /home/boots/ReplaySorcery/src/main.c:200 (main)
May 24 00:20:33 endeavourbtw replay-sorcery[939]: Failed to create X11 controller: Generic error in an external library
May 24 00:20:33 endeavourbtw replay-sorcery[939]: Created command controller
May 24 00:20:55 endeavourbtw replay-sorcery[939]: [x11grab @ 0x560a5a344080] DTS 1684884055482891 < 1684884055980771 out of order