[FFmpeg-user] Playing audio with ffmpeg

Deron deron at pagestream.org
Mon Nov 12 20:09:14 CET 2012

On 11/11/12 8:57 AM, Nicolas George wrote:
> Le decadi 20 brumaire, an CCXXI, Deron a écrit :
>> I have a headless server that I would like to play audio out the
>> standard headphone port using ffmpeg. I thought asla might be the
>> ticket, but the documentation is a bit sparse. Is that the right
>> device, and does anyone have an example that works?
> The basic command would be:
> ffmpeg -i anything -f alsa default
> You can put any named ALSA device instead of "default", provided you know
> how ALSA works; Carl Eugen's command is an example of that, where "hw:0"
> points directly to the first sound controller, bypassing ALSA's
> configuration, software sharing and automatic conversion to formats
> controlled by your card.
> But I do not advise you to use such a solution: ffmpeg is not meant as a
> playback tool, and lacks all basic features, including simple pause. You
> should look for a console-based player, MPlayer can work like that, or a
> daemon-based one (I know "mpd" exist, but I do not know anything more about
> it).
> Regards,

This, and hw:0, both work. Thanks! I wasn't clear what the device name 
should be from the documentation.

I don't need any playback features. This is on a remote headless server, 
and the files to be played may be remote to the server or even an rtmp 
stream. Since the files I know already work with ffmpeg, then using 
ffmpeg is the easiest solution (and doesn't require another app on the 

Thanks again,


More information about the ffmpeg-user mailing list