MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.16k stars 346 forks source link

Bitrate not available in status for Vorbis or Opus files #1213

Closed tsweet64 closed 3 years ago

tsweet64 commented 3 years ago

Bug report

Describe the bug

When playing a Vorbis or Opus file, the status command apparently does not provide the audio bitrate, resulting in clients like ncmpcpp being unable to display it.

Expected Behavior

The audio bitrate for Ogg/Opus/Vorbis is returned in the status call, the same way as for other audio codecs like flac and mp3, allowing ncmpcpp to display it. See ncmpcpp/ncmpcpp#493

Actual Behavior

The audio bitrate is not provided by mpd for these codecs.

Version

Music Player Daemon 0.22.9 (0.22.9)
Copyright 2003-2007 Warren Dukes <warren.dukes@gmail.com>
Copyright 2008-2021 Max Kellermann <max.kellermann@gmail.com>
This is free software; see the source for copying conditions.  There is NO
warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins:
 simple proxy upnp

Storage plugins:
 local udisks nfs curl

Neighbor plugins:
 upnp udisks

Decoders plugins:
 [mad] mp3 mp2
 [mpg123] mp3
 [vorbis] ogg oga
 [oggflac] ogg oga
 [flac] flac
 [opus] opus ogg oga
 [sndfile] wav aiff aif au snd paf iff svx sf voc w64 pvf xi htk caf sd2
 [audiofile] wav au aiff aif
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [faad] aac
 [mpcdec] mpc
 [wavpack] wv
 [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm
 [mikmod] amf dsm far gdm imf it med mod mtm s3m stm stx ult uni xm
 [sidplay] sid mus str prg P00
 [wildmidi] mid
 [fluidsynth] mid
 [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve rtp:// rtsp:// rtsps://
 [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz
 [pcm]

Filters:
 libsamplerate soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo pipe alsa ao oss openal solaris pulse jack httpd recorder

Encoder plugins:
 null vorbis opus lame twolame wave flac

Archive plugins:
 [bz2] bz2
 [zzip] zip
 [iso] iso

Input plugins:
 file io_uring archive alsa tidal qobuz curl ffmpeg nfs mms cdio_paranoia

Playlist plugins:
 extm3u m3u pls xspf asx rss soundcloud flac cue embcue

Protocols:
 file:// alsa:// cdda:// ftp:// ftps:// gopher:// hls+http:// hls+https:// http:// https:// mms:// mmsh:// mmst:// mmsu:// nfs:// qobuz:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp:// tidal://

Other features:
 avahi dbus udisks epoll icu inotify ipv6 systemd tcp un

Log

Jul 26 19:53 : avahi: Initializing interface
Jul 26 19:53 : exception: RTIOThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
Jul 26 19:53 : avahi: Client changed to state 101
Jul 26 19:53 : avahi: Client is CONNECTING
Jul 26 19:53 : state_file: Loading state file /home/tim/.config/mpd/state
Jul 26 19:53 : playlist: queue song 885: [ redacted file path ]
Jul 26 19:53 : inotify: initializing inotify
Jul 26 19:53 : decoder_thread: probing plugin opus
Jul 26 19:53 : decoder: audio_format=48000:16:2, seekable=true
Jul 26 19:53 : exception: Failed to access [ redacted file path, unrelated file ]: Too many levels of symbolic links
Jul 26 19:53 : inotify: watching music directory
Jul 26 19:53 : exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
Jul 26 19:53 : client: [0] opened from [::1]:58728
Jul 26 19:53 : client: [0] process command "status"
Jul 26 19:53 : client: [0] command returned 0
Jul 26 19:53 : client: [0] process command "plchanges "0""
Jul 26 19:53 : client: [0] command returned 0
Jul 26 19:53 : client: [0] process command "outputs"
Jul 26 19:53 : client: [0] command returned 0
Jul 26 19:53 : client: [0] process command "decoders"
Jul 26 19:53 : client: [0] command returned 0
Jul 26 19:53 : client: [0] process command "outputs"
Jul 26 19:53 : client: [0] command returned 0
Jul 26 19:53 : client: [0] process command "outputs"
Jul 26 19:53 : client: [0] command returned 0
Jul 26 19:53 : client: [0] process command "idle"
Jul 26 19:53 : client: [0] command returned 1
Jul 26 19:53 : client: [0] process command "pause"
Jul 26 19:53 : output: opened "mpd" (pulse) audio_format=48000:16:2
Jul 26 19:53 : exception: OutputThread could not get realtime scheduling, continuing anyway: sched_setscheduler failed: Operation not permitted
Jul 26 19:53 : output: opened "my_fifo" (fifo) audio_format=44100:16:2
Jul 26 19:53 : libsamplerate: setting samplerate conversion ratio to 0.92
Jul 26 19:53 : output: converting in=48000:16:2 -> f=48000:16:2 -> out=44100:16:2
Jul 26 19:53 : client: [0] command returned 0
Jul 26 19:53 : client: [0] process command "idle"
Jul 26 19:53 : client: [0] command returned 1
Jul 26 19:53 : client: [0] process command "status"
Jul 26 19:53 : client: [0] command returned 0
Jul 26 19:53 : client: [0] process command "status"
Jul 26 19:53 : client: [0] command returned 0
Jul 26 19:53 : client: [0] process command "idle"
Jul 26 19:53 : client: [0] command returned 1
Jul 26 19:53 : client: [0] process command "status"
Jul 26 19:53 : client: [0] command returned 0
Jul 26 19:53 : client: [0] process command "idle"
dgcampea commented 3 years ago

Duplicate of #428 See https://github.com/MusicPlayerDaemon/MPD/issues/428#issuecomment-442826831 and https://github.com/MusicPlayerDaemon/MPD/issues/428#issuecomment-484845711 for workaround.

tsweet64 commented 3 years ago

Understood, thanks for the workaround. I'll close this issue due to it being a duplicate.