Sign up here and you can log into the forum!

upnp-cmd help please!!

Discussion, features, plugins--everything about zoster's UMSP UPnP Media Server software

upnp-cmd help please!!   

Postby corrpel » Sat Jan 14, 2012 4:13 am

hi all

I have a script for playing custom umsp mp3 stream assigned to home key. But instead of playing that stream, is playing the last file rendered.
The script looks like this:

upnp-cmd Play SetAVTranspotURI "http://127.0.0.1/u
msp/plugins/shoutcast/shoutcast-proxy.php?stream_url=http%3A%2F%2Fxxx.xxx.xx.xxx%
3Ayyyy"

xxx=IP
yyy=PORT

Can someone help me completing the right form. I have no ideea what to do to fix it.
ThankYou!
corrpel
n00b
 
Posts: 2
Joined: Sat Jan 14, 2012 4:03 am

Re: upnp-cmd help please!!   

Postby PaulF » Sun Jan 15, 2012 1:50 am

You set the URI and then play.

Code: Select all
upnp-cmd SetAVTranspotURI "http://127.0.0.1/umsp/plugins/shoutcast/shoutcast-proxy.php?stream_url=http%3A%2F%2Fxxx.xxx.xx.xxx%3Ayyyy"
upnp-cmd Play


If you want to permanently remember Shoutcast stations. you can also add them to your /conf/umsp.php


Code: Select all
<?php

$myMediaItems[] = array (
    'id'             => 'umsp://plugins/shoutcast/shoutcast?station_id=1271826',
    'dc:title'       => 'My oldies',
    'upnp:class'     => 'object.container',
    'upnp:album_art' => 'http://lh3.googleusercontent.com/_xJcSFBlLg_Y/TT4KyLI6cCI/AAAAAAAAAQU/PAejQfsyQlQ/s200/shoutcast-badge800x800.png',
);


$myMediaItems[] = array (
    'id'             => 'umsp://plugins/shoutcast/shoutcast?station_id=153226',                                                     
    'dc:title'       => 'My Bob', 
    'upnp:class'     => 'object.container',
    'upnp:album_art' => 'http://lh3.googleusercontent.com/_xJcSFBlLg_Y/TT4KyLI6cCI/AAAAAAAAAQU/PAejQfsyQlQ/s200/shoutcast-badge800x800.png',
);

?>
You can get the station id from the Shoutcast WEC SHOUTCAST_LAST_PLAYED or mouse over a station link on shoutcast.com.
User avatar
PaulF
Developer
 
Posts: 427
Joined: Sat May 08, 2010 8:34 pm
Location: Oregon

Re: upnp-cmd help please!!   

Postby PaulF » Sun Jan 15, 2012 10:56 pm

OOPs, I didn't know the Play command was changed. Check your version and see this thread for better advice. http://forum.wdlxtv.com/viewtopic.php?f=40&t=5763&p=53135#p53135
User avatar
PaulF
Developer
 
Posts: 427
Joined: Sat May 08, 2010 8:34 pm
Location: Oregon

Re: upnp-cmd help please!!   

Postby KAD » Sun Jan 15, 2012 11:15 pm

@PaulF actually the play cmd was not changed, there's just a new script "play" starting with 5.1.1 that takes care of generating meta and setting transport, and staring playback

it just consolidates 3 cmds needed into 1 script

so what you advised still works, it's just there's an easier way now

KAD
If you like my work please consider a Donation. Donate
Please read the appropriate documentation before posting questions! READ ME FAQ WIKI
PM's are for private matters. Post support questions to the appropriate forum, or they will be ignored.
User avatar
KAD
Global Moderator
 
Posts: 5103
Joined: Mon Apr 12, 2010 4:59 pm
Location: Seattle, WA USA

Re: upnp-cmd help please!!   

Postby gismo2004 » Fri Aug 03, 2012 8:59 am

Hi

i'm also using key bindings to start a radio-station and this is working so far, but what i can't get to work is to use the station id as paulF mentioned...

can you guys tell me how to call directly a station id with upnp-cmd?

currently i'm using the stream_url!


thanks in advance

gismo
gismo2004
n00b
 
Posts: 8
Joined: Mon Jan 03, 2011 9:18 am

Re: upnp-cmd help please!!   

Postby PaulF » Sat Aug 04, 2012 9:26 am

gismo2004 wrote:currently i'm using the stream_url!
Shoutcast gets the list of stream urls in a pls file for the station id.

You get the pls file by fetching http://yp.shoutcast.com/sbin/tunein-station.pls?id= station ID

Shoutcast uses php function file_get_contents, but you could also use wget.
User avatar
PaulF
Developer
 
Posts: 427
Joined: Sat May 08, 2010 8:34 pm
Location: Oregon


Return to UMSP Media Server

Who is online

Users browsing this forum: No registered users and 1 guest

cron