Old 15th September 2011, 19:46   #1
cgaubuchon
Junior Member
 
Join Date: Sep 2011
Posts: 4
Next Song incorrect when playlist script runs

Have a playlist that is running a php script and returning the full paths of 3 mp3s from a mySQL database (mp3s have been tested and play fine in regular playlist).

Navigating directly to the php script in a browser returns the correct string, 3 song paths all followed by a carriage return and new line commands, each mp3 path on it's own line. The first song listed plays perfectly and displays correctly on the SHOUTcast Administrator page but the "next song" field always displays the name of the script rather than the next song in the queue (script is titled getPlaylistSongs.php). Below is the sc_trans output having playlistdebug=1

Been playing around and searching all over for something to solve this and have no luck since searching anything having to do with playlist and scripts returns results for v1 'now playing' scripts instead of this issue.

Much thanks.

sc_trans output:

Quote:
2011-09-15 14:19:51 I msg:<***> Logger startup
2011-09-15 14:19:51 I msg:<***> version 2.0.0.51
2011-09-15 14:19:51 D msg:<***>
2011-09-15 14:19:51 I msg:***************************************************************
2011-09-15 14:19:51 I msg:** TRANScast Distributed Network Audio Content Provider
2011-09-15 14:19:51 I msg:** Copyright (C) 2000-2011 Nullsoft, Inc. All Rights Reserved.
2011-09-15 14:19:51 I msg:** Use "sc_trans filename.conf" to specify a config file.
2011-09-15 14:19:51 I msg:***************************************************************
2011-09-15 14:19:51 I msg:[TRANSCast] DNAS/posix(linux x86) v2.0.0.51 (Jul 29 2011) starting up...
2011-09-15 14:19:51 I msg:[MAIN] PID: 9809
2011-09-15 14:19:51 I msg:[MAIN] Loaded config from /www/docs/almighty/audio-bomb/shoutcast-trans/sc_trans_basic.conf
2011-09-15 14:19:51 I msg:[MAIN] TimeMultiplier = 1, TimeShift = 0
2011-09-15 14:19:51 I msg:[VUPUSH] 0 VU images loaded for left channel
2011-09-15 14:19:51 I msg:[VUPUSH] 0 VU images loaded for right channel
2011-09-15 14:19:51 D msg:[PLAYLISTMGR] Registering playlist playlist:/www/docs/almighty/audio-bomb/shoutcast-trans/playlists/playlist.lst : 0
2011-09-15 14:19:51 D msg:[PLAYLISTMGR] Playlist registry: namelaylist path:/www/docs/almighty/audio-bomb/shoutcast-trans/playlists/playlist.lst
2011-09-15 14:19:51 D msg:[PLAYLISTMGR] Activating playlist=playlist id=-1 loop=1 prior=0 shuffle=1 dur=0 curt=0
2011-09-15 14:19:51 I msg:[PLAYLISTMGR] Playlist load from file /www/docs/almighty/audio-bomb/shoutcast-trans/playlists/playlist.lst
2011-09-15 14:19:51 D msg:[PLAYLISTMGR] Root path is /www/docs/almighty/audio-bomb/shoutcast-trans/playlists/
2011-09-15 14:19:51 D msg:[PLAYLISTMGR] Remote application entry
2011-09-15 14:19:51 D msg:[PLAYLISTMGR] #!php /www/docs/almighty/audio-bomb/shoutcast-trans/getPlaylistSongs.php
2011-09-15 14:19:51 D msg:[PLAYLISTMGR] Remote application entry
2011-09-15 14:19:51 D msg:[PLAYLISTMGR] #!php /www/docs/almighty/audio-bomb/shoutcast-trans/getPlaylistSongs.php
2011-09-15 14:19:51 I msg:[PLAYLISTMGR] Caching playlist /www/docs/almighty/audio-bomb/shoutcast-trans/playlists/playlist.lst
2011-09-15 14:19:51 I msg:[PLAYLISTMGR] Load complete
2011-09-15 14:19:51 D msg:[PLAYLISTMGR] Playlist queue: namelaylist priority:0 loop:1 shuffle:1 id:-1 stop:0
2011-09-15 14:19:51 I msg:[MAIN] Streaming thread starting
2011-09-15 14:19:51 I msg:[SOURCERELAY] Thread starting
2011-09-15 14:19:51 I msg:[RESAMPLER] Deactivated 44100/2 == 44100/2
2011-09-15 14:19:51 I msg:[SOURCEANDENDPOINTMANAGER] Encoder thread 1 starting
2011-09-15 14:19:51 I msg:[SOURCEANDENDPOINTMANAGER] Broadcast thread 1 starting
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Giving replay gain calculator a head start
2011-09-15 14:19:51 I msg:[RGCALC] Thread running
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Running
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Creating stream socket
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Connecting to stream host
2011-09-15 14:19:51 I msg:[MAIN] Playlist decoder thread starting
2011-09-15 14:19:51 I msg:[DECODE] Giving replay gain calculator a head start
2011-09-15 14:19:51 I msg:[DECODE] Begin decoding
2011-09-15 14:19:51 D msg:[PLAYLISTMGR] Playlist Directory (priority/) does not exist
2011-09-15 14:19:51 D msg:[PLAYLISTMGR] Attempting to run [php /www/docs/almighty/audio-bomb/shoutcast-trans/getPlaylistSongs.php 3]
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Sending Ultravox 2.1 authentication
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Mime type
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Broadcast setup
2011-09-15 14:19:51 I msg:[AAC] AAC setup complete
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Negotiating buffer sizes
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Negotiated buffer size is 480KB
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Negotiating payload sizes
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Negotiated payload size is 16377
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Configuring ICY-NAME [AudioBombUs]
2011-09-15 14:19:51 D msg:[PLAYLISTMGR] Return string is /www/docs/almighty/audio-bomb/audio/Strip Steve/Delta Disco Ep/02 AM _ FM (Original Mix).mp3
/www/docs/almighty/audio-bomb/audio/Robyn/Body Talk - Get More Free Music At Rcrdlbl.com/Robyn - Call Your Girlfriend (Feed Me Remix).mp3

2011-09-15 14:19:51 I msg:[DECODE] Next file is /www/docs/almighty/audio-bomb/audio/Strip Steve/Delta Disco Ep/02 AM _ FM (Original Mix).mp3
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Configuring ICY-GENRE [Misc]
2011-09-15 14:19:51 W msg:[MP3 DECODE] 1574304836 Could not calculate file length
2011-09-15 14:19:51 W msg:[MP3 DECODE] 1848015846 Could not calculate file length
2011-09-15 14:19:51 W msg:Could not load metadata because could not open file #!php /www/docs/almighty/audio-bomb/shoutcast-trans/getPlaylistSongs.php
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Configuring ICY-URL [http://www.bealmighty.com]
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Configuring ICY-PUB [0]
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Flush metadata
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Standby
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Streaming
2011-09-15 14:19:51 I msg:[UVOX2] 58907219 Sending metadata 3902 [528 bytes] content=
<?xml version="1.0" encoding="UTF-8" ?>
<metadata>
<COMM>Indie Dance / Nu Disco - Nu</COMM>
<TALB>Delta Disco EP</TALB>
<TCON v1="52"></TCON>
<TENC>TRANSCast DNAS/posix(linux x86) v2.0.0.51</TENC>
<TIT2>AM / FM (Original Mix)</TIT2>
<TPE1>Strip Steve</TPE1>
<TYER>2009</TYER>
<extension>
<title seq="1">Strip Steve - AM / FM (Original Mix)</title>
<title seq="2">getPlaylistSongs</title>
<title seq="3">getPlaylistSongs</title>
<title seq="4">getPlaylistSongs</title>
<soon>getPlaylistSongs</soon>
</extension>
</metadata>
cgaubuchon is offline   Reply With Quote
Old 16th September 2011, 11:35   #2
DrO
 
Join Date: Sep 2003
Posts: 27,873
i cannot give you a proper answer for the moment, other than it's most likely a legit bug you're seeing as that feature isn't something i'm too acquainted with so i'm not 100% sure it even works as expected - since the items after the first entry are only meant to be used for the next song title and aren't actually used (from what i remember).

so as an interim thing, it might be easier to make your script drop back to only outputting a single entry at a time (seeing as that's all the Transcoder is really using anyway) and when i get a chance then i can properly look into that aspect of the code to see why it's going weird.

if you could provide a copy of the raw output the script generates then that will be off use so i can verify i'm testing against the right (or wrong) data.

-daz
DrO is offline   Reply With Quote
Old 16th September 2011, 13:26   #3
cgaubuchon
Junior Member
 
Join Date: Sep 2011
Posts: 4
Yeah it does seem to me like it is a legitimate bug as well. Below is the exact output from the PHP script to sc_trans. This is the output directly displayed in the browser but in Chrome's developer tools it displays with the line breaks (written as '\n\r' in PHP code) correctly.

I have tried to trick the playlist into running the script twice to see if that would force the playlist to show the next song instead of trying to query the same script again. Did not work. I can provide any additional answers or support if need be. Thanks.

code:
/www/docs/almighty/audio-bomb/audio/Strip Steve/Delta Disco Ep/02 AM _ FM (Original Mix).mp3 /www/docs/almighty/audio-bomb/audio/Robyn/Body Talk - Get More Free Music At Rcrdlbl.com/Robyn - Call Your Girlfriend (Feed Me Remix).mp3
cgaubuchon is offline   Reply With Quote
Old 16th September 2011, 13:35   #4
DrO
 
Join Date: Sep 2003
Posts: 27,873
a linebreak of \n\r ? er, normal behaviour is to be \r\n for a windows type linebreak.

-daz
DrO is offline   Reply With Quote
Old 16th September 2011, 13:49   #5
cgaubuchon
Junior Member
 
Join Date: Sep 2011
Posts: 4
Have tried both ways as well at using just \n to no avail. Running on a Gentoo Linux machine anyways.
cgaubuchon is offline   Reply With Quote
Old 20th September 2011, 16:58   #6
cgaubuchon
Junior Member
 
Join Date: Sep 2011
Posts: 4
Any update on this?
cgaubuchon is offline   Reply With Quote
Old 20th September 2011, 17:01   #7
DrO
 
Join Date: Sep 2003
Posts: 27,873
nope. i'd already logged it but it's pretty low on my list of things to work on (anything to do with sc_trans is generally low priority at the moment). when there is an update i'll post back or pm you.

-daz
DrO is offline   Reply With Quote
Old 26th November 2011, 18:44   #8
dicion
Junior Member
 
Join Date: Jun 2011
Posts: 12
I'm also having this issue, writing my own playlist control script:

code:

2011-11-26 10:36:49 I msg:[DECODE] Next file is /home/everfree/autodj/music/Dethonator - Pony Swag (vs. Swagberg).mp3
2011-11-26 10:36:49 W msg:RVA2 tag not supported in file /home/everfree/autodj/music/Dethonator - Pony Swag (vs. Swagberg).mp3
2011-11-26 10:36:50 W msg:RVA2 tag not supported in file /home/everfree/autodj/music/Dethonator - Pony Swag (vs. Swagberg).mp3
2011-11-26 10:36:50 W msg:Could not load metadata because could not open file #!/usr/bin/php /home/everfree/sc_trans/randomsong.php
2011-11-26 10:37:07 I msg:[UVOX2] 1309248999 Sending metadata 3902 [537 bytes] content=
<?xml version="1.0" encoding="UTF-8" ?>
<metadata>
<COMM></COMM>
<TALB>Remix War Vol. 3</TALB>
<TDRC><year>2011</year></TDRC>
<TENC>TRANSCast DNAS/posix(linux x86) v2.0.0.54</TENC>
<TIT2>Pony Swag (vs. Swagberg)</TIT2>
<TPE1>Dethonator</TPE1>
<TPE2>MLP</TPE2>
<TYER>2011</TYER>
<USLT language="eng"> </USLT>
<extension>
<title seq="1">Dethonator - Pony Swag (vs. Swagberg)</title>
<title seq="2">randomsong</title>
<title seq="3">randomsong</title>
<title seq="4">randomsong</title>
<soon>randomsong</soon>
</extension>
</metadata>



So it runs the script properly when getting the filename for the current song, but fails when running it to get the metadata for the next song.

It's almost like the filename for the metadata read is being defined as "#!/usr/bin/php /home/everfree/sc_trans/randomsong.php", and it tries to read the metadata from that exact string, instead of like;
"`#!/usr/bin/php /home/everfree/sc_trans/randomsong.php`".

I'm going to play with some escaping/quoting/bracketing of the defined file, see if it makes a difference, but yea, unless I figure something else out, it looks like the 'next song' feature, using scripts, is legitimately broken at this time.
dicion is offline   Reply With Quote
Old 28th November 2011, 13:10   #9
DrO
 
Join Date: Sep 2003
Posts: 27,873
the whole of that functionality in sc_trans needs to be re-reviewed / fixed though metadata pulling isn't really supported with it (from when i last looked at the source code) so between that and other issues it's going to be acting funky - the joy of beta software...

-daz
DrO is offline   Reply With Quote
Old 28th November 2011, 13:57   #10
dicion
Junior Member
 
Join Date: Jun 2011
Posts: 12
Alright, in the meantime, I re-wrote my control script to handle the display of the next song in the queue itself, so I'm just pulling the nextsong information from the output of my script, instead of from the DNAS xml itself.

It's Work-aroundable, especially if you're using your own software to handle the playlist/queue.
dicion is offline   Reply With Quote
Old 21st September 2016, 10:54   #11
sistematico
Junior Member
 
Join Date: Oct 2013
Posts: 8
Sorry for necro-posting, but any updates on this?

Thank you...
sistematico is offline   Reply With Quote
Old 21st September 2016, 16:24   #12
neralex
Major Dude
 
Join Date: Mar 2011
Posts: 576
Yes, the support for the transcoder has ended since Radionomy's takeover of SHOUTcast from AOL.
neralex is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Shoutcast > Shoutcast Technical Support

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump