Opened 5 years ago
Last modified 13 months ago
#9408 new enhancement
WASAPI Audio Input/Output Support
| Reported by: | Brad Isbell | Owned by: | |
|---|---|---|---|
| Priority: | wish | Component: | avdevice |
| Version: | git-master | Keywords: | |
| Cc: | Brad Isbell | Blocked By: | |
| Blocking: | Reproduced by developer: | no | |
| Analyzed by developer: | no |
Description
The Windows Audio Session API (WASAPI) is a modern API for audio playback/capture under Windows. It offers several benefits over the current DirectShow implementation in FFmpeg:
- Multi-channel support
- Loopback capture, for both entire output devices and for individual streams from applications
- Low-latency I/O without the need for proprietary ASIO
- Exclusive mode for further reducing latency
Sample Usage
Capture from multichannel soundcard:
ffmpeg -f wasapi -ar 96000 -ac 8 -i device="My Multichannel Soundcard" …
Capture in exclusive mode from soundcard named 'Soundcard':
ffmpeg -f wasapi -exclusive_mode true -i device="Soundcard" …
Capture loopback from soundcard named 'Soundcard':
ffmpeg -f wasapi -i loopback_device="Soundcard" …
Capture loopback from entire system:
ffmpeg -f wasapi -i loopback_system=true …
Capture loopback from app by name or PID:
ffmpeg -f wasapi -i loopback_application_pid=54321 … ffmpeg -f wasapi -i loopback_application_name="Skifree" …
Change History (6)
comment:1 by , 5 years ago
comment:2 by , 4 years ago
| Component: | undetermined → avdevice |
|---|---|
| Priority: | normal → wish |
| Version: | unspecified → git-master |
comment:3 by , 16 months ago
This is a problem in that modern immersive surround formats have more than 8 channels, not to mention High Order Ambisonics. Other aspects of ffmpeg have channel support up to 22.2, but for playback SDL2 is a bottleneck.
A Related note, even given dshow and WASAPI support, it is very difficult/impossible to find windows binary builds with support for those.
comment:4 by , 16 months ago
Another use case that's popped up is capturing in 32-bit float. Several prosumer audio interfaces and recorders now support floating point audio capture. 32-bit float can be captured with WASAPI. Samples with values >±1.0 can be captured with WASAPI in exclusive mode. Gstreamer supports this today. If FFmpeg adds support, that goes a long way to enabling floating point capture in all the applications built on FFmpeg.
comment:5 by , 13 months ago
It would be great to have WASAPI on ffmpeg. Mainly to capture loopback from entire system and use it with the Screen Recording feature
comment:6 by , 13 months ago
ヽ༼ຈل͜ຈ༽ノ currently requesting for WASAPI ヽ༼ຈل͜ຈ༽ノ I need it for ... a private project lol



SDL_OpenAudio ffplay already uses WASAPI. Interesting that 8.1 is apparently not supported.