When I try to play an audio file using avplay on a raspberry pi3 running raspbian jessie, I get the following error.
pi@raspberrypi:~/sounds $ /usr/bin/avplay clip1.wav
avplay version 11.9-6:11.9-1~deb8u1+rpi1, Copyright (c) 2003-2017 the Libav developers
built on Apr 26 2017 06:57:28 with gcc 4.9.2 (Raspbian 4.9.2-10)
Could not initialize SDL - Unable to open a console terminal
I'm uncertain how to fix this. A google search on this error message did not turn up much of use.
I've tried ...
pi@raspberrypi:~/sounds $ /usr/bin/avplay -nodisp clip1.wav
avplay version 11.9-6:11.9-1~deb8u1+rpi1, Copyright (c) 2003-2017 the Libav developers
built on Apr 26 2017 06:57:28 with gcc 4.9.2 (Raspbian 4.9.2-10)
Could not initialize SDL - Unable to open a console terminal
and
pi@raspberrypi:~/sounds $ unset DISPLAY
pi@raspberrypi:~/sounds $ /usr/bin/avplay -nodisp clip1.wav
avplay version 11.9-6:11.9-1~deb8u1+rpi1, Copyright (c) 2003-2017 the Libav developers
built on Apr 26 2017 06:57:28 with gcc 4.9.2 (Raspbian 4.9.2-10)
Could not initialize SDL - Unable to open a console terminal
I installed this like so ...
pi@raspberrypi:~ $ sudo apt-get install libav-tools
Reading package lists... Done
Building dependency tree
Reading state information... Done
libav-tools is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 287 not upgraded.
pi@raspberrypi:~ $ dpkg -l libav-tools
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-=======================================-========================-========================-===================================================================================
ii libav-tools 6:11.9-1~deb8u1+rpi1 armhf Multimedia player, encoder and transcoder