Page 1 of 1

PHP and VLM commands

Posted: 17 Oct 2008 14:15
by flanagann
SOLVED

Hi!!
I'm trying to create a PHP script for creating and setting broadcast emissions in VLM. I followed How-to and this wonderful topic step by step.

Code: Select all

<?php $url = 'http://myIP:8080/requests/vlm_cmd.xml?command='; $create = $url . 'new%20test%20broadcast%20enabled'; $input = $url . 'setup%20test%20input%20"C:\video.ts"'; $output = $url . 'setup%20test%20output%20#std{access=rtp,mux=ts,dst=destinationIP:1234}'; echo file_get_contents($create); echo file_get_contents($input); echo file_get_contents($output); ?>
First two commands (creation and setting the input) work fine. The problem is the output; getting this error while running the script in the browser:
setup : missing argument for output

It's strange since it's the same command VLM suggests if I set everything manually, from the browser. Maybe a problem reading '#'??

Note that I have to use %20 instead of spaces. With spaces is not working on the browser.

Could you help me?? I'm really stuck and I don't know how to solve it :S

Re: PHP and VLM commands

Posted: 17 Oct 2008 14:26
by flanagann
The whole morning working on it and I solve it just after posting!!!

Just needed to change '#' for %23.

Hope it helps someone in the future!

Re: PHP and VLM commands

Posted: 07 Nov 2008 07:51
by dynamitemedia
so after following our posts i was wondering if you could help us out with what you were working on and how you did it

Re: PHP and VLM commands

Posted: 11 Nov 2008 18:30
by flanagann
so after following our posts i was wondering if you could help us out with what you were working on and how you did it
yeah!! what do you want to know??

Re: PHP and VLM commands

Posted: 11 Nov 2008 21:30
by dynamitemedia
well if you can show us your project demo and some coding.

that would be great, maybe its something we can add to it for you or add to our own project.

Re: PHP and VLM commands

Posted: 14 Nov 2008 12:50
by flanagann
well if you can show us your project demo and some coding.

that would be great, maybe its something we can add to it for you or add to our own project.
I'm developing a Web/Media server where the user is able to schedule a TV program recording and then view it via streaming. For the streaming part I'm using VLC as a RTSP Video On Demand server and VLC plugin for web browsers in the client.

ADDING VOD contents to VLM

Code: Select all

// ADD Video On Demand content to VideoLan Manager (VLM) $url = 'http://YourServerIP:YourPort/requests/vlm_cmd.xml?command='; // new VideoName vod enabled (creation of vod content) $create = $url . 'new%20videoname%20vod%20enabled'; // you have to substitute spaces and slashses (problems with browsers) $pathmod = eregi_replace('/', '\\', $path); $pathmod = eregi_replace(' ', '%20', $pathmod ); $pathmod = eregi_replace('-', '%2D', $pathmod ); // setup VideoName input path (set input path) $input = $url . 'setup%20videoname'%20input%20"'. $pathmod . '"'; // OUTPUT NOT CONFIGURED // execute both create and input (maybe it's interesting write echo before for debugging); file_get_contents($create); //echo file_get_contents($input); file_get_contents($input);
SETTING UP THE VLC PLUGIN FOR THE CLIENT

Code: Select all

<OBJECT id='vlc1_IE' codeBase=http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab width=400 height=300 classid=clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921> <param name="MRL" value="rtsp://YourIPServer:RTSPPort/video<? echo $id_prog ?>" /> <param name="AutoPlay" value="True" /> <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2" width="400" height="300" target="rtsp://YourIPServer:RTSPPort/video<? echo $id_prog ?>" autoplay="yes" id="vlc1"> </embed> </OBJECT>
Note you have different configurations for IE and Mozilla based browsers.

Don't forget to start VLC as a RTSP server and with http interface in order to access to VLM via web browser.
vlc -I http --rtsp-host ServerIP:Port

Re: PHP and VLM commands

Posted: 14 Nov 2008 12:53
by flanagann
Forgot to mention I'm using some buttons to control media playing (PLAY, PAUSE, VOLUME UP, VOLUME DOWN, CHANGE ASPECT RATIO...).

Pause and Seek options don't work despite I'm using RTSP and the protocol has options for that.

Have anyone set up a RTSP server with PAUSE and SEEK options available for the client???