mixxxdj / mixxx

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

Mixxx not sending track metadata to shoutcast on Ubuntu #9599

Closed mixxxbot closed 2 years ago

mixxxbot commented 2 years ago

Reported by: tezzy Date: 2019-02-23T06:36:14Z Status: Fix Released Importance: High Launchpad Issue: lp1817395 Tags: metadata, shoutcast, tags Attachments: [Log file](https://bugs.launchpad.net/bugs/1817395/+attachment/5241090/+files/Log file), [.mixxx folder Ubuntu 18.04 stock install](https://bugs.launchpad.net/bugs/1817395/+attachment/5241333/+files/.mixxx folder Ubuntu 18.04 stock install), [Build and console logs](https://bugs.launchpad.net/bugs/1817395/+attachment/5242510/+files/Build and console logs), [Scons build log with errors.](https://bugs.launchpad.net/bugs/1817395/+attachment/5242727/+files/Scons build log with errors.), [Patched tls.c for libshout-tls-compile-with-OpenSSL-1.1.0](https://bugs.launchpad.net/bugs/1817395/+attachment/5244373/+files/Patched tls.c for libshout-tls-compile-with-OpenSSL-1.1.0), [Compile and log files.](https://bugs.launchpad.net/bugs/1817395/+attachment/5244905/+files/Compile and log files.)


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.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-23T06:36:14Z Attachments: [Log file](https://bugs.launchpad.net/mixxx/+bug/1817395/+attachment/5241090/+files/Log file)

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-23T12:46:05Z


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?

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-23T12:50:26Z


I cannot see any suspicious entries in your logs.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-23T14:29:58Z


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.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-24T11:05:27Z


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.

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-24T11:40:18Z


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

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-24T11:41:09Z


It is Mixxx 2.2.0 the first Qt5 build.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-24T14:29:45Z


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

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-24T14:46:39Z


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

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-24T15:08:09Z


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.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-24T16:06:36Z Attachments: [.mixxx folder Ubuntu 18.04 stock install](https://bugs.launchpad.net/mixxx/+bug/1817395/+attachment/5241333/+files/.mixxx folder Ubuntu 18.04 stock install)


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.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-24T16:19:12Z


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

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-24T20:27:03Z


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

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-25T00:42:02Z


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.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-28T09:26:08Z


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?

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-28T10:36:08Z


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

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-28T16:53:57Z


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!

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-28T17:18:59Z


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]
mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-28T17:23:27Z


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

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-28T17:24:04Z


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

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-28T17:27:27Z


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

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-28T17:37:04Z


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]
mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-28T17:42:07Z


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]
mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-28T17:46:27Z


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

Commented by: tezzy Date: 2019-02-28T19:07:11Z


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.

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-28T22:28:55Z


Is idjc working?

I have prepared a Mixxx version without charset= field.

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

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-28T22:46:47Z


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]

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-02-28T23:01:31Z


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?

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-02-28T23:23:25Z


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

Let me do some wireshark captures with Ubuntu 18.04.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-01T03:08:30Z


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.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-01T04:05:43Z Attachments: [Build and console logs](https://bugs.launchpad.net/mixxx/+bug/1817395/+attachment/5242510/+files/Build and console logs)


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.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-01T04:46:34Z


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.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-01T05:50:28Z


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

Commented by: tezzy Date: 2019-03-01T06:36:52Z


I found the error messages in:

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

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-03-01T07:34:05Z


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?

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-01T16:50:59Z


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]

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-03-01T22:56:41Z


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

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-02T01:19:26Z Attachments: [Scons build log with errors.](https://bugs.launchpad.net/mixxx/+bug/1817395/+attachment/5242727/+files/Scons build log with errors.)


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 toSSLeay_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.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-02T03:46:44Z


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.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-02T04:14:35Z


Should read:

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

I missed an & out before song.

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-03-02T06:40:48Z


try to

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

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-03-02T06:42:32Z


I missed an & out before song.

But Wireshark shows this & in all cases.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-02T07:05:07Z


It was a typing error in post #⁠39.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-02T07:41:07Z


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.
mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-03-03T00:31:17Z


does:

sudo apt-get install libssl1.0.0

help?

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-03T00:43:34Z


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.
mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-03-03T14:31:50Z


I have updated the branch. Maybe it builds now.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-04T08:53:45Z


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 toSSL_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 functiontls_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 toOPENSSL_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 toOPENSSL_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?

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-07T12:07:14Z Attachments: [Patched tls.c for libshout-tls-compile-with-OpenSSL-1.1.0](https://bugs.launchpad.net/mixxx/+bug/1817395/+attachment/5244373/+files/Patched tls.c for libshout-tls-compile-with-OpenSSL-1.1.0)


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.

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-07T20:05:59Z


Patched file on the Debian site:

https://sources.debian.org/src/libshout/2.4.1-2/src/tls.c/