MusicPlayerDaemon / MPD

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

mpd_status_get_kbit_rate returns 0 for ogg files #428

Open ghost opened 5 years ago

ghost commented 5 years ago

In clients GMPC and Quimup (and othres?) OGG files always show 0 kbps. I believe the same is true for APE. It's been like this for quite some time (i.e. several MPD versions).

regards,

JS

MaxKellermann commented 5 years ago

0 is the magic value for "don't know". Ask the client developers to show this accordingly. No client should ever show "0".

ghost commented 5 years ago

Max, I know 0 means "don't know". But that's just another way to describe the bug, isn't it? MPD should know, after all. The exact same code worked fine some time ago, both in Quimup and GMPC.

JS

MaxKellermann commented 5 years ago

Then you should give more information. For example the last MPD version which worked. Hey, I don't even know what version you're using currently!

ghost commented 5 years ago

Sorry: Currently using 0.20.23 from Debian (testing). I can't remember what was the last version that worked. Let me know if you need more info.

JS

MaxKellermann commented 5 years ago

Will reopen as soon as you've posted all the information.

ghost commented 5 years ago

You can't be bothered to say what "all the information" is?

MaxKellermann commented 5 years ago

You can't be bothered to read the link I posted?

MaxKellermann commented 5 years ago

Oh, sorry, I only posted it in the other bug, this is it: https://www.musicpd.org/help/ But I explicitly asked you to tell the last working MPD version. If you can't remember, then find out.

ghost commented 5 years ago

Max,

I tried to install 0.21.3 but it is not in any of the Debian repos yet. Other sources have unmet dependencies, so I am stuck at 0.20.23

Finding out what was the last version that worked is not doable. Could be more that a year ago: that's digital archeology. Besides, the problem may be caused by one of the libraries that MPD uses.

I hope this is all you need:

///////////////////////// ~$ mpd --version /////////////////////////

Music Player Daemon 0.20.23

Copyright (C) 2003-2007 Warren Dukes warren.dukes@gmail.com Copyright 2008-2017 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 smbclient nfs curl

Neighbor plugins: smbclient upnp

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 [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 [adplug] amd d00 hsc laa rad raw sa2 [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 [gme] ay gbs gym hes kss nsf nsfe sap spc vgm vgz [pcm]

Filters: libsamplerate soxr

Tag plugins: id3tag

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

Encoder plugins: null vorbis opus lame wave flac

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

Input plugins: file alsa archive curl ffmpeg smbclient nfs mms cdio_paranoia

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

Protocols: file:// http:// https:// mms:// mmsh:// mmst:// mmsu:// gopher:// rtp:// rtsp:// rtmp:// rtmpt:// rtmps:// smb:// nfs:// cdda:// alsa://

Other features: avahi epoll icu inotify ipv6 systemd tcp un

///////////////////////// mpd.conf /////////////////////////

GENERAL

playlist_directory "/home/jayes/.config/mpd/playlists" music_directory "/mnt/music" log_file "/home/jayes/.config/mpd/mpd.log" pid_file "/home/jayes/.config/mpd/pid.log" db_file "/home/jayes/.config/mpd/mpddb" sticker_file "/home/jayes/.config/mpd/sticker.sql" state_file "/home/jayes/.config/mpd/state"

bind_to_address "0.0.0.0"

bind_to_address "localhost"

bind_to_address "/home/jayes/.config/mpd/socket"

port "6600"

password ""

default_permissions "read,add,control,admin"

OUTPUT

(run 'aplay -L' for a list of alsa devices)

alsa analog output

audio_output {

type "alsa"

name "ALSA T22 Analog"

device "default:0"

format "44100:16:2"

}

alsa digital output

audio_output {

type "alsa"

name "ALSA T22 digital"

device "iec958"

}

Pulse audio output

audio_output { type "pulse" name "MPD PulseAudio Output" format "44100:16:2"

server "localhost" # optional

sink "alsa_output" # optional

}

mixer_type "software"

MISC

follow_outside_symlinks "yes" follow_inside_symlinks "yes"

auto-update MPD's database:

auto_update "no" replaygain "album" metadata_to_use "albumartist,artist,album,title,track,name,genre,date,comment,disc" save_absolute_paths_in_playlists "no" filesystem_charset "UTF-8"

///////////////////////// mpd.log (verbose, playing an ogg file) /////////////////////////

Nov 28 16:18 : player: played "Jimmy Haslip/2018 Elemental/Otmaro Ruiz, Jimmy Branly & Jimmy Haslip - ELM 02 - Greed.ogg" Nov 28 16:18 : output: closed plugin=pulse name="MPD PulseAudio Output" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : state_file: Saving state file /home/jayes/.config/mpd/state Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0 Nov 28 16:18 : client: [0] process command "status" Nov 28 16:18 : client: [0] command returned 0

MaxKellermann commented 5 years ago

Your log doesn't show any playback.

ghost commented 5 years ago

Let's try again:

Nov 28 20:23 : playlist: stop Nov 28 20:23 : player: played "Jack DeJohnette/2003 Music in the Key of Om/Jack DeJohnette - MKO 01 - The Key of Om.ogg" Nov 28 20:23 : output: closed plugin=pulse name="MPD PulseAudio Output" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "play" Nov 28 20:23 : playlist: play 0:"Jack DeJohnette/2003 Music in the Key of Om/Jack DeJohnette - MKO 01 - The Key of Om.ogg" Nov 28 20:23 : decoder_thread: probing plugin vorbis Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : playlist: queue song 1:"Jack DeJohnette/2007 Peace Time/Jack DeJohnette - PCT 01 - PeaceTime.ogg" Nov 28 20:23 : decoder: audio_format=44100:f:2, seekable=true Nov 28 20:23 : output: opened plugin=pulse name="MPD PulseAudio Output" audio_format=44100:16:2 Nov 28 20:23 : output: converting in=44100:f:2 -> f=44100:f:2 -> out=44100:16:2 Nov 28 20:23 : replay_gain: replay gain mode has changed off->album Nov 28 20:23 : replay_gain: scale=1.000000 Nov 28 20:23 : replay_gain: scale=0.749894 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : state_file: Saving state file /home/jayes/.config/mpd/state Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0 Nov 28 20:23 : client: [0] process command "status" Nov 28 20:23 : client: [0] command returned 0

MaxKellermann commented 5 years ago

So you're using the Vorbis decoder. And it doesn't implement bit rates, that's true.

ghost commented 5 years ago

On Thursday, November 29, 2018 2:07:02 PM CET Max Kellermann wrote:

So you're using the Vorbis decoder. And it doesn't implement bit rates, that's true.

I'll be damned!

decoder { plugin "vorbis" enabled "no" }

... and it works again.

Sorry to bother you with two invalid bug reports & thanks for your help.

JS

-- Johan Spee "Eve Ryth in Gisgon na Beal Right"

ephemeralriggs commented 5 years ago

So you're using the Vorbis decoder. And it doesn't implement bit rates, that's true.

This means that mpd's vorbis plugin does not yet support it, correct? Because ogg123 extracts the instantaneous bitrate (not the average bitrate of a file) using only libvorbis.

ghost commented 5 years ago

On Friday, 19 April 2019 11:43:00 CEST Thomas Zander wrote:

This means that mpd's vorbis plugin does not yet support it, correct?

Hi Thomas.

Yes that's correct. But "mpd's vorbis plugin" is whatever it can lay its hands on. I added the following to my mpd.conf:

decoder { plugin "vorbis" enabled "no" }

And now the bitrate for ogg file is shown correctly.

regards,

-- Johan Spee "Eve Ryth in Gisgon na Beal Right"