Solved How to recored audio from Game on FreeBSD.

ericbsd

Developer
I am trying to record the audio of Games on FreeBSD, but it seams the FreeBSD does not record the output that year from games. I was success full to record sound from the desktop like Rhythmbox and Firefox but not Games. To me that does not make any sense.
I use OBS.

Does anyone knows how to get the audio that is ouputed from the speaker to be recorded.
 
I am trying to record the audio of Games on FreeBSD, but it seams the FreeBSD does not record the output that year from games. I was success full to record sound from the desktop like Rhythmbox and Firefox but not Games. To me that does not make any sense.
I use OBS.

Does anyone knows how to get the audio that is ouputed from the speaker to be recorded.
Actually it is now supports OSS and not to sound rude, but I am looking for solution not thing that I already know.
 
Seems to work but I can import that to OBS?
1. Honestly, I don't see how the OSS audio plugin for OBS is supposed to work exactly. This likely involves https://github.com/obsproject/obs-studio/pull/3289, https://github.com/hselasky/virtual_oss/commit/e8c5ef356b0983d1d264f4657a2000b6dfeaf94d and the -T option for virtual_oss ( virtual_oss -T /dev/sndstat ...). It doesn't work for me, but I'm not really interested in wasting my time battling OBS.
2. For PulseAudio use pacat /dev/vdsp.wav.
 
Thanks every appreciated pacat /dev/vdsp.wav did the trick the only thing the audio is late of 2 or 3 second. I might have have a work around that now that I know how to use /dev/vdsp.wav.
 
So what I am doing is to send back the audio to my default dsp with -P /dev/dsp3 so there is no audio lag.
sudo virtual_oss -Q 0 -C 2 -c 2 -r 48000 -b 16 -s 1024 -P /dev/dsp3 -R /dev/null -w vdsp.wav -l dsp
I did run pacat /dev/vdsp.wav and with pavucontrol I set the virtual to ouput at /dev/dsp4.
I set OBS to get dsp4 audio and that way the audio I hear is in sync with the game, using something like Pitivi I can sync the audio.

For recording that setup works, but for streaming that an other story.

Thanks shkhln
 
Everyone is playing games with homura and now i see linux steam ? Why it doesn't seem to work on my pc what i did wrong ?
I would like to have steam to run some simple 2d ,pixelated games the only games i really enjoy don't want much stuff of course.
If anyone knows how to install linux steam and can help you're welcome.
Tried to run some linux applications but it failed .

 
Get a jack to jack cable connect the output to the line in :-)

mindblown.jpeg


So what I am doing is to send back the audio to my default dsp with -P /dev/dsp3 so there is no audio lag.
sudo virtual_oss -Q 0 -C 2 -c 2 -r 48000 -b 16 -s 1024 -P /dev/dsp3 -R /dev/null -w vdsp.wav -l dsp
I did run pacat /dev/vdsp.wav and with pavucontrol I set the virtual to ouput at /dev/dsp4.
I set OBS to get dsp4 audio and that way the audio I hear is in sync with the game, using something like Pitivi I can sync the audio.

For recording that setup works, but for streaming that an other story.

Thanks shkhln
 
To help you, can you please submit a bugreport with logs, or contact us via the freebsd discord or ghostbsd telegram group.
I found that freebsd has a package linux-steam-utils installed it and i could run steam and even login steam with my account ! Tried to run the binding of isaac but it won't launch i will update when i test other games too and see the terminal output .... god only knows what linux libraries they need to run
 
Whether this is supposed to be funny or not, this is a mallet method which is not very recommendable because as far as I know it can break a port depending on how vulnerable the connections are.
It can be the input of a usb soundcard you won't miss a 5$ usb sound card . My default soundcard is the displayport output (Monitor jack output) so in my case there's no problem at all.
I use it because i have an android box connected on the hdmi of my monitor too ! I use it to watch local tv and cable tv my provider gave it to me for free and i enjoy using it its very simple.
 
…and a hardware mixer to be able to listen to the sound while it's being recorded.
My 5$ usb soundcard its actually a dual soundcard so i can listen and record anyway.
Of course the best way to do that is using ffmpeg i succeed to make it work for recording but that doesn't apply to live streaming i tried to use pipe to input to ffmpeg but i do something wrong it can be done and to say the truth my ffmpeg script has a million times better quality than obs best quality setting don't know why also i succeed recording with ffmpeg from openbsd too using ffmpeg
This is my usb soundcard , i will make some broadcasting on my channel
 
I've tried with so many different software solution, and eventually gave up. Ever since, I've been using a jack-to-jack cable connection, with a Y-splitter on the output port, so I can hear what I record too. It's been working for over a year now, with great success. I have a small script to configure the sound and line-in levels for when I want to do recordings - to keep the volumes consistent between my recordings. My recordings are done with another script that fires up ffmpeg.
 
I've tried with so many different software solution, and eventually gave up. Ever since, I've been using a jack-to-jack cable connection, with a Y-splitter on the output port, so I can hear what I record too. It's been working for over a year now, with great success. I have a small script to configure the sound and line-in levels for when I want to do recordings - to keep the volumes consistent between my recordings. My recordings are done with another script that fires up ffmpeg.
If your script records the desktop and sound+mic can you share your script ?
A good script was the fauxstream script for openbsd it would be cool if we can modify it to run on FreeBSD , it was performing so good on OpenBSD !
The best method is definitely to use an ffmpeg script to record or stream !
 
Happy to share. No idea if it's any good for others, but it gives good results for me. As I mentioned, I use a jack-to-jack cable connection, with a Y-splitter on the output, so I can hear the gameplay (via headphones), while recording.

It records exact co-ordinates on my desktop (where the gaming window will always be) and records the gaming sound and mic (voiceover) as two separate audio tracks in the same file. And yes, the quality I get from my script is way better than what I managed to achieve with OBS. Also it doesn't seem to affect my FPS in the game much either (contrary to OBS).

I'll be glad for some feedback, if there is ways I can improve it. I tried to do the same with virtual_oss, but after reading the man page many times, I still couldn't figure out how it works.
 

Attachments

Back
Top