Mixxx not sending track metadata to shoutcast on Ubuntu

Bug #1817395 reported by Terry Belton
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
High
Daniel Schürmann

Bug Description

Operating system Ubuntu Linux 18.04.2
CPU architecture Intel i7-7700
Your video and sound hardware Asus 1060
Steps to reproduce the problem: Install fresh Ubuntu 18.04.2, compile 2.3 from git, configure shoutcast, connect, add track to deck and hit play.
Information logs: Log attached

I compiled 2.3.0-alpha-pre on a fresh Ubuntu install after reports from another DJ who us on 2.0.0 and 2.2.0 with the same problem:

Mixxx 2.3.0-alpha-pre is not sending track metadata to Shoutcast 2 servers.

The music plays fine.

An older of Mixxx on Windows send the metadata fine.

I can make a a port on my private shoutcast 2 server available to testers if needed.

Revision history for this message
Terry Belton (tezzy) wrote :
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Thank you for you support.
We get more if these reports lately.
Unfortunately we where not able to debug this, because I couldn't reproduce it and it is hard to get reliable test results from non experts users.

There the root issue is IMHO often covered or mixxed by a configuration issues. It would be great if we can isolate the root issue and detect and warn about configuration issues.

Unfortunately libshout is not very convenient here. I think we should fork it to fix this, this allows us to also add AAC support, a pending libshout Pull request.

I am on Ubuntu Xenial with my development machine, and I also have access to a Bionic device.

The first we could check if the official Ubuntu Mixxx build is effected. Next you may check the PPA versions of the Mixxx project.

Is any if these versions working?
Does you server log an suspicious things in case it doesn't work?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

I cannot see any suspicious entries in your logs.

Revision history for this message
Terry Belton (tezzy) wrote :

Thanks for your replies.

I am very happy to help you fix this.

I will connect my working Mixxx 2.0.0 (on Windows) and log those for you.

I will build stock Xenial 16.04.5 and Bionic 18.04.2 test machines, install the official Ubuntu version of Mixxx and test and log Mixxx and Shoutcast.

A simple way to test if metadata is available, is to connect a web browser to the same host and port Mixxx uses. Look on the status tab for 'Playing Now: '. On a Shoutcast2 server, there is a html5 player. Shoutcast2 is not resource hungry. When needed, it can run standalone under screen. It needs 2 ports opened in the firewall.

Revision history for this message
Terry Belton (tezzy) wrote :

My first test:

tez@U16045:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial

I did apt install mixxx from the Ubuntu repository.

tez@U16045:~$ mixxx --developer
Debug [Main]: Mixxx "2.0.0" "(git 1.12 r5772; flags: asan=0 asmlib=0 autodjcrates=1 buildtime=0 bulk=1 color=0 coreaudio=0 faad=0 ffmpeg=0 hid=1 hss1394=0 ipod=0 localecompare=1 macappstore=0 mad=1 mediafoundation=0 modplug=0 opengles=0 optimize=portable opus=1 perftools=0 perftools_profiler=0 profiling=0 qdebug=1 qt_sqlite_plugin=0 shoutcast=1 test=False vamp=1 verbose=1 vinylcontrol=1 wv=0)" is starting...

This works perfectly. Two items from the Shoutcast log:

2019-02-24 10:42:40 INFO [ADMINCGI sid=1] Title updated [ABBA - Take a Chance on Me]
2019-02-24 10:45:36 INFO [ADMINCGI sid=1] Title updated [ABBA - Voulez-Vous]

The only settings on Mixxx I changed were to add the Shoutcast server and headphones.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Great. So please backup the ~/.mixxx folder and treat this as golden reference sample.

Is this still working?
sudo add-apt-repository ppa:mixxx/mixxx

Revision history for this message
Daniel Schürmann (daschuer) wrote :

It is Mixxx 2.2.0 the first Qt5 build.

Revision history for this message
Terry Belton (tezzy) wrote :

Test #2

tez@U16045:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial

Mixxx installed from the PPA.

tez@U16045:~$ mixxx --developer
..snip..
Debug [Main]: "Mixxx" "2.2.0" "(git 2.2 r6659; built on: Dec 24 2018 @ 16:58:42; flags: asan=0 asmlib=0 battery=1 buildtime=1 bulk=1 color=0 coreaudio=0 faad=0 ffmpeg=0 hid=1 hss1394=0 ipod=0 lilv=1 localecompare=1 macappstore=0 mad=1 mediafoundation=0 modplug=0 opengles=0 optimize=portable opus=1 perftools=0 perftools_profiler=0 profiling=0 qt_sqlite_plugin=0 qtkeychain=0 shoutcast=1 test=False tsan=0 ubsan=0 vamp=1 verbose=1 vinylcontrol=1 wv=0)" is starting...

Shoutcast server logs:

2019-02-24 14:12:19 INFO [SRC 192.168.1.42:50497 sid=1] SHOUTcast 1 source connection starting.
2019-02-24 14:12:32 INFO [ADMINCGI sid=1] Title updated [ABBA - S.O.S]
2019-02-24 14:13:36 INFO [ADMINCGI sid=1] Title updated [ABBA - Take a Chance on Me]
2019-02-24 14:13:59 INFO [ADMINCGI sid=1] Title updated [ABBA - Voulez-Vous]
2019-02-24 14:14:30 DEBUG [SRC 192.168.1.42:50497 sid=1] Remote socket closed while waiting for data.
2019-02-24 14:14:30 INFO [SRC 192.168.1.42:50497 sid=1] SHOUTcast 1 source disconnected.

Everything works fine on 16.04

Revision history for this message
Daniel Schürmann (daschuer) wrote :

So it is not a Qt5 issue, right?
Do you know of any version that is failing on Xenial?

Revision history for this message
Terry Belton (tezzy) wrote :

I do not know of any version installed with apt failing on Xenal 16.04.

Everything behaved itself on my tests.

I have kept hard disk images.

I am now going to test 18.04 LTS bionic.

Revision history for this message
Terry Belton (tezzy) wrote :

Test #3

tez@U18042:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

tez@U18042:~$ mixxx --developer
Debug [Main]: Mixxx "2.0.0" "(git 1.12 r5772; flags: asan=0 asmlib=0 autodjcrates=1 buildtime=0 bulk=1 color=0 coreaudio=0 faad=0 ffmpeg=0 hid=1 hss1394=0 ipod=0 localecompare=1 macappstore=0 mad=1 mediafoundation=0 modplug=0 opengles=0 optimize=portable opus=1 perftools=0 perftools_profiler=0 profiling=0 qdebug=1 qt_sqlite_plugin=0 shoutcast=1 test=False vamp=1 verbose=1 vinylcontrol=1 wv=0)" is starting...

No track metadata is being sent to Shoutcast.

I also tried setting the Prefences > Live Broadcasting > Enable custom metadata TRUE with text in the Artist and Title boxes > Apply > OK

There are no errors on the shoutcast logs. There are no errors on the Mixxx logs.

Revision history for this message
Terry Belton (tezzy) wrote :

Shoutcast log:
tez@server:~/shoutcast$ ./sc_serv
2019-02-24 16:14:21 INFO *********************************************************************
2019-02-24 16:14:21 INFO ** SHOUTcast Distributed Network Audio Server (DNAS) **
2019-02-24 16:14:21 INFO ** Copyright (C) 2014-2019 Radionomy SA, All Rights Reserved **
2019-02-24 16:14:21 INFO *********************************************************************
2019-02-24 16:14:21 INFO [MAIN] SHOUTcast DNAS/posix(linux x64) v2.6.0.750 (Dec 7 2018)
2019-02-24 16:14:21 INFO [MAIN] PID: 27348
2019-02-24 16:14:21 INFO [MAIN] Saving log output to `/home/tez/shoutcast/logs/sc_serv.log'
2019-02-24 16:14:21 INFO [MAIN] Automatic log rotation interval: 1 day
2019-02-24 16:14:21 INFO [MAIN] Loaded config from `/home/tez/shoutcast/sc_serv.conf'
2019-02-24 16:14:21 INFO [MAIN] Calculated CPU count is 2 -> using all available CPUs
2019-02-24 16:14:21 INFO [MAIN] Limited to 1024 file descriptors [relates to ulimit -n]
2019-02-24 16:14:21 DEBUG ident is DIDCbe3701eb32ef4c2fa7f43dca7e8a3833-8000, DID is fc35e3ab4b1e06f1fc94e369fb033d8bb9cf64a8b4a65c7855daf3f809cf5
2019-02-24 16:14:21 INFO [MAIN] Starting 2 network threads
2019-02-24 16:14:21 INFO [MICROSERVER] Listening for source and client connections on port 8000
2019-02-24 16:14:21 INFO [MICROSERVER] Listening for legacy source connections on port 8001
2019-02-24 16:14:21 INFO [MICROSERVER] Flash policy file server not enabled
2019-02-24 16:15:16 INFO [SRC 192.168.1.42:51103 sid=1] SHOUTcast 1 source connection starting.

My notes 2 tracks were played no metadata sent

2019-02-24 16:16:05 DEBUG [SRC 192.168.1.42:51103 sid=1] Remote socket closed while waiting for data.
2019-02-24 16:16:05 INFO [SRC 192.168.1.42:51103 sid=1] SHOUTcast 1 source disconnected.
^C2019-02-24 16:16:20 INFO [MAIN] Exiting threads...
2019-02-24 16:16:20 INFO [BANDWIDTH] Total: 766321, Sent: 20, Recv: 766301
2019-02-24 16:16:20 INFO [MAIN] Shutdown after 1 minute 59 seconds running

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Libshout has changed from 2.3.1 to 2.4.1 in bionic.
I have just tested to install the 2.3.1 version on bionic, but it fails.
I think we need to rebuild Mixxx in this case.

I have just skimmed to the shoutcast commit https://github.com/xiph/Icecast-libshout/commits/master
but there is nothing obvious fixed since 2.4.1

Revision history for this message
Daniel Schürmann (daschuer) wrote :

I have prepared a testing PR with an internal libshout.
https://github.com/mixxxdj/mixxx/pull/2040
Unfortunately I still cannot reproduce the issue on Xenial now with libshout 2.4.1.
We hopefully can nail the issue down using this branch and additional debug messages.

Changed in mixxx:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Terry Belton (tezzy) wrote :

I would like to help test the https://github.com/mixxxdj/mixxx/pull/2040 on various Ubuntu versions.

I have no experience compiling a pull from scratch. I am keen to learn.

Do I need some special permissions to access the files?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

If you have a git clone directory like described here:

https://www.mixxx.org/wiki/doku.php/compiling_on_linux

You can bull the changes like this:

git pull https://github.com/daschuer/mixxx.git libshout_intern

If you like to become a contributor, (which would be great, because Mixxx could become a much better broadcasting tool. :-) )

You may also find this useful:
https://www.mixxx.org/wiki/doku.php/bugfix_workflow

Revision history for this message
Terry Belton (tezzy) wrote :

Thanks Daniel.

tez@U18042:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

tez@U18042:~/.mixxx$ head mixxx.log
Debug [Main]: "Mixxx" "2.3.0-alpha-pre" "(git 2.2 r6739; built on: Feb 28 2019 @ 13:48:58; flags: asan=0 battery=1 buildtime=1 bulk=1 color=0 coreaudio=0 faad=0 ffmpeg=0 hid=1 hss1394=0 lilv=1 localecompare=1 macappstore=0 mad=1 mediafoundation=0 modplug=0 opengles=0 optimize=native opus=1 perftools=0 perftools_profiler=0 profiling=0 qt_sqlite_plugin=0 qtkeychain=0 shoutcast=1 shoutcast_internal=1 test=False tsan=0 ubsan=0 verbose=1 vinylcontrol=1 wv=0)" is starting...
Debug [Main]: Compile time library versions:
Debug [Main]: Qt: 5.9.5
Debug [Main]: libshout: 2.4.1

No metadata is being sent to Shoutcast.

My tasks:

Perform a wireshark trace on working Mixxx and search HTTP POST and GET packets for the password. I know the track metadata follows password. Work out the syntax.
Use curl -v --header to inject legal packets to shoutcast.

I will look for a Mixxx flow chart. I will have a go at reading the source code. My thoughts are:

Repeat on working and broken machines:

Which module sends the metadata to libshout? How it does it? Exactly what it is sending?

Is libshout actually getting the metadata? How it does it? Exactly what is it looking for?

Find the mismatch!

Revision history for this message
Terry Belton (tezzy) wrote :

A quick Wireshark capture from Mixxx 2.0.0 on Windows laptop:

Transmission Control Protocol, Src Port: 57725, Dst Port: 8000, Seq: 1, Ack: 1, Len: 163
Hypertext Transfer Protocol
    GET /admin.cgi?mode=updinfo&pass=password&charset=&song=Depeche%20Mode%20%2d%20Master%20and%20Servant HTTP/1.0\r\n
        [Expert Info (Chat/Sequence): GET /admin.cgi?mode=updinfo&pass=password&charset=&song=Depeche%20Mode%20%2d%20Master%20and%20Servant HTTP/1.0\r\n]
        Request Method: GET
        Request URI: /admin.cgi?mode=updinfo&pass=password&charset=&song=Depeche%20Mode%20%2d%20Master%20and%20Servant
            Request URI Path: /admin.cgi
            Request URI Query: mode=updinfo&pass=password&charset=&song=Depeche%20Mode%20%2d%20Master%20and%20Servant
                Request URI Query Parameter: mode=updinfo
                Request URI Query Parameter: pass=password
                Request URI Query Parameter: charset=
                Request URI Query Parameter: song=Depeche%20Mode%20%2d%20Master%20and%20Servant
        Request Version: HTTP/1.0
    User-Agent: libshout/2.4.0 (Mozilla compatible)\r\n
    \r\n
    [HTTP request 1/1]

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Can charset=
be the issue?
What happens if you select utf8?

Revision history for this message
Daniel Schürmann (daschuer) wrote :

I can prepare the branch, that it log the requested info.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Does idjc send metadata, it is an Ubuntu package also based on libshout.
If it does, we can compare the Wireshark logs.

Revision history for this message
Terry Belton (tezzy) wrote :

A quick wireshark capture from 16.04

Frame 762: 205 bytes on wire (1640 bits), 205 bytes captured (1640 bits) on interface 0
Ethernet II, Src: Giga-Byt_3a:59:0e (50:e5:49:3a:59:0e), Dst: Dell_a3:54:33 (b8:ac:6f:a3:54:33)
Internet Protocol Version 4, Src: 192.168.1.42, Dst: 192.168.1.50
Transmission Control Protocol, Src Port: 57778, Dst Port: 8000, Seq: 1, Ack: 1, Len: 151
Hypertext Transfer Protocol
    GET /admin.cgi?mode=updinfo&pass=password&charset=UTF%2d8&song=ABBA%20%2d%20Voulez%2dVous HTTP/1.0\r\n
        [Expert Info (Chat/Sequence): GET /admin.cgi?mode=updinfo&pass=password&charset=UTF%2d8&song=ABBA%20%2d%20Voulez%2dVous HTTP/1.0\r\n]
        Request Method: GET
        Request URI: /admin.cgi?mode=updinfo&pass=password&charset=UTF%2d8&song=ABBA%20%2d%20Voulez%2dVous
            Request URI Path: /admin.cgi
            Request URI Query: mode=updinfo&pass=password&charset=UTF%2d8&song=ABBA%20%2d%20Voulez%2dVous
                Request URI Query Parameter: mode=updinfo
                Request URI Query Parameter: pass=password
                Request URI Query Parameter: charset=UTF%2d8
                Request URI Query Parameter: song=ABBA%20%2d%20Voulez%2dVous
        Request Version: HTTP/1.0
    User-Agent: libshout/2.3.1 (Mozilla compatible)\r\n
    \r\n
    [HTTP request 1/1]
    [Response in frame: 765]

Revision history for this message
Terry Belton (tezzy) wrote :

Packet from 16.04 with UTF-8 turned off.

Frame 1076: 198 bytes on wire (1584 bits), 198 bytes captured (1584 bits) on interface 0
Ethernet II, Src: Giga-Byt_3a:59:0e (50:e5:49:3a:59:0e), Dst: Dell_a3:54:33 (b8:ac:6f:a3:54:33)
Internet Protocol Version 4, Src: 192.168.1.42, Dst: 192.168.1.50
Transmission Control Protocol, Src Port: 57801, Dst Port: 8000, Seq: 1, Ack: 1, Len: 144
Hypertext Transfer Protocol
    GET /admin.cgi?mode=updinfo&pass=password&charset=&song=ABBA%20%2d%20Voulez%2dVous HTTP/1.0\r\n
        [Expert Info (Chat/Sequence): GET /admin.cgi?mode=updinfo&pass=password&charset=&song=ABBA%20%2d%20Voulez%2dVous HTTP/1.0\r\n]
        Request Method: GET
        Request URI: /admin.cgi?mode=updinfo&pass=password&charset=&song=ABBA%20%2d%20Voulez%2dVous
            Request URI Path: /admin.cgi
            Request URI Query: mode=updinfo&pass=password&charset=&song=ABBA%20%2d%20Voulez%2dVous
                Request URI Query Parameter: mode=updinfo
                Request URI Query Parameter: pass=password
                Request URI Query Parameter: charset=
                Request URI Query Parameter: song=ABBA%20%2d%20Voulez%2dVous
        Request Version: HTTP/1.0
    User-Agent: libshout/2.3.1 (Mozilla compatible)\r\n
    \r\n
    [HTTP request 1/1]
    [Response in frame: 1079]

Revision history for this message
Terry Belton (tezzy) wrote :

Last 2 16.04 captures were done with

Debug [Main]: "Mixxx" "2.2.0" "(git 2.2 r6659; built on: Dec 24 2018 @ 16:58:42; flags: asan=0 asmlib=0 battery=1 buildtime=1 bulk=1 color=0 coreaudio=0 faad=0 ffmpeg=0 hid=1 hss1394=0 ipod=0 lilv=1 localecompare=1 macappstore=0 mad=1 mediafoundation=0 modplug=0 opengles=0 optimize=portable opus=1 perftools=0 perftools_profiler=0 profiling=0 qt_sqlite_plugin=0 qtkeychain=0 shoutcast=1 test=False tsan=0 ubsan=0 vamp=1 verbose=1 vinylcontrol=1 wv=0)" is starting...
Debug [Main]: Compile time library versions:
Debug [Main]: Qt: 5.5.1
Debug [Main]: libshout: 2.3.1

Revision history for this message
Terry Belton (tezzy) wrote :

Here are the results of my idjc test on 16.04:

tez@U16045:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial

tez@U16045:~$ idjc -v
idjc 0.8.15

Wireshark capture:

Frame 2364: 189 bytes on wire (1512 bits), 189 bytes captured (1512 bits) on interface 0
Ethernet II, Src: Giga-Byt_3a:59:0e (50:e5:49:3a:59:0e), Dst: Dell_a3:54:33 (b8:ac:6f:a3:54:33)
Internet Protocol Version 4, Src: 192.168.1.42, Dst: 192.168.1.50
    0100 .... = Version: 4
    .... 0101 = Header Length: 20 bytes (5)
    Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
    Total Length: 175
    Identification: 0x6a86 (27270)
    Flags: 0x4000, Don't fragment
    Time to live: 128
    Protocol: TCP (6)
    Header checksum: 0x0000 [validation disabled]
    [Header checksum status: Unverified]
    Source: 192.168.1.42
    Destination: 192.168.1.50
Transmission Control Protocol, Src Port: 58544, Dst Port: 8000, Seq: 1, Ack: 1, Len: 135
    Source Port: 58544
    Destination Port: 8000
    [Stream index: 35]
    [TCP Segment Len: 135]
    Sequence number: 1 (relative sequence number)
    [Next sequence number: 136 (relative sequence number)]
    Acknowledgment number: 1 (relative ack number)
    0101 .... = Header Length: 20 bytes (5)
    Flags: 0x018 (PSH, ACK)
    Window size value: 2053
    [Calculated window size: 525568]
    [Window size scaling factor: 256]
    Checksum: 0x844e [unverified]
    [Checksum Status: Unverified]
    Urgent pointer: 0
    [SEQ/ACK analysis]
    [Timestamps]
    TCP payload (135 bytes)
Hypertext Transfer Protocol
    GET /admin.cgi?mode=updinfo&pass=password&song=ABBA%20%2d%20Voulez%2dVous HTTP/1.0\r\n
        [Expert Info (Chat/Sequence): GET /admin.cgi?mode=updinfo&pass=password&song=ABBA%20%2d%20Voulez%2dVous HTTP/1.0\r\n]
        Request Method: GET
        Request URI: /admin.cgi?mode=updinfo&pass=password&song=ABBA%20%2d%20Voulez%2dVous
            Request URI Path: /admin.cgi
            Request URI Query: mode=updinfo&pass=password&song=ABBA%20%2d%20Voulez%2dVous
                Request URI Query Parameter: mode=updinfo
                Request URI Query Parameter: pass=password
                Request URI Query Parameter: song=ABBA%20%2d%20Voulez%2dVous
        Request Version: HTTP/1.0
    User-Agent: libshout/2.3.1 (Mozilla compatible)\r\n
    \r\n
    [HTTP request 1/1]
    [Response in frame: 2367]

Shoutcast log:

   [ADMINCGI sid=1] Title updated [ABBA - Voulez-Vous]
2019-02-28 19:03:21 DEBUG [SRC 192.168.1.42:58006 sid=1] Remote socket closed while waiting for data.
2019-02-28 19:03:21 INFO [SRC 192.168.1.42:58006 sid=1] SHOUTcast 1 source disconnected.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Is idjc working?

I have prepared a Mixxx version without charset= field.

https://github.com/daschuer/mixxx.git libshout_intern

Revision history for this message
Terry Belton (tezzy) wrote :

Yes, idjc is working.

Ubuntu 16.04.6 LTS idjc 0.8.15

Successfully sent:

GET /admin.cgi?mode=updinfo&pass=password&song=ABBA%20%2d%20Voulez%2dVous HTTP/1.0\r\n

and shoutcast logged:

[ADMINCGI sid=1] Title updated [ABBA - Voulez-Vous]

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Comparing the strings the empty charset might be actually the issue.
GET /admin.cgi?mode=updinfo&pass=password&charset=&song=ABBA%20%2d%20Voulez%2dVous HTTP/1.0\r\n
GET /admin.cgi?mode=updinfo&pass=password &song=ABBA%20%2d%20Voulez%2dVous HTTP/1.0\r\n

Does it make a difference if you enable utf8 in broadcasting profile setting?

Revision history for this message
Terry Belton (tezzy) wrote :

All captures with Ubuntu 16.04 were correct and appear in specification.

Let me do some wireshark captures with Ubuntu 18.04.

Revision history for this message
Terry Belton (tezzy) wrote :

tez@U18042:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

tez@U18042:~$ mixxx --developer
Debug [Main]: Mixxx "2.0.0" "(git 1.12 r5772; flags: asan=0 asmlib=0 autodjcrates=1 buildtime=0 bulk=1 color=0 coreaudio=0 faad=0 ffmpeg=0 hid=1 hss1394=0 ipod=0 localecompare=1 macappstore=0 mad=1 mediafoundation=0 modplug=0 opengles=0 optimize=portable opus=1 perftools=0 perftools_profiler=0 profiling=0 qdebug=1 qt_sqlite_plugin=0 shoutcast=1 test=False vamp=1 verbose=1 vinylcontrol=1 wv=0)" is starting...

No track metadata is being sent to Shoutcast.
Wireshark capture contained 0 HTTP packets.

Revision history for this message
Terry Belton (tezzy) wrote :

tez@U18042:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

tez@U18042:~/mixxx$ sudo scons 2>&1 | tee build.log
...
scons: done building targets.

tez@U18042:~/mixxx$ ./mixxx --fullscreen --developer --loglevel trace
...
Debug [Main]: "Mixxx" "2.3.0-alpha-pre" "(git master r6739; built on: Mar 1 2019 @ 02:43:32; flags: asan=0 battery=1 buildtime=1 bulk=1 color=0 coreaudio=0 faad=0 ffmpeg=0 hid=1 hss1394=0 lilv=1 localecompare=1 macappstore=0 mad=1 mediafoundation=0 modplug=0 opengles=0 optimize=off opus=1 perftools=0 perftools_profiler=0 profiling=0 qt_sqlite_plugin=0 qtkeychain=0 shoutcast=1 shoutcast_internal=1 test=False tsan=0 ubsan=0 verbose=1 vinylcontrol=1 wv=0)" is starting...
...

Shoutcast log:
2019-03-01 01:53:01 INFO [SRC 192.168.1.42:63667 sid=1] SHOUTcast 1 source connection starting.
...
If metadata was being sent I would expect it here.
...
2019-03-01 01:53:06 DEBUG [SRC 192.168.1.42:63667 sid=1] Remote socket closed while waiting for data.
2019-03-01 01:53:06 INFO [SRC 192.168.1.42:63667 sid=1] SHOUTcast 1 source disconnected.

Full build and mixxx logs attached.

Revision history for this message
Terry Belton (tezzy) wrote :

Daniel wrote:
[quote]Does it make a difference if you enable utf8 in broadcasting profile setting?[/quote]

There is no difference if UTF-8 is enabled or disabled.

Daniel wrote:
[quote]I can prepare the branch, that it log the requested info.[/quote]

Yes please.

Revision history for this message
Terry Belton (tezzy) wrote :

I just looked at the Mixxx log in post #31 and saw:

Debug [Main]: DlgPrefBroadcast - broadcastEnabledChanged() 1
Debug [ShoutOutput 'Connection 1']: ShoutConnection - run: Starting thread
Debug [ShoutOutput 'Connection 1']: ShoutConnection - processConnect
Debug [ShoutOutput 'Connection 1']: ShoutConnection - "Connection 1" : updating from preferences
Debug [ShoutOutput 'Connection 1']: ShoutConnection - Using server URL: QUrl("//admin@192.168.1.50:8000")
Debug [ShoutOutput 'Connection 1']: CBR mode with bitrate: 128
Debug [ShoutOutput 'Connection 1']: ShoutConnection - Connection pending. Waiting...
Debug [ShoutOutput 'Connection 1']: ShoutConnection - Connection pending. Waiting...
Debug [ShoutOutput 'Connection 1']: ShoutConnection - Connection pending. Waiting...
Debug [ShoutOutput 'Connection 1']: ShoutConnection - ***********Connected to streaming server...
Debug [ShoutOutput 'Connection 1']: ShoutConnection - processConnect() returning true
Debug [Main]: keyboard press: "D"
Debug [Main]: Committing transaction on "MIXXX-1" result: true
Warning [ShoutOutput 'Connection 1']: ShoutConnection - shout_set_metadata fails with error code -1
Warning [Engine]: underflowHappened code: 6
Warning [Engine]: underflowHappened code: 24
Debug [Main]: keyboard press: "D"
Debug [Main]: DlgPrefBroadcast - broadcastEnabledChanged() 0
Debug [ShoutOutput 'Connection 1']: ShoutConnection - run: Connection disabled or failed. Disconnecting
Debug [ShoutOutput 'Connection 1']: ShoutConnection - processDisconnect()
Debug [ShoutOutput 'Connection 1']: ShoutConnection - run: Thread stopped

Revision history for this message
Terry Belton (tezzy) wrote :

I found the error messages in:

~/mixxx/src/engine/sidechain/shoutconnection.cpp

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Cool, we are getting close. I can look into it tonight. If you have time before, I suggest to place addition qDebug() or printf() calls to the code or use gdb to set bteakpoints. Do you have gdb experiences? I use eclipse and gdb for debugging

An other issue:
It looks like we utf8 encoding is broken as well. If I send a cyrilic track,
Only ?,?,... is displayed in Totem.
I cannot imagine how this should work.
The URL containing the metadata is already percent encoded, so what is the point of setting the charset.

Can you point me to a document that explains that?

Revision history for this message
Terry Belton (tezzy) wrote :

Daniel wrote:
[quote]
Cool, we are getting close. I can look into it tonight. If you have time before, I suggest to place addition qDebug() or printf() calls to the code or use gdb to set bteakpoints. Do you have gdb experiences? I use eclipse and gdb for debugging
[/quote]

I don't know how to place additional qDebug() or printf() calls to the code or use gdb to set breakpoints.
I have no eclipse or gdb experience.

Daniel wrote:
[quote]
An other issue:
It looks like we utf8 encoding is broken as well. If I send a cyrilic track,
Only ?,?,... is displayed in Totem.
I cannot imagine how this should work.
[/quote]

Can you post an example MP3 file so I can look into it?

Daniel wrote:
[quote]
The URL containing the metadata is already percent encoded, so what is the point of setting the charset.

Can you point me to a document that explains that?
[/quote]

I saw this page which looks interesting: http://ask.xmodulo.com/convert-mp3-id3-tag-encodings-linux.html

I read this paragraph: Fix Broken Characters in MP3 Song Titles and Artist Names

I looked at https://en.wikipedia.org/wiki/ID3

The point of setting the charset is because ID3v2.4
[quote https://en.wikipedia.org/wiki/ID3]
ID3v2 tags consist of a number of frames, each of which contains a piece of metadata. For example, the TIT2 frame contains the title, and the WOAR frame contains the URL of the artist's website. Frames can be up to 16MB in length, while total tag size is limited to 256MB. The internationalization problem was solved by allowing the encoding of strings not only in ISO-8859-1, but also in Unicode.[/quote]

The wikipedia article continues:

[quote]
ID3v2.4
    v2.4 was published on November 1, 2000, and remains the latest version. It allows textual data to be encoded in UTF-8, which was a common practice in earlier tags (despite the standard, since it was not supported yet) because it has several noticeable advantages over UTF-16. Another new feature allows the addition of a tag to the end of the file before other tags (like ID3v1).[18]
    No version of Windows Explorer or Windows Media Player—up to and including Windows 10 (initial release) and WMP 12, respectively—interprets ID3v2.4 tags correctly. These programs can interpret ID3v2.3 and earlier, however.[19][20] Windows Explorer finally supports reading ID3v2.4 tags with the Windows 10 Creators Update (version 1703).
[/quote]

Revision history for this message
Daniel Schürmann (daschuer) wrote :

I have just pushed another version with more debug output.
It now uses actually the internal source code. This was not the case before.

Revision history for this message
Terry Belton (tezzy) wrote :

I tried building and got an error:

lin64_build/lib/libshout/libshout_mixxx.a(tls.o): In function `tls_setup':
/home/tez/mixxx/lib/libshout/src/tls.c:68: undefined reference to `SSLeay_add_all_algorithms'
collect2: error: ld returned 1 exit status
scons: *** [lin64_build/mixxx] Error 1
scons: building terminated because of errors.

Can you take a look for me?

Log attached.

Revision history for this message
Terry Belton (tezzy) wrote :

I wrote this for a fellow DJ and thought I'd share it.

A quick change the metadata data in a browser howto:

When connected to the shoutcast server open a web browser (I used Chrome) and put the following in the address bar.

Example:

http://server.example.com:0000/admin.cgi?mode=updinfo&pass=PASSWORDsong=ARTIST%20%2d%20SONGTITLE

replace server.example.com with server
replace 0000 with the port
replace PASSWORD with your password
replace ARTIST with the Artist percent encoded (see https://en.wikipedia.org/wiki/Percent-encoding for codes)
then %20%2d%20
replace SONGTITLE with the song title percent encoded.

Revision history for this message
Terry Belton (tezzy) wrote :
Revision history for this message
Daniel Schürmann (daschuer) wrote :

try to

sudo apt-get install libogg0 libvorbis0a libtheora0 libspeex1 libssl1.1

Revision history for this message
Daniel Schürmann (daschuer) wrote :

> I missed an & out before song.

But Wireshark shows this & in all cases.

Revision history for this message
Terry Belton (tezzy) wrote :

It was a typing error in post #39.

Revision history for this message
Terry Belton (tezzy) wrote :

Daniel wrote:
[quote]
try to
sudo apt-get install libogg0 libvorbis0a libtheora0 libspeex1 libssl1.1
[/quote]

tez@U18042:~$ sudo apt-get install libogg0 libvorbis0a libtheora0 libspeex1 libssl1.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
libogg0 is already the newest version (1.3.2-1).
libspeex1 is already the newest version (1.2~rc1.2-1ubuntu2).
libtheora0 is already the newest version (1.1.1+dfsg.1-14).
libvorbis0a is already the newest version (1.3.5-4.2).
libssl1.1 is already the newest version (1.1.0g-2ubuntu4.3).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

does:

sudo apt-get install libssl1.0.0

help?

Revision history for this message
Terry Belton (tezzy) wrote :

It is already installed.

tez@U18042:~/mixxx$ sudo apt-get install libssl1.0.0
[sudo] password for tez:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libssl1.0.0 is already the newest version (1.0.2n-1ubuntu5.3).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

I have updated the branch. Maybe it builds now.

Revision history for this message
Terry Belton (tezzy) wrote :

Sorry, I got some more build errors.

g++ -o lin64_build/mixxx -Wl,-rpath,/usr/lib/x86_64-linux-gnu -L/usr/lib/x86_64-linux-gnu -pthread -Wl,-rpath=/usr/lib/x86_64-linux-gnu lin64_build/res/qrc_mixxx.o lin64_build/src/main.o -Llin64_build/lib/soundtouch -Llib/soundtouch -Llin64_build/lib/libshout lin64_build/libmixxx.a -lX11 -lportaudio -lasound -lm -lporttime -lportmidi -lQt5X11Extras -lQt5Concurrent -lQt5Network -lQt5OpenGL -lQt5Script -lQt5ScriptTools -lQt5Sql -lQt5Svg -lQt5Test -lQt5Widgets -lQt5Gui -lQt5Xml -lQt5DBus -lQt5Core -lsndfile -lFLAC -lvorbisfile -lvorbis -logg -lvorbisenc -lGL -lGLU -ltag -lprotobuf-lite -lchromaprint -lrubberband -lmp3lame -lmad -lid3tag -lpthread -lrt -lusb-1.0 -lusb-1.0 -lopusfile -lopus -lsqlite3 -llilv-0 -lupower-glib -lgobject-2.0 -lglib-2.0 -lsoundtouch -lshout_mixxx -logg -lvorbis -ltheora -lspeex -l:libssl.so.1.0.0 -l:libcrypto.so.1.0.0
lin64_build/lib/libshout/libshout_mixxx.a(tls.o): In function `tls_setup_process':
/home/tez/mixxx/lib/libshout/src/tls.c:200: undefined reference to `SSL_is_init_finished'
/home/tez/mixxx/lib/libshout/src/tls.c:203: undefined reference to `SSL_is_init_finished'
lin64_build/lib/libshout/libshout_mixxx.a(tls.o): In function `tls_setup':
/home/tez/mixxx/lib/libshout/src/tls.c:66: undefined reference to `OPENSSL_init_ssl'
/home/tez/mixxx/lib/libshout/src/tls.c:67: undefined reference to `OPENSSL_init_ssl'
/home/tez/mixxx/lib/libshout/src/tls.c:68: undefined reference to `SSLeay_add_all_algorithms'
/home/tez/mixxx/lib/libshout/src/tls.c:69: undefined reference to `OPENSSL_init_ssl'
collect2: error: ld returned 1 exit status
scons: *** [lin64_build/mixxx] Error 1
scons: building terminated because of errors.

While it was building I did some web searches for:
undefined reference to SSLeay_add_all_algorithms

I found these pages:

https://github.com/openwrt/packages/blob/master/libs/libshout/patches/150-openssl-1.1.patch

The API has changed between 1.0.0 and 1.1.0 of libssl

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228942

https://<email address hidden>/msg1094286.html

"s_server.c:291:2: warning: implicit declaration of function
'SSLeay_add_all_algorithms' is invalid in C99 [-Wimplicit-function-declaration]
        apps_startup();
        ^
./apps.h:124:43: note: expanded from macro 'apps_startup'
# define apps_startup() do_pipe_sig(); SSLeay_add_all_algorithms();
                                               ^
s_server.c:407:11: warning: implicit declaration of function
'SSLv2_server_method' is invalid in C99 [-Wimplicit-function-declaration]"

Was change of compiler or build options after Ubuntu 16.04?

Revision history for this message
Terry Belton (tezzy) wrote :

Please check this out - the last entry:

https://gitlab.xiph.org/xiph/icecast-libshout/issues/2299

[quote]
Andreas @asturm · 6 months ago

I've just successfully built libshout-2.4.1 against openssl-1.1 using this patch from Debian:

https://sources.debian.org/patches/libshout/2.4.1-2/01-libshout-tls-compile-with-OpenSSL-1.1.0.patch/
[/quote]

Can you please:
Restore the openssl1.1 source code?
Apply the Debian patch to the libshout2.4.1 source code?

I believe Mixxx will successfully compile.

I can then pull and compile.

Revision history for this message
Terry Belton (tezzy) wrote :
Revision history for this message
Daniel Schürmann (daschuer) wrote :

Done, good finding. :-)

Revision history for this message
Terry Belton (tezzy) wrote :

I compiled on a fresh Ubuntu 18.04 install without an error.

sudo scons -j 4 2>&1 | tee build.log

I started mixxx, set the library folder and broadcasting settings and exited. 01run.log

./mixxx -f --developer --loglevel trace 2>&1 | tee 02run.log
...
Debug [Main]: "Mixxx" "2.3.0-alpha-pre" "(git master r6743; built on: Mar 9 2019 @ 07:20:46; flags: a$
Debug [Main]: Compile time library versions:
Debug [Main]: Qt: 5.9.5
Debug [Main]: libshout: 2.4.1
Debug [Main]: PortAudio: 1246720 PortAudio V19.6.0-devel, revision 396fe4b6699ae929d3a685b3ef8a7e97396$
Debug [Main]: RubberBand: 1.8.1
Debug [Main]: SoundTouch: 2.1.1
Debug [Main]: TagLib: 1.11.1
Debug [Main]: ChromaPrint: 1.4.3
Debug [Main]: Vorbis: Xiph.Org libVorbis 1.3.5
Debug [Main]: libsndfile: libsndfile-1.0.28
Debug [Main]: FLAC: 1.3.2
Debug [Main]: libmp3lame: 3.100
Debug [Main]: QStandardPaths::writableLocation(HomeLocation): "/home/tez"
Debug [Main]: QStandardPaths::writableLocation(DataLocation): "/home/tez/.local/share/Mixxx"
Debug [Main]: QCoreApplication::applicationDirPath() "/home/tez/mixxx"
Debug [Main]: Loading resources from "/home/tez/mixxx/res/"
...
Debug [ShoutOutput 'Connection 1']: ShoutConnection - run: Starting thread
Debug [ShoutOutput 'Connection 1']: ShoutConnection - processConnect
Debug [ShoutOutput 'Connection 1']: ShoutConnection - "Connection 1" : updating from preferences
Debug [ShoutOutput 'Connection 1']: ShoutConnection - Using server URL: QUrl("//192.168.1.50:8000")
Debug [ShoutOutput 'Connection 1']: CBR mode with bitrate: 128
Debug [ShoutOutput 'Connection 1']: ShoutConnection - Connection pending. Waiting...
Debug [ShoutOutput 'Connection 1']: ShoutConnection - Connection pending. Waiting...
Debug [ShoutOutput 'Connection 1']: ShoutConnection - Connection pending. Waiting...
Debug [ShoutOutput 'Connection 1']: ShoutConnection - ***********Connected to streaming server...
Debug [ShoutOutput 'Connection 1']: ShoutConnection - processConnect() returning true
Debug [Main]: keyboard press: "D"
Debug [Main]: Committing transaction on "MIXXX-1" result: true
Warning [ShoutOutput 'Connection 1']: ShoutConnection - shout_set_metadata fails with error code -1 1
...

The connection was succesful.
No metadata was sent to Shoutcast.

I had another look at thehttps://bugs.launchpad.net/mixxx/+bug/1817395/+attachment/5241090/+files/mixxx.log source code ~/mixxx/src/engine/sidechain/shoutconnection.cpp

Line 846 reads:
                kLogger.warning() << "shout_set_metadata fails with error code" << ret << shout_get_tls(m_pShout);

I suspect a bad variable between lines 790 and 846.

Can you please check the variables between lines 790 and 846 in shoutconnection.cpp?

Revision history for this message
Terry Belton (tezzy) wrote :

A test on of Mixxx 2.3.0-alpha-pre git master r6743 Ubuntu 16.04 works fine.

tez@1604:~/mixxx$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial

git clone https://github.com/mixxxdj/mixxx.git
scons -j 4 optimize=off

Mixxx did not create a log file in ~/.mixxx/mixxx.log so I used tee.

I tried with and without UTF-8 enabled. Both worked correctly.

tez@1604:~/mixxx$ ./mixxx --developer --loglevel trace 2>&1 | tee mixxx.log
...
Debug [Main]: "Mixxx" "2.3.0-alpha-pre" "(git master r6743; built on: Mar 12 2019 @ 02:49:54; flags: asan=0 battery=1 buildtime=1 bulk=1 color=0 coreaudio=0 faad=0 ffmpeg=0 hid=1 hss1394=0 lilv=1 localecompare=1 macappstore=0 mad=1 mediafoundation=0 modplug=0 opengles=0 optimize=off opus=1 perftools=0 perftools_profiler=0 profiling=0 qt_sqlite_plugin=0 qtkeychain=0 shoutcast=1 test=False tsan=0 ubsan=0 verbose=1 vinylcontrol=1 wv=0)" is starting...
Debug [Main]: Compile time library versions:
Debug [Main]: Qt: 5.5.1
Debug [Main]: libshout: 2.3.1
Debug [Main]: PortAudio: 1899 PortAudio V19-devel (built Aug 11 2015 07:04:31)
Debug [Main]: RubberBand: 1.8.1
Debug [Main]: SoundTouch: 2.1.1
Debug [Main]: TagLib: 1.9.1
Debug [Main]: ChromaPrint: 1.2.0
Debug [Main]: Vorbis: Xiph.Org libVorbis 1.3.5
Debug [Main]: libsndfile: libsndfile-1.0.25
Debug [Main]: FLAC: 1.3.1
Debug [Main]: libmp3lame: 3.99.5
Debug [Main]: QStandardPaths::writableLocation(HomeLocation): "/home/tez"
Debug [Main]: QStandardPaths::writableLocation(DataLocation): "/home/tez/.local/share/Mixxx"
Debug [Main]: QCoreApplication::applicationDirPath() "/home/tez/mixxx"
Debug [Main]: Loading resources from "/home/tez/mixxx/res/"
Debug [StatsManager]: StatsManager thread starting up.
Debug [Main]: Configuration file is at the current version 2.3.0-alpha-pre
Info [Main]: BroadcastSettings - Found 1 profile(s)
Debug [Main]: Loading resources from "/home/tez/mixxx/res/"
Debug [Main]: "/home/tez/mixxx/res/keyboard/en_GB.kbd.cfg" not found, using en_US.kbd.cfg
Debug [Main]: Loading resources from "/home/tez/mixxx/res/"
Debug [Main]: Loading translations for locale "en_GB" from translations folder "/home/tez/mixxx/res/translations/" : success
Debug [Main]: Loading resources from "/home/tez/mixxx/res/"
...

Shoutcast log:

2019-03-12 02:55:30 INFO [MAIN] SHOUTcast DNAS/posix(linux x64) v2.6.0.750 (Dec 7 2018)
...
2019-03-12 04:22:33 INFO [SRC 192.168.1.42:54260 sid=1] SHOUTcast 1 source connection starting.
2019-03-12 04:22:43 INFO [ADMINCGI sid=1] Title updated [ABBA - Voulez-Vous]
2019-03-12 04:23:06 INFO [ADMINCGI sid=1] Title updated [ABBA - Waterloo]
2019-03-12 04:23:14 INFO [SRC 192.168.1.42:54260 sid=1] SHOUTcast 1 source disconnected.

I will compare the files in 16.04 and 18.04 next.

Revision history for this message
Daniel Schürmann (daschuer) wrote :

The shout_get_tls(m_pShout) is just some more debug info.

I am now connected via a different internet connection and I can luckily reproduce the issue.

And if I explicit disable tls it works.
shout_set_tls(m_pShout, SHOUT_TLS_DISABLED)

By default it is set to Auto, but the Auto mode somehow fails.

Can you confirm the issue?

Revision history for this message
Terry Belton (tezzy) wrote :

Fresh Ubuntu 18.04 install.
Fresh git install.

git pull https://github.com/daschuer/mixxx.git libshout_intern
sudo scons -j 4 optimize=off 2>&1 | tee sconsbuild.log

tez@U18042:~/mixxx$ grep -Ri "shout_set_tls(m_pShout, SHOUT_TLS_DISABLED)"
src/engine/sidechain/shoutconnection.cpp: if (shout_set_tls(m_pShout, SHOUT_TLS_DISABLED) != SHOUTERR_SUCCESS) {

./mixxx --developer --loglevel trace 2>&1 | tee mixxx01.log
...
hout_open() ######################################
shout_set_metadata() ######################################
######################################
GET /admin.cgi?mode=updinfo&pass=password&charset=UTF%2d8&song=Level%2042%20%2d%20Hot%20Water HTTP/1.0
User-Agent: libshout/2.4.1 (Mozilla compatible)
...

Shoutcast log:
2019-03-14 02:16:13 INFO [ADMINCGI sid=1] Title updated [Level 42 - Hot Water]

Metadata is now being sent!

Thank you very much for your help.

Please take a look at this: It gets interesting from RJ Skerry-Ryan (rryan) comments from post #42.

https://bugs.launchpad.net/mixxx/+bug/1544739/comments/42

Revision history for this message
Daniel Schürmann (daschuer) wrote :

Great news and Thank you very much for your help.
I have prepared a PR on top of Mixxx 2.1
https://github.com/mixxxdj/mixxx/pull/2055

Revision history for this message
Terry Belton (tezzy) wrote :

Success!

I manually applied your patch to src/engine/sidechain/shoutconnection.cpp in a clean pull of Mixxx 2.2. on Ubuntu 18.04

I played a track:

Shoutcast log:
2019-03-16 06:01:59 INFO [ADMINCGI sid=1] Title updated [ABBA - Voulez-Vous]

Revision history for this message
Terry Belton (tezzy) wrote :

I manually applied your patch to src/engine/sidechain/shoutconnection.cpp in a clean pull of Mixxx 2.2. on UbuntuSTUDIO 18.10. People use Studio because of the low latency kernel.

That worked perfectly, sending the correct metadata to Shoutcast2:

2019-03-18 09:21:11 INFO [ADMINCGI sid=1] Title updated [ABBA - Waterloo]

Changed in mixxx:
milestone: none → 2.1.8
status: Confirmed → Fix Released
assignee: nobody → Daniel Schürmann (daschuer)
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

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