#71 IDJC 0.8.15/GIT: Stream Metadata not converted as set

v1.0 (example)
closed-fixed
nobody
None
5
2015-03-23
2014-05-11
Moonbase
No

In Output/Stream/Configuration/Format, I have set (for my Shoutcast server):
MPEG, MP3, V1, 44100 Hz, 128 kHz, Joint Stereo, Quality 2, Metadata Latin1, Resample Quality Medium, Pregain 0 dB.

My (MP3) metadata within the audio files is ID3v2 using ISO-8859-1 encoding (for compatibility reasons).

It still seems the Shoutcast server is getting UTF-8 metadata. The stream display page on our web site has ISO-8859-1 encoding and shows playing titles like this:

Ernst Frosch & die Original Oberkellner - Mönche mögen's heiß

instead of:
Ernst Frosch & die Original Oberkellner - Mönche mögen's heiß

Would be great if this metadata conversion-while-streaming-feature could be reinstated, it is one of the real goodies in IDJC.

Discussion

  • Stephen Fairchild

    Shoutcast 2 servers convert Latin1 metadata to UTF-8.

     
  • Moonbase

    Moonbase - 2014-05-11

    Good to know … the one we use ist still v1.9.8/Linux, though … I might have to investigate further. Is there any way to easily debug what's sent to the server?

     
  • Stephen Fairchild

    It's not enough to select a different encoding. You also have to wait for the song title to change.

     
  • Stephen Fairchild

    Fixed in git sources: the encoding setting now works on the current metadata. Before this it would only affect future metadata.

     
  • Moonbase

    Moonbase - 2014-05-12

    Will try to test this evening, thanks.

     
  • Moonbase

    Moonbase - 2014-05-12

    Freshly cloned & compiled, seems it still sends UTF-8 metadata to the server? Below is what I got in the terminal log.

    So at a first glance, I'd say it's okay what IDJC does … maybe I have to debug the displaying PHP code on the web site, wonder if THAT messes things up somehow. The Shoutcast page on the server at least shows the metadata correct.

    Thanks for your continued help, will give further feedback.

    encoder_start: initiating resampler(s)
    encoder_start: successfully started the encoder
    streamer_connect: established connection to the server
    streamer_main: connected to server - awaiting serial 1800796261
    live_mp3_encoder_main: flushing 547 bytes
    streamer_main: packet is metadata: <Unknown> - <Unknown>
    Toggle ON recieved for signal: Play
    player_startup left
    Seek time is 0 seconds
    final gain value of 1.180000 dB
    mp3decode_reg: configuring resampler
    player context id is 1
    
    track_metadata_changed called and signal emitted
    updated song metadata successfully
    song title: Ernst Frosch & die Original Oberkellner - Mönche mögen's heiß - (Die schrägsten Titel 41)
    
    Player has started
    streamer_main: packet is metadata: Ernst Frosch & die Original Oberkellner - M�nche m�gen's hei
    server http://streamplus31.leonex.de:35196 has 0 listeners
    
     
  • Moonbase

    Moonbase - 2014-05-13

    The TITLE metadata sent to the Shoutcast server is now correct. But … it seems that at least Shoutcast DNAS 1.9.8/Linux NEEDS ALL metadata in ISO-8859-1 encoding.

    Meaning, the fields in the "Stream info" tab also need to be converted to the stream's selected character set!

    If I select UTF-8 for metadata on a Shoutcast server, it's XML output cannot be generated anymore – a feature many of us use to get stream information, like in:

    http://streamplus31.leonex.de:35196/admin.cgi?pass=******&mode=viewxml
    

    With your latest change, if I set Metadata to "Latin1", all title information gets correctly converted to ISO-8859-1, and the DNAS server in return generates a valid XML file (partial listing):

    <SONG>
      <PLAYEDAT>1400012183</PLAYEDAT>
      <TITLE>Ernst Frosch & die Original Oberkellner - Mönche mögen's heiß</TITLE>
    </SONG>
    

    But as soon as I set, say, a DJ Name with umlauts (like "Jürgen Willumeit") or use any non-ASCII characters, the XML file gets malformed and unparseable or produces a wrong transformation into UTF-8:

    <SHOUTCASTSERVER>
      <CURRENTLISTENERS>0</CURRENTLISTENERS>
      <PEAKLISTENERS>4</PEAKLISTENERS>
      <MAXLISTENERS>5</MAXLISTENERS>
      <REPORTEDLISTENERS>0</REPORTEDLISTENERS>
      <AVERAGETIME>386</AVERAGETIME>
      <SERVERGENRE>Rock/Metal/Gothic</SERVERGENRE>
      <SERVERURL>http://www.radio-paranoid.net/</SERVERURL>
      <SERVERTITLE>Radio Paranoid - Moonbase - Das Ü-Ei</SERVERTITLE>
      <SONGTITLE>Little Big Horn - Name of the Game</SONGTITLE>

    In this case, I put "Radio Paranoid - Moonbase - Das Ü-Ei" into the DJ Name field, and the XML (UTF-8) representation became "… Das Ü-Ei". Really seems to me that Shoutcast NEEDS to be fed ISO-8859-1 only. Since we can only INPUT that stuff in UTF-8 (the system code page), more character set conversion needed. Sigh.

    Btw, this happens when I set Metadata to UTF-8 (sorry, German browser, means "XML not well formed"):

    XML-Verarbeitungsfehler: nicht wohlgeformt
    Adresse: http://streamplus31.leonex.de:35196/admin.cgi?pass=******&mode=viewxml
    Zeile Nr. 1, Spalte 2409:<?xml version="1.0" standalone="yes" ?><!DOCTYPE SHOUTCASTSERVER [<!ELEMENT SHOUTCASTSERVER
    
    <SONGTITLE>Udo Lindenberg - &#xC3;￿&#xC3;&#x96;&#xC3;&#x9C; &#xC3;&#xC3;&#xB6;&#xC3;&#xBC; &#xC3;&#x9F;</SONGTITLE></SHOUTCASTSERVER>
    

    Which, in turn, leads to not being able to display station & song information using Shoutcast's XML data …

     
  • Stephen Fairchild

    I added an extra widget to let the user select latin1 encoding. It's in "Extra Shoutcast". For icecast the static metadata encoding depends on whether the stream format is Ogg or MPEG.

     
  • Moonbase

    Moonbase - 2014-05-15

    Great, will test tonight. I actually set up a test Icecast server in the meantime, so that we can verify that nothing gets messed up. Unfortunately, the majority of commercial stream hosters still use Shoutcast 1, Shoutcast 2 is in the pipeline (and might handle things differently), and then we have Icecast (my personal favourite anyway).

     
  • Moonbase

    Moonbase - 2014-05-17

    Took a while, sorry, but works just fantastic with SHOUTcast 1 servers. Thanks!

    Unfortunately, I had no time yet to test it with Icecast and/or Shoutcast 2. Will try one of the next days …

     
  • Moonbase

    Moonbase - 2014-05-18

    I did some more testing against a Shoutcast 1.9.8 server, with "Use ISO-8859-1 encoding for fixed metadata" set in IDJC, and some variations of ID3-tagged files:

    • MP3 tagged using ID3 v2.3.0 with ISO-8859-1 metadata
    • MP3 tagged using ID3 v2.3.0 with windows-1252 metadata, specified as ISO-8859-1
    • MP3 tagged using ID3 v2.3.0 with UTF-16 metadata
    • MP3 tagged using ID3 v2.4.0 with UTF-8 metadata

    All worked as expected (the UTF-tagged files of course losing the "Œœ" characters because these are not specified in ISO-8859-1). Part of the results you can see here (shown as presented by my "OnAir v1.2" software).

    Metadata Test Suite

    I also varied the server title using umlaut characters (which misbehaved before).

    Apart from the web site display, I used the following stream clients for testing:

    Linux:

    • Amarok
    • Audacious
    • Banshee
    • XBMC
    • Logitech SqueezeCentre

    Windows:

    • VLC
    • Winamp 5.666
    • Windows Media Player 11 (displays wrong characters, but this player is faulty)
    • XBMC

    Except for Windows Media Player (which is rubbish anyway), all displayed the correct characters. So as you can see, all is well. :-)

     
  • Stephen Fairchild

    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks