Mixxx Artist/Title metadata is not shown in Icecast 2 when using ogg source stream

Bug #1012053 reported by Daniel James
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
Medium
Nimatek

Bug Description

When streaming in Ogg format from Mixxx 1.10.0 x64 to Icecast 2.3.2 on Ubuntu Lucid amd64, the Artist/Title metadata does not appear on the Icecast2 Status page. Other metadata (Stream Title, Stream Description, Stream Genre, Stream URL) is displayed as expected.

Switching to MP3 format for the stream from Mixxx to Icecast 2 makes all the metadata appear, including Artist/Title (Current Song in Icecast 2). So the issue seems specific to Ogg streams.

Possibly this is by design because of the known issue with some stream players (e.g. some versions of VLC) disconnecting from the stream when a new Ogg track is notified via metadata. (Airtime makes Ogg metadata send optional for this reason).

Using a different streaming client (IDJC) the Title/Artist data is sent correctly to Icecast 2 for Ogg streams. So this does not seem to be an Icecast 2 bug.

Tags: shoutcast

Related branches

RJ Skerry-Ryan (rryan)
Changed in mixxx:
importance: Undecided → Medium
tags: added: shoutcast
Revision history for this message
Nimatek (cantbeunseen) wrote :

The comment in the function responsible for setting shoutcast metadata says:
"If track has changed and static metadata is disabled Send new metadata to shoutcast!
This works only for MP3 streams properly as stated in comments, see shout.h
WARNING: Changing OGG metadata dynamically by using shout_set_metadata will cause stream interruptions to listeners"

I didn't notice those interruptions after building Mixxx with metadata updates for OGG streams and streaming a playlist, but they're probably there and unacceptable for certain use cases. An option for enabling this would be nice though. Wishlist?

Revision history for this message
Nimatek (cantbeunseen) wrote :

Well, here's a patch to enable this functionality.

Revision history for this message
Daniel James (daniel-64studio) wrote :

Hi Nimatek, the issue with stream interruptions only affects certain buggy .ogg players which treat new metadata for Artist/Title as the start of a new stream, and disconnect the existing stream. Unfortunately this problem seems to be widespread among .ogg clients, so it is probably best to make sending artist/title metadata optional, as you say.

Revision history for this message
jus (jus) wrote :

Anybody tried Nimatek`s patch?
Would be dumb to let a useful fix rot.

jus (jus)
Changed in mixxx:
assignee: nobody → Nimatek (cantbeunseen)
status: New → In Progress
Revision history for this message
Daniel James (daniel-64studio) wrote :

I tried to apply the patch to mixxx 1.11.0-beta2 tarball but two of the hunks did not apply cleanly - here are the rejects:

--- src/engine/engineshoutcast.cpp 2012-06-25 19:59:54 +0000
+++ src/engine/engineshoutcast.cpp 2012-08-27 01:18:01 +0000
@@ -59,7 +59,8 @@
           m_format_is_ov(false),
           m_protocol_is_icecast1(false),
           m_protocol_is_icecast2(false),
- m_protocol_is_shoutcast(false) {
+ m_protocol_is_shoutcast(false),
+ m_ogg_dynamic_update(false) {
     m_pShoutcastNeedUpdateFromPrefs = new ControlObject(
         ConfigKey("[Shoutcast]","update_from_prefs"));
     m_pUpdateShoutcastFromPrefs = new ControlObjectThreadMain(
@@ -162,6 +164,8 @@
     QByteArray baBitrate = m_pConfig->getValueString(ConfigKey(SHOUTCAST_PREF_KEY,"bitrate")).toLatin1();
     bool bStreamPublic = static_cast<bool>(m_pConfig->getValueString(ConfigKey(SHOUTCAST_PREF_KEY,"stream_public")).toInt());

+ m_ogg_dynamic_update = (bool)m_pConfig->getValueString(ConfigKey(SHOUTCAST_PREF_KEY,"ogg_dynamicupdate")).toInt();
+
     QByteArray baFormat = m_pConfig->getValueString(ConfigKey(SHOUTCAST_PREF_KEY,"format")).toLatin1();

     m_custom_metadata = (bool)m_pConfig->getValueString(ConfigKey(SHOUTCAST_PREF_KEY,"enable_metadata")).toInt();

Revision history for this message
Nimatek (cantbeunseen) wrote :

Sorry, the patch was for 1.10 stable.

Revision history for this message
Daniel James (daniel-64studio) wrote :

No problem, I think the addition of:

m_ogg_dynamic_update(false) {

just failed because of a change in line number, it is the other bit:

m_ogg_dynamic_update = (bool)m_pConfig->getValueString(ConfigKey(SHOUTCAST_PREF_KEY,"ogg_dynamicupdate")).toInt();

that is more tricky because the lines around this part of the file appear to have changed since 1.10. If you have an idea how that can be fixed, I can give the patch another shot.

Thanks!

Daniel

Revision history for this message
Nimatek (cantbeunseen) wrote :

Here's the patch for 1.11.

Revision history for this message
Daniel James (daniel-64studio) wrote :

Patch works great against 1.11.0-beta2 source when using Icecast 2.3.2, thanks! Can this patch go into 1.11 final?

Just as notes for anyone else who wants to try this patch, after checking the 'Dynamically update Ogg metadata' box, you need to disconnect from and reconnect to icecast to see the change. Also the icecast admin interface has a little latency compared to the actual track being played by Mixxx, but it does catch up.

RJ Skerry-Ryan (rryan)
Changed in mixxx:
milestone: none → 1.11.0
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Cleaned up the language a little bit and added a tooltip explaining why Ogg Vorbis normally does not update dynamically. Committed to lp:mixxx/1.11 r3717. Thanks Nimatek!

Could you please sign the Mixxx contributor agreement? This gives us permission to distribute your changes with Mixxx.

https://docs.google.com/a/mixxx.org/spreadsheet/viewform?formkey=dEpYN2NkVEFnWWQzbkFfM0ZYYUZ5X2c6MQ#gid=0

What name would you like to be credit as in the Mixxx credits?

Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6523

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.