streaming sound from retropie to PC
-
I am using raspberry pi 3 having
$ lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description: Raspbian GNU/Linux 10 (buster)
Release: 10
Codename: busterI am recording screen by running following in ssh session
$cd dispmanx_vnc
$sudo ./dispmanx_vncserverNote that my PC and raspberry are wirelessly connected to same router.
Then I use tightvnc client to connect to pi_ip:5900
Now I can see my emulation station screen on PC .
Then I run windows software bandicam on my PC to record tightvnc client window. Bandicam offers 10 minutes free recording (watermarked ofcourse) with 31GB limit for free users . That is enough for me .
Is there a way I can stream sound from retropie to my PC ?
Though I have tried , if more details are needed to solve my problem then please let me know.
Thanks. -
As you may have read above - my aim is to some how record sound emanating from hdmi of raspberry pi.
I have realized that pulse audio cannot be used because it slows done gameplay and sound is bad too.
So streaming audio to PC is not possible.
ALSA is our only option.
I am okay with the fact that i will record sound file on raspberry and video file via vnc on PC. I will start both at same time and then combine the two.Current situation is
$ arecord -l
**** List of CAPTURE Hardware Devices ****
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
Subdevices: 7/7
Subdevice #0: subdevice #0
Subdevice #1: subdevice #1
Subdevice #2: subdevice #2
Subdevice #3: subdevice #3
Subdevice #4: subdevice #4
Subdevice #5: subdevice #5
Subdevice #6: subdevice #6
card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 IEC958/HDMI [bcm2835 IEC958/HDMI]
Subdevices: 1/1
Subdevice #0: subdevice #0
card 0: ALSA [bcm2835 ALSA], device 2: bcm2835 IEC958/HDMI1 [bcm2835 IEC958/HDMI1]
Subdevices: 1/1
Subdevice #0: subdevice #0It seems we have no capture device.
I am tinkering with the idea of creating loopback devices to record sound.
Have you tried that ?Can you suggest if if you have been able to capture sound that way ?
Thanks for reading.
-
@manit said in streaming sound from retropie to PC:
It seems we have no capture device.
Yes, you don't have a microphone, that's why ALSA doesn't list any capture devices.
I am tinkering with the idea of creating loopback devices to record sound.
You can try looking into streaming the sound from ALSA through
ffmpeg
and connecting something likevlc
on the PC to stream the audio. -
Finally I found a way to record audio on raspberry pi.
Draw back is that sound is sent to loopback device so player cannot hear it.
Here we send sound to loopback device 1,0,0 and capture it from 1,1,0 .Do in ssh
$sudo modprobe snd-aloop
Create ~/.asoundrc having
pcm.!default {
type hw
card 1
}ctl.!default {
type hw
card 1
}
Now start your game.
Record audio using
$arecord -D hw:1,1,0 -f S16_LE -c 2 -r 48000 recorded.wav -
I have tried to use ffmpeg to record alsa sound but since there is no capture device . It did not work .
Can you give more details about this
You can try looking into streaming the sound from ALSA through ffmpeg and connecting something like vlc on the PC to stream the audio.
Thanks.
My method in previous post does not guarantee sync in audio and video recording at all . So it is not an ideal solution.
Streaming audio will be a better solution as I will record audio and video on PC together.
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.