vkohaupt / vokoscreenNG

vokoscreenNG is a powerful screencast creator in many languages to record the screen, an area or a window (Linux only). Recording of audio from multiple sources is supported. With the built-in camera support, you can make your video more personal. Other tools such as systray, magnifying glass, countdown, timer, Showclick and Halo support will help
https://linuxecke.volkoh.de/vokoscreen/vokoscreen.html
GNU General Public License v2.0
1.05k stars 91 forks source link

Sound recorded from condensor mic only comes from the left channel #228

Open djnotes opened 1 year ago

djnotes commented 1 year ago

Bug report checklist

First of all, thanks to the author of this software. It is simply the best I have found for Linux, because it shows the status of recording and has many options.

Describe the bug Not sure this is a bug. The sound of the video recorded with VokoscreenNG comes only from the left channel. I know this is because my mic records only one channel, but Vokoscreen cannot be configured to record mono so that the output video sounds from both left and right channel. I can run an FFMPEG channel mapping on the output video to handle this but I hate it. Could you please make VokoscreenNG handle this automatically?

To Reproduce Steps to reproduce the behavior:

  1. Go to 'Vokoscreen'
  2. Click on 'Mic icon'
  3. Enable check against 'your audio interface (in my case PCM2902 Audio Codec Analog Stereo)
  4. Start recording your desktop and say some audio message to your condensor mic.

Expected behavior Sound to come from both channels

Additional context Add any other context about the problem here.

Screenshots If applicable, add screenshots to help explain your problem.

Log messages If applicable, paste or attach log messages from the vokoscreenNG log tab.

21:37:47 [vokoscreenNG] Version: 3.3.0
21:37:47 [vokoscreenNG] Locale: en_US
21:37:47 [vokoscreenNG] Log from: 2022-07-23 21:37:47
21:37:47 [vokoscreenNG] Country: United States
21:37:47 [vokoscreenNG] Qt: 5.15.3
21:37:47 [vokoscreenNG] GStreamer 1.20.0
21:37:47 [vokoscreenNG] PulseAudio library version: 15.0.0
21:37:47 [vokoscreenNG] Virtual Maschine: none
21:37:47 [vokoscreenNG] Operating system: Fedora Linux 36 (Workstation Edition)
21:37:47 [vokoscreenNG] KernelVersion: 5.18.11-200.fc36.x86_64
21:37:47 [vokoscreenNG] CPU Architecture: x86_64
21:37:47 [vokoscreenNG] Count CPU: 4
21:37:47 [vokoscreenNG] vokoscreenNG running as: xcb client
21:37:47 [vokoscreenNG] vokoscreenNG running on: x11
21:37:47 [vokoscreenNG] Desktop: KDE
21:37:47 [vokoscreenNG] Icon-Theme: breeze
21:37:47 [vokoscreenNG] Styles: QFusionStyle
21:37:47 [vokoscreenNG] InstallPath:         /usr/bin
21:37:47 [vokoscreenNG] Qt-PluginsPath:      /usr/lib64/qt5/plugins
21:37:47 [vokoscreenNG] Qt-TranslationsPath: /usr/share/qt5/translations
21:37:47 [vokoscreenNG] Qt-LibraryPath:      /usr/lib64
21:37:47 [vokoscreenNG] Settings: /home/myname/.config/vokoscreenNG/vokoscreenNG.ini
21:37:47 [vokoscreenNG] Log: /home/myname/.config/vokoscreenNG/log/2022-07-23_21-37-46.log
21:37:47 [vokoscreenNG] Default Videopath: /home/myname/Videos
21:37:47 [vokoscreenNG] User Videopath: /home/myname/Videos
21:37:47 [vokoscreenNG] CompositingManager running: true

21:37:47 [vokoscreenNG] [Audio] Found: Monitor of PCM2902 Audio Codec Analog Stereo Device: alsa_output.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-output.monitor
21:37:47 [vokoscreenNG] [Audio] Found: PCM2902 Audio Codec Analog Stereo Device: alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-input
21:37:47 [vokoscreenNG] [Audio] Found: Monitor of Built-in Audio Analog Stereo Device: alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
21:37:47 [vokoscreenNG] [Audio] Found: Built-in Audio Analog Stereo Device: alsa_input.pci-0000_00_1f.3.analog-stereo

21:37:47 [vokoscreenNG] Record symbols: + available, - not available
21:37:47 [vokoscreenNG] + matroskamux
21:37:47 [vokoscreenNG] + webmmux
21:37:47 [vokoscreenNG] + avimux
21:37:47 [vokoscreenNG] + mp4mux
21:37:47 [vokoscreenNG] + qtmux
21:37:47 [vokoscreenNG] + openh264enc
21:37:47 [vokoscreenNG] + x264enc
21:37:47 [vokoscreenNG] + vp8enc
21:37:47 [vokoscreenNG] + vorbisenc
21:37:47 [vokoscreenNG] + flacenc
21:37:47 [vokoscreenNG] + opusenc
21:37:47 [vokoscreenNG] + lamemp3enc

21:37:47 [vokoscreenNG] + ximagesrc
21:37:47 [vokoscreenNG] + pulsesrc
21:37:47 [vokoscreenNG] + queue
21:37:47 [vokoscreenNG] + capsfilter
21:37:47 [vokoscreenNG] + videoconvert
21:37:47 [vokoscreenNG] + videorate
21:37:47 [vokoscreenNG] + audioconvert
21:37:47 [vokoscreenNG] + audiorate
21:37:47 [vokoscreenNG] + filesink
21:37:47 [vokoscreenNG] + videoscale
21:37:47 [vokoscreenNG] + h264parse
21:37:47 [vokoscreenNG] + audiomixer

21:37:47 [vokoscreenNG] This screen is the primary screen:  eDP-1
21:37:47 [vokoscreenNG] Name from screen:  eDP-1
21:37:47 [vokoscreenNG] Screen available desktop width : 1920
21:37:47 [vokoscreenNG] Screen available desktop height: 1080
21:37:47 [vokoscreenNG] DevicePixelRatio: 1  (Normal displays is 1, Retina display is 2)
21:37:47 [vokoscreenNG] Vertical refresh rate of the screen in Hz: 60.0314
21:37:47 [vokoscreenNG] Screen orientation Qt::LandscapeOrientation
21:37:47 [vokoscreenNG] Color depth of the screen:  24
21:37:47 [vokoscreenNG] Model from screen:  
21:37:47 [vokoscreenNG] Manufactur from screen:  AU Optronics
21:37:47 [vokoscreenNG] SerialNumber from screen:  
21:37:47 [vokoscreenNG] ItemText in Combobox: eDP-1 :  1920 x 1080
21:37:47 [vokoscreenNG] ItemData in Combobox: x=0 y=0 with=1920 height=1080

21:37:47 [vokoscreenNG] [Camera] Found: HD WebCam: HD WebCam /dev/video0
21:37:47 [vokoscreenNG] QvkCameraResolution QCamera::LoadingStatus
21:37:47 [vokoscreenNG] QvkCameraResolution QCamera::LoadedState
21:37:47 [vokoscreenNG] + openh264enc
21:37:47 [vokoscreenNG] + x264enc
21:37:47 [vokoscreenNG] + lamemp3enc
21:37:47 [vokoscreenNG] + opusenc

21:37:47 [vokoscreenNG] Set global shortcut for Start: CTRL+SHIFT+F10
21:37:47 [vokoscreenNG] Set global shortcut for Pause: CTRL+SHIFT+F12
21:37:47 [vokoscreenNG] Set global shortcut for Magnification: CTRL+SHIFT+F9
21:37:47 [vokoscreenNG] Set global shortcut for Camera: CTRL+SHIFT+F8
21:37:47 [vokoscreenNG] Set global shortcut for Showclick: CTRL+SHIFT+F7
21:37:47 [vokoscreenNG] Set global shortcut for Halo: CTRL+SHIFT+F6

21:37:47 [vokoscreenNG] Permission: Can write in /home/myname/Videos

21:37:47 [vokoscreenNG] QvkCameraResolution QCamera::LoadedStatus
21:37:47 [vokoscreenNG] Camera resolutions for: HD WebCam: HD WebCam /dev/video0
21:37:47 (QSize(320, 180), QSize(320, 240), QSize(424, 240), QSize(640, 360), QSize(640, 480), QSize(848, 480), QSize(960, 540), QSize(1280, 720))
21:37:47 [vokoscreenNG] QvkCameraResolution QCamera::UnloadingStatus
21:37:47 [vokoscreenNG] QvkCameraResolution QCamera::UnloadedStatus
21:37:47 [vokoscreenNG] QvkCameraResolution QCamera::UnloadedState

