mixxxdj / mixxx

Mixxx is Free DJ software that gives you everything you need to perform live mixes.
http://mixxx.org
Other
4.4k 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: daschuer Date: 2019-03-08T20:02:58Z


Done, good finding. :-)

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-09T11:29:43Z Attachments: [Compile and log files.](https://bugs.launchpad.net/mixxx/+bug/1817395/+attachment/5244905/+files/Compile and log files.)


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?

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-12T06:18:42Z


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.

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-03-13T00:27:39Z


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?

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-14T03:35:04Z


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

mixxxbot commented 2 years ago

Commented by: daschuer Date: 2019-03-14T06:46:35Z


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

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-16T11:11:12Z


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]

mixxxbot commented 2 years ago

Commented by: tezzy Date: 2019-03-18T09:43:01Z


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]

mixxxbot commented 2 years ago

Issue closed with status Fix Released.