2

I'm using mplayer version 1.4-11.

When trying to play these (audio-only) kind of files, MPlayer gives the error message "Cannot find codec for audio format 0x7375704F."

Other media players like vlc have no problem playing them.

The supported codec list on the MPlayer website says it supports the similar audio format "0x7375706F" with codec names "FFmpeg opus" and "FFmpeg libopus".

MPlayer can successfully play opus audio files with an .opus extension or inside an .mkv file, and ffplay (the ffmpeg player utility) can play these mp4 files without a problem.

Here's an example command for creating this sort of file (use any audio file you have laying around):

ffmpeg -i myaudio.mp3 -acodec libopus -y test.mp4

Everything indicates MPlayer should have no problem playing this files, and yet it it complains about the audio format being unsupported. Why?

Kusalananda
  • 333,661

1 Answers1

2

MPlayer uses a configuration file called codecs.conf to control support for various codecs. For some reason, this combination of opus inside an .mp4 container isn't included as of 1.4.11.

The manpage indicates that the files is sometimes built into the executable, but you can also override it with one of the file system. On my computer, mplayer looks for a codecs.conf file first in $HOME/.mplayer/codecs.conf, and if one isn't found there it searches /etc/mplayer/codecs.conf. You can see this by invoking mplayer with the -v argument.

The manpage also says you can pass a -codecs-file argument option on the command line, but this doesn't work for me.

So, grab a copy of the default codecs.conf file. You can either find it in the source tarball on the website or on this unofficial github mirror. The file can be found under etc/ in the source tree.

Add the following to the top of the file:

; Manually added: support opus inside .mp4
audiocodec ffopusmp4
  info "FFmpeg opus/mp4"
  status working
  format 0x7375704F
  fourcc opus
  driver ffmpeg
  dll opus

and save it in the search path. For me that was under $HOME/.mplayer/codecs.conf.

MPlayer version its codecs.conf file, so if you get the warning:

This codecs.conf is too old and incompatible with this MPlayer release!

You need to grab the file from the latest release and update it instead. In a pinch, just bump tp "release" valu at the top of the file to the present day, though that may cause incompatibility, depending on why the project decided to bump the version.

With that change, I can play opus inside .mp4 files ust like any other file.