Web Projects Outsourcing

Problem Playing mp3-Encoded Files From Goldendict

When porting goldendict dictionary bases from my working laptop with Fedora 14 to a EeePC with Fedora 15, I have discovered that the sound files included with several dictionaries do not play at all.

goldendict uses mplayer to play them in the background, however, playing the same files from command line failed too.

The problem looks like the below:

[alec@localhost ~]$ mplayer "/media/drive_X/dict/dict.use.1/[some_dictionary]/Z0029900.wav"
MPlayer SVN-r33996-4.6.0 (C) 2000-2011 MPlayer Team
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing /media/drive_X/dict/dict.use.1/[some_dictionary]/Z0029900.wav
Audio only file format detected.
Load subtitles in /media/drive_X/dict/dict.use.1/[some_dictionary]
==========================================================================
Requested audio codec family [mpg123] (afm=mpg123) not available.
Enable it at compilation.
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
[mp3float @ 0x421ede80]Header missing
Unknown/missing audio format -> no sound
ADecoder init failed :(
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
Unknown/missing audio format -> no sound
ADecoder init failed :(
Requested audio codec family [mad] (afm=libmad) not available.
Enable it at compilation.
Opening audio decoder: [acm] Win32/ACM decoders
Loading codec DLL: 'l3codeca.acm'
Win32 LoadLibrary failed to load: /usr/lib/codecs/l3codeca.acm
Can't open library l3codeca.acm
ACM_Decoder: Unappropriate audio format
Could not load/initialize Win32/ACM audio codec (missing DLL file?).
ADecoder preinit failed :(
ADecoder init failed :(
Opening audio decoder: [hwmpa] MPEG audio pass-through (fake decoder)
Cannot sync MPA frame: 0
ADecoder init failed :(
ADecoder init failed :(
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
ADecoder init failed :(
ADecoder init failed :(
Cannot find codec for audio format 0x55.
Audio: no sound
Video: no video

Exiting... (End of file)

Somehow, mplayer on Fedora 15 does not detect the most effective codec for mp3 in the system. We have to explicitly tell it which codec sequence must be used.

Please see articles on this site on how to install codecs.

Solution:

sudo yum -y install ffmpeg* mpg123* lame*
sudo gedit /usr/bin/mplayer-good

Cut and paste, save:

#!/bin/bash

mplayer -afm mp3lib,ffmpeg "$1"

Make it executable:

sudo chmod a+x /usr/bin/mplayer-good

Now tune goldendict to use mplayer-good for audio.

Fix mplayer to work correctly with mp3 format in goldendict

Fix mplayer to work correctly with mp3 format in goldendict

Enjoy!

3 thoughts on “Problem Playing mp3-Encoded Files From Goldendict

  1. Tbox

    hi,
    great tip !
    you can save this setting in the config file:
    ~/.mplayer/config

    add this line:
    afm=mp3lib,ffmpeg

    save, quit

    you dont need the warper anymore.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.