21:51:47 [vokoscreenNG] Permission: Can write in /home/myname/Videos

21:51:51 [vokoscreenNG] radioButtonScreencastFullscreen = true
21:51:51 [vokoscreenNG] radioButtonScreencastWindow = false
21:51:51 [vokoscreenNG] radioButtonScreencastArea = false
21:51:51 [vokoscreenNG] radioButton_cisco_on = true
21:51:51 [vokoscreenNG] radioButton_cisco_off = false
21:51:51 [vokoscreenNG] checkBoxCameraInvert = false
21:51:51 [vokoscreenNG] checkBoxCameraGray = false
21:51:51 [vokoscreenNG] checkBoxCameraMono = false
21:51:51 [vokoscreenNG] checkBoxCameraMirrorVertical = false
21:51:51 [vokoscreenNG] checkBoxCameraMirrorHorizontal = false
21:51:51 [vokoscreenNG] checkBoxCameraWindowFrame = false
21:51:51 [vokoscreenNG] checkBoxCameraOnOff = false
21:51:51 [vokoscreenNG] checkBox_shortcut_pause_strg = true
21:51:51 [vokoscreenNG] checkBox_shortcut_start_strg = true
21:51:51 [vokoscreenNG] checkBox_shortcut_pause_alt = false
21:51:51 [vokoscreenNG] checkBox_shortcut_magnification_shift = true
21:51:51 [vokoscreenNG] checkBox_shortcut_showclick_meta = false
21:51:51 [vokoscreenNG] checkBox_shortcut_halo_strg = true
21:51:51 [vokoscreenNG] checkBox_shortcut_halo_shift = true
21:51:51 [vokoscreenNG] checkBox_shortcut_camera_meta = false
21:51:51 [vokoscreenNG] checkBox_shortcut_halo_alt = false
21:51:51 [vokoscreenNG] checkBox_shortcut_pause_meta = false
21:51:51 [vokoscreenNG] checkBox_shortcut_magnification_alt = false
21:51:51 [vokoscreenNG] checkBox_shortcut_showclick_alt = false
21:51:51 [vokoscreenNG] checkBox_shortcut_start_meta = false
21:51:51 [vokoscreenNG] checkBox_shortcut_showclick_strg = true
21:51:51 [vokoscreenNG] checkBox_shortcut_pause_shift = true
21:51:51 [vokoscreenNG] checkBox_shortcut_magnification_meta = false
21:51:51 [vokoscreenNG] checkBox_shortcut_showclick_shift = true
21:51:51 [vokoscreenNG] checkBox_shortcut_halo_meta = false
21:51:51 [vokoscreenNG] checkBox_shortcut_camera_alt = false
21:51:51 [vokoscreenNG] checkBox_shortcut_start_shift = true
21:51:51 [vokoscreenNG] checkBox_shortcut_camera_shift = true
21:51:51 [vokoscreenNG] checkBox_shortcut_magnification_strg = true
21:51:51 [vokoscreenNG] checkBox_shortcut_start_alt = false
21:51:51 [vokoscreenNG] checkBox_shortcut_camera_strg = true
21:51:51 [vokoscreenNG] checkBoxMagnifier = false
21:51:51 [vokoscreenNG] checkBoxResetAtNextStart = false
21:51:51 [vokoscreenNG] checkBoxMouseCursorOnOff = false
21:51:51 [vokoscreenNG] checkBoxStartsMinimized = false
21:51:51 [vokoscreenNG] checkBoxShowInSystray = true
21:51:51 [vokoscreenNG] checkBoxShowInSystrayAlternative = true
21:51:51 [vokoscreenNG] checkBoxMinimizedWhenRecordingStarts = false
21:51:51 [vokoscreenNG] checkBoxLookForUpdates = true
21:51:51 [vokoscreenNG] checkboxAudioDevice-0 = false
21:51:51 [vokoscreenNG] checkboxAudioDevice-1 = true
21:51:51 [vokoscreenNG] checkboxAudioDevice-2 = false
21:51:51 [vokoscreenNG] checkboxAudioDevice-3 = false
21:51:51 [vokoscreenNG] comboBoxCameraResolution = 640x480
21:51:51 [vokoscreenNG] comboBoxCamera = HD WebCam: HD WebCam
21:51:51 [vokoscreenNG] comboBox_shortcut_showclick = F7
21:51:51 [vokoscreenNG] comboBox_shortcut_camera = F8
21:51:51 [vokoscreenNG] comboBox_shortcut_start = F10
21:51:51 [vokoscreenNG] comboBox_shortcut_halo = F6
21:51:51 [vokoscreenNG] comboBox_shortcut_magnification = F9
21:51:51 [vokoscreenNG] comboBox_shortcut_pause = F12
21:51:51 [vokoscreenNG] comboBoxScreencastScreen = eDP-1 :  1920 x 1080
21:51:51 [vokoscreenNG] comboBoxScreencastScreenArea = eDP-1 :  1920 x 1080
21:51:51 [vokoscreenNG] comboBoxx264Preset = superfast
21:51:51 [vokoscreenNG] comboBoxx264Profile = baseline
21:51:51 [vokoscreenNG] comboBoxVideoCodec = H.264
21:51:51 [vokoscreenNG] comboBoxFormat = mp4
21:51:51 [vokoscreenNG] comboBoxOnlineHelp = Automatically
21:51:51 [vokoscreenNG] comboBoxAudioCodec = mp3
21:51:51 [vokoscreenNG] sliderVolume = 70
21:51:51 [vokoscreenNG] sliderVideo = 0
21:51:51 [vokoscreenNG] sliderCameraWindowSize = 0
21:51:51 [vokoscreenNG] sliderCameraWindowZoom = 0
21:51:51 [vokoscreenNG] sliderShowClickCircle = 50
21:51:51 [vokoscreenNG] sliderShowClickOpacity = 70
21:51:51 [vokoscreenNG] sliderShowClickShowtime = 10
21:51:51 [vokoscreenNG] sliderhaloHole = 20
21:51:51 [vokoscreenNG] sliderhaloDiameter = 70
21:51:51 [vokoscreenNG] sliderhaloOpacity = 60
21:51:51 [vokoscreenNG] sliderScreencastCountDown = 3
21:51:51 [vokoscreenNG] sliderMagnification = 2
21:51:51 [vokoscreenNG] sliderX264 = 17
21:51:51 [vokoscreenNG] sliderOpenh264 = 23
21:51:51 [vokoscreenNG] sliderVp8 = 20
21:51:51 [vokoscreenNG] sliderFrames = 30
21:51:51 [vokoscreenNG] sliderHour = 0
21:51:51 [vokoscreenNG] sliderMinute = 0
21:51:51 [vokoscreenNG] sliderStopRecordingAfterHouers = 0
21:51:51 [vokoscreenNG] sliderStopRecordingAfterMinutes = 0
21:51:51 [vokoscreenNG] sliderStopRecordingAfterSeconds = 15
21:51:51 [vokoscreenNG] sliderLimitOfFreeDiskSpace = 250
21:51:51 [vokoscreenNG] sliderShowInSystrayAlternative = 48
21:51:51 [vokoscreenNG] sliderSecondWaitBeforeRecording = 1
21:51:51 [vokoscreenNG] lineEditVideoPath = /home/myname/Videos

