Closed JustArchi closed 5 years ago
I've also reproduced the issue with httpd
plugin, so it looks once again like core-related issue and nothing to do with icecast, I've checked through the same method as in #347 and MPD itself sees metadata as duplicated:
root@archi:~# nc 127.0.0.1 6600
OK MPD 0.21.11
currentsong
file: イオシス IOSYS/2008.08.16 [IO-0146] 東方想幽森雛 [C74]/Miracle∞Hinacle.ogg
Last-Modified: 2016-10-21T07:34:35Z
Artist: イオシス IOSYS
Title: Miracle∞Hinacle
Album: 東方想幽森雛
Date: 2008-08-16
Genre: Game
Artist: イオシス IOSYS
Album: 東方想幽森雛
Title: Miracle∞Hinacle
Track: 5
Genre: Game
Date: 2008-08-16
Performer: 3L
Comment: The Road of the Misfortune God ~ Dark Road
Time: 204
duration: 204.007
Pos: 87
Id: 88
OK
next
OK
currentsong
file: UNDEAD CORPORATION/2014.12.29 [ANCO-0011] 兵-つはもの- [C87]/火車の叫ぶ夜に.ogg
Last-Modified: 2016-11-20T04:34:28Z
Artist: UNDEAD CORPORATION
Title: 火車の叫ぶ夜に
Album: 兵-つはもの-
Date: 2014
Genre: Game
Artist: UNDEAD CORPORATION
Album: 兵-つはもの-
Title: 火車の叫ぶ夜に
Track: 4
Genre: Game
Date: 2014
Comment: Lullaby of Deserted Hell
Time: 248
duration: 247.847
Pos: 106
Id: 107
OK
But somehow #347 improved the problem by broadcasting correct tags on song update, interesting.
I can't reproduce the problem. You said #347 is fixed, but now you see the same symptoms again; but what I don't understand is what is the difference. Do you only see duplicate tags with some files, or with all Opus files?
@MaxKellermann I found the problem, it's because of persistent tag_cache
database that didn't automatically get updated after the mpd update, so all previously-cached files still had old duplicate metadata, while newly added files were fine. I've manually did rm tag_cache
, started mpd and I'm no longer seeing this issue.
Perhaps it'd be a good idea to introduce some kind of "metadata_reading_module_version" variable saved in the database, so in case you modify the metadata reading capability in the mpd source, newer mpd version could automatically schedule database update by seeing older database generated.
I don't know whether this is worth the effort, considering (probably super rare) occurances of metadata reading bugs and other source-related changes that would need tag_cache
update, probably not, but you'll need to determine that yourself. In any case I'm happy with the solution and I no longer need anything to be done in regards to this issue, just pointing out why it happened and suggesting some solutions.
Thank you for your continuous support, I appreciate it a lot! 👍
Bug report
Describe the bug
This issue is very similar to bug #347 but reproducible with
audio_output
ofshout
. I'm attaching myaudio_output
config below (eradicated out of personal, non-relevant bits):In particular, the bug is about metadata duplication on the first song when streaming through icecast2. I'm playing
opus
files throughopus
stream, in case input could have something to say here.Expected Behavior
On connection to the icecast mount point during playing the first song, I should get correct non-duplicated metadata.
Actual Behavior
I'm getting duplicated metadata, but only for the first song being played. As soon as the song switches to the next one, the metadata is updated correctly. Reconnecting to the stream after the first song is played is also producing the correct metadata. Only connecting to the stream while MPD is playing the initial file causes the issue.
Not all tags are duplicated, song title, artist and album seems to, but comment looks fine.
Version
Icecast version:
Icecast 2.4.4
Log
I didn't find anything relevant in the verbose log file.
Personal thoughts
This could be related to some initial push of metadata, I'm not entirely aware how opus tags chaining works, but it seems that there are 2 mechanisms pushing the initial metadata, but only one properly updating it after the song change. Finding out the duplicated one and turning it off when
opustags
is specified should probably solve the issue, but this is only my gut as a programmer, I don't know MPD internals well enough, just trying to help pinpoint the issue.Before #347 was fixed, I was getting duplicated metadata constantly here (on first and every other played song), now it seems that it's only on initial push.
I'm attaching file sample in case you'd be unable to reproduce the issue and it depended in some way on the input files.
sample.zip
Thank you in advance for looking into the issue.