Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Articles Thread, How to programmatically control Flash Media Encoder in Flash Media Server; I'm very satisfied with this great software. It garantees great performances, expecially at low and very low bitrate. The only ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=34


Reply
LinkBack Thread Tools Display Modes
How to programmatically control Flash Media Encoder
 
 
Choose
SABRAWY's Avatar

Reply With Quote
 
Join Date: Aug 2007
Posts: 1,893
09-09-2007, 06:56 PM
 
I'm very satisfied with this great software. It garantees great performances, expecially at low and very low bitrate. The only defect I found is the lack of a command line mode.

If you have to set up and launch the encoding on a remote computer or if you need to integrate FME in a pre-existent authomatic procedure or system, You would need a command line mode or a programmatic way to handle starting, stopping, changing configurations.

Unfortunately FME does not give this possibility, but you can easy obtain the same final result with an handy WSH script.

A WSH (Windows Scripting Host) is simply a .vbs text file that can be interpreted by windows as a Visual Basic Script (starting from Win2000). Cut and Past the code below in your notepad, insert the path to your FlashMediaEncoder exe and save all as TEST.vbs.
Now, double clicking on the file and you will see the FME starts, loads the configuration held in the custom.xml file (previously setted and saved) and finally starts the encoding.


Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "[write here the path to FlashMediaEncoder.exe]", 9
'parameter: 0=hide, 7=minimized, 9=normal
'Give FME time to load
WScript.Sleep 5000 'milliseconds to wait
WshShell.AppActivate "Adobe Flash Media Encoder"
WshShell.SendKeys "%fo" 'Open a custom config
WshShell.SendKeys "custom.xml"
WshShell.SendKeys "{ENTER}" 'Start encoding
WshShell.SendKeys "{ENTER}" 'Confirm

This second, tiny script close the FME application.

WshShell.AppActivate "Adobe Flash Media Encoder"
WshShell.SendKeys "%fx"
WshShell.SendKeys "{ENTER}"

This simple control, can be enriched if needed. You can, for example, hide the FME window to the user or also try to read the log file to know the exact state of the application.
The only difficulty is to control multiple istance of FME, but I'm working on it...
 
 
 
Reply

Articles Thread, How to programmatically control Flash Media Encoder in Flash Media Server; I'm very satisfied with this great software. It garantees great performances, expecially at low and very low bitrate. The only ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=34


Bookmarks

Tags
control, encoder, flash, media, programmatically


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
flash media player flv to 3gp conversion vijaypatidar Flash Media Server 16 09-03-2009 07:32 AM
Flash player 10 with activeX control Developer Software and Programs 0 23-11-2008 08:02 PM
Using the Flash Media Interactive Server Feature Explorer SABRAWY Articles 0 17-09-2008 08:57 AM
Adobe Flash Media Encoding Server Announced SABRAWY Flash Media Server 0 17-09-2008 08:26 AM
Flash Media Encoder 2.0 Released - Adds MP3 Audio SABRAWY Flash Media Server 1 08-05-2008 11:04 PM