[alsa-devel] How to save playback out in a file too

Sebastian H. vand2 at gmx.de
Mon Oct 17 11:56:57 CEST 2011

> Hi,
>  I want to same output of playback in a file.
> We are developing IEC958 device but to debug want to save output of IEC958
> plug in a file.
> Please suggest how to do that?

You could use the "file" plugin.
Extend your ~/.asoundrc with something like

pcm.write_file {
	type file
	slave {
		pcm hw:0
	file "/home/user/alsafile.wav"
	format "wav"

Then use the "write_file" device for playback.
E.g. for mplayer
mplayer -ao alsa:device=write_file myvideo.mkv


More information about the Alsa-devel mailing list