21:51:51 [vokoscreenNG] Free disk space at the beginning of the recording: 6462 MB

21:51:51 [vokoscreenNG] Start record with: ximagesrc display-name=:0 use-damage=false show-pointer=true startx=0 starty=0 endx=1919 endy=1079 ! video/x-raw, framerate=30/1 ! videoconvert ! videorate ! queue max-size-bytes=1073741824 max-size-time=10000000000 max-size-buffers=1000 ! openh264enc qp-min=23 qp-max=23 usage-type=camera complexity=low multi-thread=4 slice-mode=auto ! h264parse ! queue ! mux. pulsesrc device=alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-input client-name=[vokoscreenNG].PCM2902-Audio-Codec-Analog-Stereo ! audio/x-raw, channels=2 ! audioconvert ! audiorate ! queue max-size-bytes=1000000 max-size-time=10000000000 max-size-buffers=1000 ! lamemp3enc ! queue ! mux. mp4mux name=mux ! filesink location="/home/myname/Videos/vokoscreenNG-2022-07-23_21-51-51.mp4"

21:51:51 gst-launch-1.0 -e \
    ximagesrc display-name=:0 use-damage=false show-pointer=true startx=0 starty=0 endx=1919 endy=1079 \
        ! video/x-raw, framerate=30/1 \
        ! videoconvert \
        ! videorate \
        ! queue max-size-bytes=1073741824 max-size-time=10000000000 max-size-buffers=1000 \
        ! openh264enc qp-min=23 qp-max=23 usage-type=camera complexity=low multi-thread=4 slice-mode=auto \
        ! h264parse \
        ! queue \
        ! mux. \
    pulsesrc device=alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-input client-name=[vokoscreenNG].PCM2902-Audio-Codec-Analog-Stereo \
        ! audio/x-raw, channels=2 \
        ! audioconvert \
        ! audiorate \
        ! queue max-size-bytes=1000000 max-size-time=10000000000 max-size-buffers=1000 \
        ! lamemp3enc \
        ! queue \
        ! mux. \
    mp4mux name=mux \
        ! filesink location="/home/myname/Videos/vokoscreenNG-2022-07-23_21-51-51.mp4"

21:52:06 [vokoscreenNG] Pause was clicked
21:52:06 [vokoscreenNG] Pause was clicked GST_STATE_CHANGE_NO_PREROLL Returncode = 3
21:52:10 [vokoscreenNG] Continue was clicked GST_STATE_CHANGE_ASYNC Returncode = 2
21:52:10 [vokoscreenNG] Continue was clicked
21:52:17 [vokoscreenNG] Stop record
21:52:17 [vokoscreenNG] Free disk space at the end of the recording: 6463 MB

Can Vokoscreen somehow handle this or is there a workaround I can use to get this done?

djnotes commented 1 year ago

As a side note, OBS has a configuration option to set recording channel to either stereo or Mono (as needed in this example) Screenshot from 2022-07-23 22-09-26

vkohaupt commented 1 year ago

Is this behavior with all players?

djnotes commented 1 year ago

Internal Vokoscreen player, ffplay, mpv, Firefox, and VLC (in the stereo mode). In VLC, when change to MONO from Audio->Stereo Mode->Mono, then sound comes from both right and left speaker (headphone). I think it would be great if Vokoscreen could be configured to record to a mono channel instead of a stereo channel. Are there currently any workarounds?

vkohaupt commented 1 year ago

I have to ask because the answer is not clear. Do all players only output audio from the left speaker? Or is VLC the only one.

djnotes commented 1 year ago

Sorry for being vague. All players including VLC output sound from the left speaker. However, in VLC you can switch to Mono from Audio->Audio Channels->Mono to hear from both speakers.

I remember I had the same issue on Mac desktop recorder (macOS'es native screen recorder) with this microphone. After recording the screencasts, I used to run a command like the following to replicate audio channel to both ones:

for file in ./*.mp4; 
do ffmpeg -i $file  -ac 2  -map_channel 0.1.0:0.1 -c:v copy  ./stereo/$file.mp4;
done

This is the only choice I have currently to work around this issue.

vkohaupt commented 1 year ago

According to the log you have a stereo microphone alsa_input.usb-Burr-Brown_from_TI_USB_Audio_CODEC-00.analog-stereo-input

Unfortunately I can't change anything on vokoscreen because I don't have a stereo microphone.

But you could try to set the microphone to mono using pavucontrol. See picture in the attachment

Screenshot

djnotes commented 1 year ago

Thank you. It worked. Now I understand that I can switch the mic to a mono profile using pavucontrol. Interestingly, the output file's audio is stereo and it's heard from left and right speakers. image

vkohaupt commented 1 year ago

You probably have to set a corresponding profile for your Bluetooth headset. See the last post here. A Bluetooth profile might also be listed "High Fidelity AD2P-Bluetooth" https://github.com/vkohaupt/vokoscreenNG/issues/228

This could be another help. https://wiki.archlinux.org/title/PulseAudio/Troubleshooting#Glitches,_skips_or_crackling

djnotes commented 1 year ago

Sorry if my answer was misleading. All of the players I mentioned including VLC only play audio from left speaker. However, in VLC I can make it play from both speakers by switching audio channel to mono from VLC's Audio menu option.

On Sun, Jul 24, 2022 at 18:40, Volker @.***> wrote:

I have to ask because the answer is not clear. Do all players only output audio from the left speaker? Or is VLC the only one.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>