FFmpeg-4.0
~ $ cat .libao
default_driver=pulse
quiet
Try removing the "quiet" line and rebooting as suggested here.
Another possibility: perhaps the system-wide libao configuration in /etc/libao.conf is not completely ignored, but merged with the user-specific configuration. Try editing it as well. The documentation is vague:
When libao is initialized, it reads two configuration files: the system-wide configuration in "/etc/libao.conf" and the user configuration in "~/.libao". Neither file needs to be present on the system for libao to load. If both are present, the system configuration file is read first, followed by the user configuration file. Options set in the user configuration will take precedence.
You can also try the Qt Multimedia internal player backend or an external player.
External player works okay.
There is no '/etc/libao.conf' un system. Removed 'quite', it didn't help.
Don't wanna use Qt Multimedia as it depends on GStreamer.
~ $ ldd /usr/bin/goldendict
linux-vdso.so.1 (0x00007fff4b9af000)
libz.so.1 => /lib64/libz.so.1 (0x00007fafe2a38000)
libbz2.so.1 => /lib64/libbz2.so.1 (0x00007fafe2a24000)
liblzo2.so.2 => /lib64/liblzo2.so.2 (0x00007fafe29fd000)
libX11.so.6 => /usr/lib64/libX11.so.6 (0x00007fafe28be000)
libXtst.so.6 => /usr/lib64/libXtst.so.6 (0x00007fafe28b7000)
libtiff.so.5 => /usr/lib64/libtiff.so.5 (0x00007fafe23de000)
libeb.so.13 => /usr/lib64/libeb.so.13 (0x00007fafe2877000)
libvorbisfile.so.3 => /usr/lib64/libvorbisfile.so.3 (0x00007fafe23d4000)
libhunspell-1.6.so.0 => /usr/lib64/libhunspell-1.6.so.0 (0x00007fafe2367000)
libao.so.4 => /usr/lib64/libao.so.4 (0x00007fafe235d000)
libavutil.so.56 => /usr/lib64/libavutil.so.56 (0x00007fafe22ed000)
libavformat.so.58 => /usr/lib64/libavformat.so.58 (0x00007fafe20d5000)
libavcodec.so.58 => /usr/lib64/libavcodec.so.58 (0x00007fafe0e20000)
libQt5Svg.so.5 => /usr/lib64/libQt5Svg.so.5 (0x00007fafe0dca000)
libQt5WebKitWidgets.so.5 => /usr/lib64/libQt5WebKitWidgets.so.5 (0x00007fafe0d7e000)
libQt5PrintSupport.so.5 => /usr/lib64/libQt5PrintSupport.so.5 (0x00007fafe0d0e000)
libQt5Help.so.5 => /usr/lib64/libQt5Help.so.5 (0x00007fafe0c90000)
libQt5Widgets.so.5 => /usr/lib64/libQt5Widgets.so.5 (0x00007fafe0651000)
libQt5WebKit.so.5 => /usr/lib64/libQt5WebKit.so.5 (0x00007fafdd9ce000)
libQt5X11Extras.so.5 => /usr/lib64/libQt5X11Extras.so.5 (0x00007fafdd9c8000)
libQt5Gui.so.5 => /usr/lib64/libQt5Gui.so.5 (0x00007fafdd4fd000)
libQt5Xml.so.5 => /usr/lib64/libQt5Xml.so.5 (0x00007fafdd4c0000)
libQt5Network.so.5 => /usr/lib64/libQt5Network.so.5 (0x00007fafdd327000)
libQt5Core.so.5 => /usr/lib64/libQt5Core.so.5 (0x00007fafdce7d000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fafdcc5d000)
libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/libstdc++.so.6 (0x00007fafdcacd000)
libm.so.6 => /lib64/libm.so.6 (0x00007fafdc734000)
libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/8.1.0/libgcc_s.so.1 (0x00007fafdc71b000)
libc.so.6 => /lib64/libc.so.6 (0x00007fafdc353000)
libxcb.so.1 => /usr/lib64/libxcb.so.1 (0x00007fafdc32b000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007fafdc125000)
libXext.so.6 => /usr/lib64/libXext.so.6 (0x00007fafdc112000)
liblzma.so.5 => /lib64/liblzma.so.5 (0x00007fafdc0eb000)
libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007fafdc079000)
libnsl.so.2 => /usr/lib64/libnsl.so.2 (0x00007fafdc060000)
libvorbis.so.0 => /usr/lib64/libvorbis.so.0 (0x00007fafdc02b000)
libogg.so.0 => /usr/lib64/libogg.so.0 (0x00007fafdc021000)
libva.so.2 => /usr/lib64/libva.so.2 (0x00007fafdbffe000)
libva-drm.so.2 => /usr/lib64/libva-drm.so.2 (0x00007fafdbffa000)
libva-x11.so.2 => /usr/lib64/libva-x11.so.2 (0x00007fafdbff3000)
libdrm.so.2 => /usr/lib64/libdrm.so.2 (0x00007fafdbfe1000)
libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007fafdbf60000)
libssl.so.1.1 => /usr/lib64/libssl.so.1.1 (0x00007fafdbef2000)
libcrypto.so.1.1 => /usr/lib64/libcrypto.so.1.1 (0x00007fafdbc8b000)
libswresample.so.3 => /usr/lib64/libswresample.so.3 (0x00007fafdbc6e000)
libvpx.so.5 => /usr/lib64/libvpx.so.5 (0x00007fafdba4c000)
libwebpmux.so.3 => /usr/lib64/libwebpmux.so.3 (0x00007fafdba41000)
libwebp.so.7 => /usr/lib64/libwebp.so.7 (0x00007fafdb9be000)
libopus.so.0 => /usr/lib64/libopus.so.0 (0x00007fafdb961000)
libvorbisenc.so.2 => /usr/lib64/libvorbisenc.so.2 (0x00007fafdb8b6000)
libwavpack.so.1 => /usr/lib64/libwavpack.so.1 (0x00007fafdb88a000)
libx264.so.152 => /usr/lib64/libx264.so.152 (0x00007fafdb72b000)
libx265.so.151 => /usr/lib64/libx265.so.151 (0x00007fafdb3e8000)
libopenh264.so.4 => /usr/lib64/libopenh264.so.4 (0x00007fafdb2de000)
libQt5Sql.so.5 => /usr/lib64/libQt5Sql.so.5 (0x00007fafdb293000)
libQt5Quick.so.5 => /usr/lib64/libQt5Quick.so.5 (0x00007fafdae24000)
libicuuc.so.61 => /usr/lib64/libicuuc.so.61 (0x00007fafdac68000)
libicui18n.so.61 => /usr/lib64/libicui18n.so.61 (0x00007fafda9b6000)
libpng16.so.16 => /usr/lib64/libpng16.so.16 (0x00007fafda97b000)
libhyphen.so.0 => /usr/lib64/libhyphen.so.0 (0x00007fafda974000)
libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007fafda80c000)
libxslt.so.1 => /usr/lib64/libxslt.so.1 (0x00007fafda7cf000)
libsqlite3.so.0 => /usr/lib64/libsqlite3.so.0 (0x00007fafda6ae000)
libQt5Qml.so.5 => /usr/lib64/libQt5Qml.so.5 (0x00007fafda286000)
librt.so.1 => /lib64/librt.so.1 (0x00007fafda07e000)
/lib64/ld-linux-x86-64.so.2 (0x00007fafe284c000)
libGL.so.1 => /usr/lib64/libGL.so.1 (0x00007fafda010000)
libharfbuzz.so.0 => /usr/lib64/libharfbuzz.so.0 (0x00007fafd9f62000)
libpcre2-16.so.0 => /usr/lib64/libpcre2-16.so.0 (0x00007fafd9eec000)
libdouble-conversion.so.1 => /usr/lib64/libdouble-conversion.so.1 (0x00007fafd9edf000)
libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007fafd9dc7000)
libXau.so.6 => /usr/lib64/libXau.so.6 (0x00007fafd9dc2000)
libXdmcp.so.6 => /usr/lib64/libXdmcp.so.6 (0x00007fafd9db9000)
libtirpc.so.3 => /lib64/libtirpc.so.3 (0x00007fafd9d8e000)
libmvec.so.1 => /lib64/libmvec.so.1 (0x00007fafd9b64000)
libXfixes.so.3 => /usr/lib64/libXfixes.so.3 (0x00007fafd9b5d000)
libicudata.so.61 => /usr/lib64/libicudata.so.61 (0x00007fafd81b3000)
libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007fafd8178000)
libxcb-dri3.so.0 => /usr/lib64/libxcb-dri3.so.0 (0x00007fafd8173000)
libxcb-xfixes.so.0 => /usr/lib64/libxcb-xfixes.so.0 (0x00007fafd816a000)
libxcb-present.so.0 => /usr/lib64/libxcb-present.so.0 (0x00007fafd8166000)
libxcb-sync.so.1 => /usr/lib64/libxcb-sync.so.1 (0x00007fafd815c000)
libxshmfence.so.1 => /usr/lib64/libxshmfence.so.1 (0x00007fafd8159000)
libglapi.so.0 => /usr/lib64/libglapi.so.0 (0x00007fafd8127000)
libXdamage.so.1 => /usr/lib64/libXdamage.so.1 (0x00007fafd8123000)
libX11-xcb.so.1 => /usr/lib64/libX11-xcb.so.1 (0x00007fafd8120000)
libxcb-glx.so.0 => /usr/lib64/libxcb-glx.so.0 (0x00007fafd8105000)
libxcb-dri2.so.0 => /usr/lib64/libxcb-dri2.so.0 (0x00007fafd80fd000)
libXxf86vm.so.1 => /usr/lib64/libXxf86vm.so.1 (0x00007fafd80f7000)
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007fafd8038000)
libgraphite2.so.3 => /usr/lib64/libgraphite2.so.3 (0x00007fafd800b000)
libpcre.so.1 => /lib64/libpcre.so.1 (0x00007fafd7f96000)
libbsd.so.0 => /usr/lib64/libbsd.so.0 (0x00007fafd7f7b000)
~ $ ldd /usr/lib64/libao.so
linux-vdso.so.1 (0x00007ffedf31a000)
libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f46bd745000)
libdl.so.2 => /lib64/libdl.so.2 (0x00007f46bd541000)
libc.so.6 => /lib64/libc.so.6 (0x00007f46bd179000)
/lib64/ld-linux-x86-64.so.2 (0x00007f46bd965000)
Does this error happen only for some audio files? Perhaps this is the duplicate of #949? Try playing the default \ This inability of libao+pulseaudio to play 32-bit or fltp audio was my primary reason for implementing the Qt Multimedia backend.
Does this error happen only for some audio files?
Nope, it plays audio in some dictionaries.
Try playing the default
(anthem) in the "United States" article from English Wikipedia - the FFmpeg backend plays it successfully on my system because it is 16-bit.
WARNING: Audio Player: ao_open_live() failed: Cannot open device: pulse, channels:2, rate: 44100, bits: 32.
If the FFmpeg backend works in some dictionaries, then it probably is the same issue - duplicate of #949.
You have probably triggered a different audio file (from another dictionary?), because the "United States" audio file I suggested has s16p format. Alternatively try the "The Star-Spangled Banner" article in English Wikipedia - it's also 16-bit.
stick with external player
After a massive system upgrade, including ffmpeg 4.0, the number of audio files successfully pronounced by FFmpeg+libao backend reduced substantially. This includes pronunciations from the "United States" and "The Star-Spangled Banner" articles in English Wikipedia as well as some audio files in my local dictionaries. The new FFmpeg version (and consequently all applications that use it) reports these audio files as 32-bit fltp or 24-bit, while the older FFmpeg version 3.4 reported them as 16-bit or less. This means that libao's pulseaudio plugin refuses to play these files when the latest FFmpeg version is installed.
So this issue is not a duplicate, but an exacerbation of #949 caused by changes in FFmpeg 4.0.
on behalf of @vedgy i reopen issue.
If this is still a relevant issue for everyone here, I've found this on the other thread.
Go to Edit > Preferences > Audio > Use external program and insert
ffplay -nodisp -autoexit
then hit OK.
In my opinion, this line of code is the most elegant solution, because ffplay is a very simple media player and it replaces the internal one, which is just another simple media player, I guess. So why bother about the internal player if you can use an external one and it will work the same way or even better? From the outside view it performs flawlessly. I hope this workaround will help us to close the issue at least for a while.
Goldendict's external player implementation writes the audio data into a temporary file, launches an external player process, then deletes the temporary file. This is substantially less efficient than passing the audio data buffer in-memory to an internal player. In other words, internal players (FFmpeg+libao and Qt Multimedia) operate strictly in RAM without touching the HDD or SSD. Of course, some (most?) distributions enable tmpfs by default, so this performance difference is irrelevant for many users.
Also note that the ffplay
solution may be simple and elegant for GNU/Linux users, but not so simple for poor Windows and Mac users who do not have ffplay
in their system PATH
. Though I don't even know if other operating systems are affected. Perhaps this is a GNU/Linux-specific issue.
Hi @perfect7gentleman. I have verified that this issue was fixed by #1273. Please close it if the Ffmpeg+libao internal player backend works for you too.
confirm. fixed.
Most helpful comment
If this is still a relevant issue for everyone here, I've found this on the other thread.
Go to Edit > Preferences > Audio > Use external program and insert
ffplay -nodisp -autoexit
then hit OK.In my opinion, this line of code is the most elegant solution, because ffplay is a very simple media player and it replaces the internal one, which is just another simple media player, I guess. So why bother about the internal player if you can use an external one and it will work the same way or even better? From the outside view it performs flawlessly. I hope this workaround will help us to close the issue at least for a while.