mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.5k stars 1.28k forks source link

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

Closed mixxxbot closed 2 years ago

mixxxbot commented 2 years ago

Reported by: danielhjames Date: 2012-06-12T10:35:03Z Status: Fix Released Importance: Medium Launchpad Issue: lp1012053 Tags: shoutcast Attachments: dynamic-ogg-metadata.patch, 1.11_dynamic-ogg-metadata.patch


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.

mixxxbot commented 2 years ago

Commented by: cantbeunseen Date: 2012-08-26T22:53:23Z


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?

mixxxbot commented 2 years ago

Commented by: cantbeunseen Date: 2012-08-27T01:53:45Z Attachments: dynamic-ogg-metadata.patch


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

mixxxbot commented 2 years ago

Commented by: danielhjames Date: 2012-08-27T08:47:11Z


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.

mixxxbot commented 2 years ago

Commented by: esbrandt Date: 2012-10-28T11:45:14Z


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

mixxxbot commented 2 years ago

Commented by: danielhjames Date: 2013-02-07T14:50:08Z


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();
mixxxbot commented 2 years ago

Commented by: cantbeunseen Date: 2013-02-07T14:59:02Z


Sorry, the patch was for 1.10 stable.

mixxxbot commented 2 years ago

Commented by: danielhjames Date: 2013-02-07T16:07:22Z


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

mixxxbot commented 2 years ago

Commented by: cantbeunseen Date: 2013-02-07T18:25:44Z Attachments: 1.11_dynamic-ogg-metadata.patch


Here's the patch for 1.11.

mixxxbot commented 2 years ago

Commented by: danielhjames Date: 2013-02-08T12:54:35Z


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.

mixxxbot commented 2 years ago

Commented by: rryan Date: 2013-02-09T02:10:34Z


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?

mixxxbot commented 2 years ago

Issue closed with status Fix Released.