[FFmpeg-user] Screenrecording, audio is sped up when other process starts
Ted Park
kumowoon1025 at gmail.com
Wed Mar 25 00:50:03 EET 2020
Hi,
> I "disabled" audio from Pygame by
>
> import os
> os.putenv('SDL_AUDIODRIVER', 'dummy')
> os.putenv('SDL_AUDIODEV', '/dev/null')
>
> which worked. Thanks for help!
Oh.. I guess I was wrong, I feel like there must be a way to configure the sound from within pygame instead of setting an environment variable...
> How, however, could I ensure something like this not happening when I
> launch another program who would like access to my default sound driver?
Yeah, I suppose more likely than not you will want to record sound coming from the game also.
>> Also, does the card have 4 separate streams? If you have no particular
>> reason to get all 4 channels maybe there is a way to only record one.
> It's an external sound card with 4 separate inputs, yes. The reason for my
> not specifying hardware numbers is that those tend to reset when I unplug
> the card.
That’s understandable for removable interface.
I did see that your sound card outputs 4 channels what about the stream count? I think they present as subdevices if they are actual discrete streams, but not if they are coupled channels.
> There's that, and the raise in pitch in my voice throughout the rest of the
> clip.
>
> Either way, I have something that works now, so many thanks!
I… your welcome but if you bought a dedicated multichannel audio card or interface you should be able to route multiple sources when/if you need in the future…
If you made sure to use the same settings (sample rate, format, different streams/subdevices) you could actually get exclusive control and share the hardware device. I could be wrong but a 4 ch card is probably going to have at least two streams available, maybe separate clocks, usually not, or even 4 discrete.
You could not use a hardware device at all, and use alsa’s software converted/mixed/resampled software plugins/devices sharing input/output will be much easier. I believe you can also set a system default mixer or plugin, unfortunately the only thing I remember was that I couldn't not figure out how to set up alsa the way I wanted it and gave up halfway through :/
But see if $ aplay -L lists software device systemdefaults that seem adequate for you, then you could try if using those names instead give satisfactory results, since the audio format resampling will be handled for you by alsa even if clients use different configurations.
Regards,
Ted Park
More information about the ffmpeg-user
mailing list