Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streams opend with mpg123 plugin have invalid duration #2058

Open
jcorporation opened this issue Jun 8, 2024 · 2 comments
Open

Streams opend with mpg123 plugin have invalid duration #2058

jcorporation opened this issue Jun 8, 2024 · 2 comments
Labels
waiting Waiting for more information from reporter

Comments

@jcorporation
Copy link
Member

Bug report

Describe the bug

Streams opened with mpg123 plugin have invalid duration. If the stream is opened with mad plugin the duration is reported correctly.

Expected Behavior

Correct duration for streams with mpg123 plugin.

Actual Behavior

Invalid duration reported. Output of the status command:

volume: 50
repeat: 0
random: 0
single: 0
consume: 1
partition: default
playlist: 12
playlistlength: 1
mixrampdb: 0
state: play
song: 0
songid: 4
time: 124:2084491
elapsed: 124.224
bitrate: 128
duration: 2084490.794
audio: 48000:16:2
OK

Version

mpd --version
Music Player Daemon 0.23.14 (0.23.14)
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 smbclient udisks nfs curl

Neighbor plugins:
 smbclient 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
 [dsdiff] dff
 [dsf] dsf
 [hybrid_dsd] m4a
 [faad] aac
 [mpcdec] mpc
 [wavpack] wv
 [openmpt] mptm mod s3m xm it 669 amf ams c67 dbm digi dmf dsm dtm far imf ice j2b m15 mdl med mms mt2 mtm nst okt plm psm pt36 ptm sfx sfx2 st26 stk stm stp ult wow gdm mo3 oxm umx xpk ppm mmcmp
 [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
 [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz
 [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://
 [pcm]

Filters:
 libsamplerate soxr

Tag plugins:
 id3tag

Output plugins:
 shout null fifo sndio pipe alsa ao oss openal pipewire pulse jack httpd snapcast recorder

Encoder plugins:
 null vorbis opus lame wave flac

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

Input plugins:
 file io_uring archive alsa curl ffmpeg smbclient 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:// rtmp:// rtmpe:// rtmps:// rtmpt:// rtmpte:// rtmpts:// rtp:// rtsp:// rtsps:// scp:// sftp:// smb:// srtp://

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

Configuration

music_directory		"/home/juergen/musik/"
playlist_directory		"/var/lib/mpd/playlists"
database {
        plugin          "simple"
        path            "/var/lib/mpd/tag_cache"
        cache_directory "/var/lib/mpd/cache"
}
log_file			"/var/log/mpd/mpd.log"
pid_file			"/run/mpd/pid"
state_file			"/var/lib/mpd/state"
sticker_file                   "/var/lib/mpd/sticker.sql"
user				"mpd"
bind_to_address		"any"
bind_to_address		"/run/mpd/socket"
log_level			"verbose"
metadata_to_use "artist,album,albumartist,title,track,name,genre,date,originaldate,composer,performer,disc,musicbrainz_artistid,musicbrainz_albumid,musicbrainz_albumartistid,musicbrainz_trackid,musicbrainz_releasetrackid,musicbrainz_workid,musicbrainz_releasegroupid"
input {
        plugin "curl"
		verify_peer "yes"
		verify_host "yes"
}
input {
        enabled    "no"
        plugin     "qobuz"
}
input {
        enabled      "no"
        plugin       "tidal"
}
decoder {
        plugin                  "hybrid_dsd"
        enabled                 "no"
}
audio_output {
	type		"alsa"
	name		"My ALSA Device Local Soundcard"
}
audio_output {
	type		"httpd"
	name		"http"
	port		"8000"
	format		"44100:16:1"
	always_on	"yes"
}
audio_output {
	type		"null"
	name		"My Null Output 1"
}
audio_output {
	type		"null"
	name		"My Null Output 2"
}
audio_output {
	type		"null"
	name		"My Null Output 3"
}
filesystem_charset		"UTF-8"
neighbors {
    plugin "udisks"
}

Log

playlist: play 0:"https://liveradio.swr.de/sw282p3/swr1bw/play.mp3"
client: [0] command returned 0
curl: icy-metaint=16384
decoder_thread: probing plugin mpg123
decoder: audio_format=48000:16:2, seekable=false
@MaxKellermann
Copy link
Member

Correct duration for streams with mpg123 plugin.

What is the correct duration?

@MaxKellermann MaxKellermann added the waiting Waiting for more information from reporter label Jun 19, 2024
@jcorporation
Copy link
Member Author

With disabled mpg123 decoder playing the same stream.

status
volume: 50
repeat: 0
random: 0
single: 0
consume: 1
partition: default
playlist: 6
playlistlength: 2
mixrampdb: 0
state: play
song: 1
songid: 3
time: 100:0
elapsed: 100.044
bitrate: 128
audio: 48000:f:2
OK

Log

playlist: play 1:"https://liveradio.swr.de/sw282p3/swr1bw/play.mp3"
curl: icy-metaint=16384
decoder_thread: probing plugin ffmpeg
ffmpeg/mp3: Format mp3 probed with size=4096 and score=51
ffmpeg/mp3: Skipping 0 bytes of junk at 0.
ffmpeg: detected input format "mp3" ("MP2/3 (MPEG audio layer 2/3)")
ffmpeg/mp3: Before avformat_find_stream_info() pos: 0 bytes read:8192 seeks:0 nb_streams:1
ffmpeg/mp3: All info found
ffmpeg/mp3: stream 0: start_time: 0 duration: NOPTS
ffmpeg/mp3: format: start_time: 0 duration: NOPTS (estimate from bit rate) bitrate=128 kb/s
ffmpeg/mp3: After avformat_find_stream_info() pos: 19456 bytes read:24576 seeks:0 frames:50
ffmpeg: codec "mp3"
decoder: audio_format=48000:f:2, seekable=true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting Waiting for more information from reporter
Projects
None yet
Development

No branches or pull requests

2 participants