add MPEG2TS to virtual folder

All the issues related to streaming of recorded media.

add MPEG2TS to virtual folder

Postby netsistence » Sat May 24, 2014 10:29 am

I am in de proces of automatic add and remove streams. Both live streams (working fine) and streaming archived files.
In the Ureal Media Server Configuration i can add MPEG2TS by right click the virtual folder, choose start MPEG2TS and point the file i want to stream that way.
I use SDK autoserverconfig.dll to create a virtual folder, and then want to add MPEG2TS to it.
I try to use UmediaSvr MPEG2TSBroadcastTrigger to manage this.
And their is the point: I need to give both an Alias for the virtual foldr and a Filename, but this interface has only BSTR sAliasOrFileName parameter.
How to manage this?

regards,
Netsistence
netsistence
 
Posts: 0
Joined: Sat May 24, 2014 9:29 am

Re: add MPEG2TS to virtual folder

Postby admin » Sun May 25, 2014 2:47 pm

If your virtual folder is named mediaroot and the file is test.avi then a single parameter is
mediaroot\test.avi
admin
Site Admin
 
Posts: 1039
Joined: Fri Aug 21, 2009 10:13 am

Re: add MPEG2TS to virtual folder

Postby afriendcalledben » Mon Feb 23, 2015 11:03 am

Hi,

I am hoping to do the same as netsistence.

I have a PHP file that creates a COM object of "UMediaServer.MPEG2TSBroadcastTrigger".

From this I'm able to:

* Start a Multicast broadcast (FileMCastTrigger > StartMulticast)
* Stop a Multicast broadcast (FileMCastTrigger > StopMulticast)
* Stop an already running MPEG2-TS broadcast (MPEG2TSBroadcastTrigger > StopBroadcast)

However, I can't seem to be able to call MPEG2TSBroadcastTrigger > StartBroadcast successfully.

Here's my code:

com_load_typelib("UMediaServer.MPEG2TSBroadcastTrigger");
$com = new COM("UMediaServer.MPEG2TSBroadcastTrigger") or die("Nope!");

echo $com->StartBroadcast("mediaroot\test.avi", "192.168.50.170", 5119, new VARIANT(TRUE), new VARIANT(TRUE), new VARIANT(TRUE));

The response is:

Fatal error: Uncaught exception 'com_exception' with message '<b>Source:</b> Unknown<br/><b>Description:</b> Unknown' in C:\xampp\htdocs\cmstest\test.php:9 Stack trace: #0 C:\xampp\htdocs\cmstest\test.php(9): com->StartBroadcast('mediaroot\test.a...', '192.168.50.82', 5119, Object(variant), Object(variant), Object(variant)) #1 {main} thrown in C:\xampp\htdocs\cmstest\test.php on line 9

Any help that you can offer would be really appreciated. Let me know if you need more information from me.

Thanks,

Ben
afriendcalledben
 
Posts: 0
Joined: Mon Feb 23, 2015 10:52 am

Re: add MPEG2TS to virtual folder

Postby afriendcalledben » Mon Feb 23, 2015 12:38 pm

I'm sorry. It was a rookie error. Didn't escape the backslash.

Should have been:
echo $com->StartBroadcast("mediaroot\\test.avi", "192.168.50.170", 5119, new VARIANT(TRUE), new VARIANT(TRUE), new VARIANT(TRUE));

Thanks.
afriendcalledben
 
Posts: 0
Joined: Mon Feb 23, 2015 10:52 am

Re: add MPEG2TS to virtual folder

Postby admin » Mon Feb 23, 2015 12:50 pm

But also, why the port is 5119?
This is a port reserved for Unreal Media Server, and by doing what you are doing you can cause Unreal Media Server not to function properly.

You should stream to some port that is not used by other applications.
admin
Site Admin
 
Posts: 1039
Joined: Fri Aug 21, 2009 10:13 am


Return to Streaming Files

Who is online

Users browsing this forum: No registered users and 3 guests

cron