views:

8

answers:

1

How to control (start / stop encoding) Flash Media Encoder 3.5 using ActionScript 3 (using Flash CS4) ?

UPDATE: Flash Media Server 3.5 is also installed in same server. It includes an Apache server, which I think can run batch script, if CGI is installed. Is it a solution? Seems dangerous.

A: 

My final solution is:

Set up a simple PHP site in parallel with FMS using XAMPP. The PHP site runs two simple commands to start and stop the encoder using PHP's system($cmd) command.

To start encoder, the raw command is:

FMLEcmd /p {path_to_profile}/profile.xml /d

To stop encoder, the raw command is:

FMLEcmd /s rtmp://{server}/live/+{stream_name}

by running these commands in PHP, the encoder can be controlled. You can even use Flash to send out URL request, but take note of cross-domain issues.

Shivan Raptor