[FFmpeg-devel] [PATCH] Waveform audio grabber.

Frank Barchard fbarchard
Wed Mar 24 18:34:06 CET 2010


On Fri, Mar 12, 2010 at 1:08 PM, Ramiro Polla <ramiro.polla at gmail.com>wrote:

> Hi,
>
> For grabbing audio on Windows. To be used with something like:
> ffmpeg -sample_fmt s16 -ar 44100 -ac 2 -f waveform -i <number> output.wav
> also supports "-i list" to list devices and "-i mapper" to use the
> special mapper device.
>

Looking at your code for basic functionality, it looks like you've got the
key PCM formats and it works on 5.1 audio.
5.1 is common for 3d games and could be an interesting use case.
I guess this doesn't do microphone directly, so to voice dub you'd need an
app that passes mic to speakers, and then it could capture that.

Note that this may not work with some direct sound apps.  Excerpt from this
page:
http://en.wikipedia.org/wiki/Windows_legacy_audio_components

"First, the latency <http://en.wikipedia.org/wiki/Latency_%28audio%29> of
KMixer is around 30 ms and it cannot be reduced, because this component sits
just right above the port class audio driver, so every audio stream,
including those issued by
DirectSound<http://en.wikipedia.org/wiki/DirectSound>(except in cases
of hardware mixing) and
WinMM<http://en.wikipedia.org/w/index.php?title=WinMM&action=edit&redlink=1>,
come through the kernel mixer."

This is a good sample for getting avsync perfect:
http://www.youtube.com/watch?v=DwyG4OsWdgA



More information about the ffmpeg-devel mailing list