Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WARNING: FFmpeg Audio Player: Cannot find usable audio output device. #661

Closed
Eosphorus opened this issue Jan 20, 2016 · 8 comments
Closed

Comments

@Eosphorus
Copy link

That's the message I get in the lower left corner of GoldenDict when I click a speaker icon of a dictionary.

Background: I've built my own GD with Qt Creator in a 64bit version, but that's not the point since it's the same problem in plain old 32bit.

Something is amiss with the Windows FFmpeg libraries and libao (?) I've built, I guess. They compile OK, are linked against the other objects of GD, no specific warnings, only warnings I always get but which are unrelated. The building process works and so does the build itself. GD runs OK except for the audio output thingy with the internal audio player.

All other stuff - tiff handler, Epwing support, Zim support, Chinese conversion support - are enabled and work just fine as far as I can tell.

Environment: Windows 10, mingw-w64-x86_64-toolchain, qt-5.5.0-x64, GD source code qt4x5 branch

Please help

Additional info: The "experimental, early access" build "GoldenDict-1.5.0-RC-594-gb1f4795_(QT_551)(64bit).7z" has no problem here. So it's generally possible to make it work but what am I missing?

Further info: ffmpeg 2.8.4, libao 1.2.0

"ffmpegaudio.cc"

267:
if ( aoDriverId < 0 || !aoDrvInfo )
{
errorString = QObject::tr( "Cannot find usable audio output device." );
return false;

}

There stems the message from. Alright then, only what does it mean? Something in the libao library, no 'WMM output plugin' support maybe? Stumped.

@perpi
Copy link

perpi commented Jan 31, 2016

Yeah, I get same error on my Gnu/Linux operating system, Debian;

Anyway, at the moment that it has a slow creeping development and bug-fixing, you can solve it by 'mplayer':

img_loading failed! refresh the page

@Eosphorus
Copy link
Author

Hi, perpi, thanks for your hints.

I had seen the other discussion but found no direct solution there.

Ok, I tried out 'mplayer' as you suggested.

While the internal player wouldn't speak up, this external one now won't shut up! When I click a speaker icon the word/sentence is repeated in an endless loop until I close the program actually.

So, I changed a thing in the "config" file of the player (both work):
#Windows waveOut audio output
ao=win32
or
#SDLlib audio output
ao=sdl

and this seems to do the trick. No more repetitions. As an interim solution this is good enough for me.

Interestingly, "ao=dsound" seems to be the default value that's no good for Windows.

With this I'm quite up to date with my build... and I have sound too!

@lelinhtinh
Copy link

I installed FFmpeg by Software Manager on Linux Mint 18.1, then set as follows:
Edit > Preferences > Audio > Use external program

ffplay -nodisp -autoexit

It works well.

@Eosphorus
Copy link
Author

Update!

Finally, I found a spare moment and revisted this issue. And lo and behold... now it's working!
Funny thing is: I was always on the right track but couldn't manage to put it all together.

Windows 10 - Qt 5.9.1 - GCC 7.1.0, 64 bit

  1. Source code version 1.2.2:
    https://github.com/xiph/libao

  2. Edit "configure.ac" line 233:

waveout_old_LIBS="$LIBS"; LIBS="$LIBS -lwinmm -Wl,-lksguid"

  1. autogen.sh

  2. configure --enable-shared --enable-wmm

  3. make

Headers:
ao.h
os_types.h
plugin.h

Libraries:
libao.dll.a
libao-4.dll

Maybe this helps someone!
So long

@whywan
Copy link

whywan commented Dec 9, 2017

Hi, my fried, can you share a release goldendict 64bit , i have same problem on windows 10 64bit , but it is not so easy for me to compile it myself . You can upload to somewhere or send it to whywan#msn.com.Thanks a lot

@Abs62
Copy link
Member

Abs62 commented Dec 10, 2017

whywan, try last early eccess build.

@zhanglongqi
Copy link

zhanglongqi commented Mar 15, 2018

It works if I use external program: cvlc --play-and-exit
No need to clean dead process. ffplay -nodisp -autoexit can not work. it will leave a lot of dead process until goldendict quit.

@Hitaro
Copy link

Hitaro commented Mar 15, 2018

The voice quality by ffplay -nodisp -autoexit or mpv is really better than cvlc --play-and-exit in my tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants