How do I capture sound on Windows XP with ffmpeg?
5,446
OK, no one came up with this, really, so this is what I use most of the time:
I use sox.
It is the best option so far, I can record with rec
, it will always record from the activated device in the windows sound configuration.
Author by
Amir Kotb
Updated on September 17, 2022Comments
-
Amir Kotb over 1 year
I'd like to capture the stereomix or line-in sound on Windows with the Windows build of ffmpeg. On linux I'd do something like this:
ffmpeg -f alsa -ac 2 -ar 48000 -i front rec.flac
This records from the alsa device, and saves it as FLAC. Now, I'd like the same thing, but on Windows.
How do I do that?
-
Amir Kotb about 13 yearsOK, but what should I chose for
-i
and-f
options then? -
barlop about 13 yearsI don't know. I searched for recording from line in or mic and didn't find things, then searched for ffmpeg windows record from, and I found this ffmpeg-users.933282.n4.nabble.com/… it's from the ffmpeg users mailing list.. it says By running: ffmpeg -f vfwcap -i 0 output.mpg you should be able to record from the default device. You might have to pass the framerate before the -i, such as: ffmpeg -f vfwcap -r 25 -i 0 output.mpg I haven't tried it though
-
Amir Kotb about 13 yearsErm, I don't plan to capture video. VfW is is just a format filter for re-encoding. A friend of mine looked through the source code of FFmpeg and confirmed, that it's simply not possible to capture sound with FFmpeg. VfW is for input devices, like Webcams, capture devices, etc.
-
Amir Kotb over 12 yearsI settled on using SOX recorder for that. It works reasonably well.
-
rogerdpack over 10 yearsso sox can record stereo mix?
-
Amir Kotb over 10 yearsyes, it can. If stereo mix is selected in the volume/sound manager, sox will record from that pseudo device.
-
rogerdpack over 10 yearsok yeah, that option will only work if you sound card "exposes" stereo mix, if not available then other options might then be necessary for some users.
-
Amir Kotb over 10 yearsIt is driver dependent. The standard audio drivers of Windows do that, though. Back in the Windows XP days, it was pretty much the fallback for any recording, as this is the downmix before it goes off to the line-out/speaker DACs. You pretty much only run into problems, when you have some fancy sound card that uses its own highly specialized drivers. Even ASIO devices work with that.