Could not find codec parameters (err -1)

Hi.

I was using MOC without problems until a upgrade of my OS, now when I want to play somethig this messege appear: Could not find codec parameters (err -1)

I'm using Debian Wheezy with the multimedia repository and the config file that appear here: http://corenominal.org/howto-setup-moc-music-on-console/

Cheers.

There's really not enough information here to go on.

  • Does it error on all files?
  • Of those it does error on, did it do so on those specific files before the upgrade?
  • If not all files, which formats produce the error?
  • Does it error on all files of those formats?
  • Is there anything in mocp_server_log for those file(s)?
  • What does avprobe say about those file(s)?

One thing I would note is that the version of MOC in Wheezy is now over one hundred patches behind the current MOC 2.5.0-beta1. However, it does include the major overhaul of the FFmpeg/LibAV decoder which produces this error message and it might merely be the result of better error detection.

Hi, sorry for the lack of info.

>Does it error on all files?

Only in all the mp3.

>Of those it does error on, did it do so on those specific files before the upgrade?

No before the upgrade it used to play all those files just fine.

>If not all files, which formats produce the error?

The ogg files run fine, the problem "Could not find codec parameters (err -1)" occurs with all the mp3 files, and with the wma it only skips the songs and doesn't play anything.

>Does it error on all files of those formats?

Yes in the mp3.

>Is there anything in mocp_server_log for those file(s)?

Here is the log file: http://punksmedia.org/archivos/mocp_client_log

>What does avprobe say about those file(s)?

Sorry I don't have any experience with avprobe, can you suggest any commands?

Sorry I don't have any experience with avprobe, can you suggest any commands?

avprobe filename.mp3

This is what Aprove says about one mp3, and of one wma files...

http://punksmedia.org/archivos/avprobe_mp3
http://punksmedia.org/archivos/avprobe_wma

As you can probably now see yourself, this doesn't look like a problem with MOC. Given the number of errors from avprobe I'd say it's either corrupted audio files, or a problem within LibAV. As the MP3s were working before and avprobe reports:

avprobe: Symbol `av_pix_fmt_descriptors' has different size in shared object, consider re-linking

I'd say it's the later. Later on avprobe reports:

Could not find codec parameters (Audio: mp3, 0 channels, s16)

which is what MOC reported as well.

You should be aware that Debian distributes the MOC FFmpeg/LibAV plug-in as a separate package. My best guess is that you did not successfully upgrade all relevant components, or the packages were misbuilt or corrupt in some way. Try removing and re-installing all relevant packages.

You could force MOC to use its MP3 decoder (assuming you have the applicable libraries installed) by using:

-O "PreferredDecoders+=mp3(mp3)"

on your MOC command in the meantime.

With the command:

mocp -O "PreferredDecoders+=mp3(mp3)"

I can enjoy listening mp3 files with MOC.

Thanks a lot for your help, MOC rules!

That's really only a temporary measure. You can update your ~/.moc/config to include this option so as not to have to repeat it every time you invoke MOC (but read the comments in config.example on PreferredDecoders first).

However, you should try to resolve the original issue with LibAV so we can be sure it's not actually a MOC problem (which would need to be fixed). You might want to consider asking the Debian community for assistance if you don't make any progress yourself. If you do, refer them to this posting so they don't have to repeat diagnostic work already done.

Nothing further heard -- problem closed.

same problem for me,
except that the "-O \"PreferredDecoders+=mp3(mp3)\" " option doesn't work,
and I can't find any documented bug in any mp3 library...

Okay, let's start with some basic information:

  • Which version of MOC are you running: mocp --version
  • Is the MP3 decoder installed: find /usr/{,local/}lib{,64}/moc/decoder_plugins -name libmp3_decoder.so 2>/dev/null
  • What does FFmpeg/LibAV say about the file: use ffmpeg -i, ffprobe, or avprobe as appropriate.

Best guess at this stage: you have the same problem but no installed MP3 decoder to fall back on.

* ned@zan:~$ mocp --version

This is : Music On Console
Version : 2.5.0-alpha4
Built : Feb 26 2012 15:43:51
Compiled with : OSS ALSA JACK DEBUG internet streams resample
Author : Damian Pietras
Homepage : http://moc.daper.net/
E-Mail : daper@daper.net
Copyright : (C) 2003-2011 Damian Pietras and others
License : GNU General Public License, version 2 or later

* ned@zan:~$ ls /usr/lib/moc/decoder_plugins/libmp3_decoder.so
/usr/lib/moc/decoder_plugins/libmp3_decoder.so

* ffmpeg -i 03.Sans Remission.mp3
Input #0, mp3, from '/data/audio/HipHop/Fonky-Family/03.Sans Remission.mp3':
Duration: 00:05:18.32, start: 0.000000, bitrate: 191 kb/s
Stream #0:0: Audio: mp3, 44100 Hz, stereo, s16, 192 kb/s

(but it does it for any .mp3, and those are well played with any other player)

This appears to be a different problem with the same initial symptom.

Are you able to install MOC 2.5.0-beta1 and try again with that?

If not, or if the problem persists, can you run mocp with the -D option for one failing MP3 file with each of the options -O "PreferredDecoders+=mp3(mp3)" and -O "PreferredDecoders+=mp3(ffmpeg)" and send the mocp_server_log file produced in each case (compressed) to mocmaint.

jcf has resolved it :

after restarting the server (mocp -x) all play well.

thank you for your help.