kapoorlakshya / screen-recorder

A Ruby gem to video record and take screenshots of your desktop or specific application window. Works on Windows, Linux, and macOS.
MIT License
192 stars 17 forks source link

How to record the audio in my system #102

Closed Rajagopalan-M closed 1 year ago

Rajagopalan-M commented 1 year ago

Hi Kapoor,

I have utilized your ruby gem to capture both video and audio during recording. However, I recently acquired a new system and unfortunately, I am unable to locate the audio system. When I ran your command, it presented the following message.

C:\A\Rajagopalan\VideoRecorder>ffmpeg -list_devices true -f dshow -i dummy
ffmpeg version 4.3.2-2021-02-02-full_build-www.gyan.dev Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
[dshow @ 0000013e445cd840] DirectShow video devices (some may be both video and audio devices)
[dshow @ 0000013e445cd840]  "Integrated Camera"
[dshow @ 0000013e445cd840]     Alternative name "@device_pnp_\\?\usb#vid_04f2&pid_b724&mi_00#6&1ae8f5d2&1&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global"
[dshow @ 0000013e445cd840] DirectShow audio devices
[dshow @ 0000013e445cd840]  "Microphone Array (Intel® Smart Sound Technology for Digital Microphones)"
[dshow @ 0000013e445cd840]     Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{802631D0-D092-490C-B489-AA766DFC470A}"

I used this one Microphone Array (Intel® Smart Sound Technology for Digital Microphones in


advanced = { log: 'AppData/Logs/recorder.log', f: 'dshow', i: 'audio="Microphone Array (Intel® Smart Sound Technology for Digital Microphones)"' }
ScreenRecorder.ffmpeg_binary = File.expand_path("VideoRecorder/ffmpeg.exe")

And it's recording the voice which is going through the mic not what's coming through the speaker and it's expected. Last time In my system, I found these two in my system


[dshow @ 000001c148079280]  "virtual-audio-capturer"
[dshow @ 000001c148079280]     Alternative name "@device_sw_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\{8E146464-DB61-4309-AFA1-3578E927E935}"
[dshow @ 000001c148079280]  "Headset Microphone (Jabra UC VOICE 150a MS)"
[dshow @ 000001c148079280]     Alternative name "@device_cm_{33D9A762-90C8-11D0-BD43-00A0C911CE86}\wave_{F5273A14-3E0B-49B2-85FD-0310E87EFD44}"
dummy: Immediate exit requested

However, I am currently unable to locate this feature on my current system. What steps can I take to address this issue and find a solution?

Rajagopalan-M commented 1 year ago

I have solved this problem by myself. thanks. you could close this issue.

kapoorlakshya commented 1 year ago

Great! Could you share the solution here for others?

Rajagopalan-M commented 1 year ago

I encountered a new bug where the video recording works fine, but unfortunately, it is not capturing the audio. Could you kindly take a look at it, please?