Code: Select all
.
.
.
; The following 5 lines gather values from other buttons, skins and
; meters to form the start and stop commands.
FMLECMD_PATH=C:\#Programfile#\Adobe\Flash Media Live Encoder 3.2\
PROFILE_PATH=C:\Users\#USERID#\AppData\Roaming\Adobe\Flash Media Live Encoder 3.2\
PROFILE=#CAM#-#TYPE#-#SHOW#
FMS_URL=rtmp://publish.livestream.com/mogulus/#CHANNEL#/username=#USER#/password=#PSW#/isAutoLive=#CUE#
FMLE_UID="#FMS_URL#+#SHOW#"
; Now I can form the command lines to start and stop the video encoding.
STARTCAMERA="#FMLECMD_PATH#FMLEcmd.exe" /p "#PROFILE_PATH##PROFILE#.xml" /d
STOPCAMERA="#FMLECMD_PATH#FMLEcmd.exe" /s #FMLE_UID#
; As a result #STARTCAMERA# would contain (for example):
; "C:\Program Files\Adobe\Flash Media Live Encoder 3.2\FMLEcmd.exe" /p "C:\Users\Development\AppData\Roaming\Adobe\Flash Media Live Encoder 3.2\webcam-LIVE-demo.xml" /d
; And #STOPCAMERA# might contain:
; "C:\Program Files\Adobe\Flash Media Live Encoder 3.2\FMLEcmd.exe" /s rtmp://publish.livestream.com/mogulus/RainmeterTV/username=RainmeterGuest/password=retemniaR/isAutoLive=true+demo
;Then the following two meters will start and stop the encoding:
[StartStream1]
Meter=IMAGE
Y=32
MeterStyle=StyleButton
LeftMouseUpAction=!Execute [#STARTCAMERA#]
[StopStream1]
Meter=IMAGE
MeterStyle=StyleButton
LeftMouseUpAction=!Execute [#STOPCAMERA#]
My only problem is that it is ugly. While the FMLEcmd.exe program is encoding, it displays the COMMAND window with all sorts of statistical data about the video and audio stream. The [StopStream] action opens another command window which gracefully shuts down the encoding stream and notifies the Livestream Server to switch to another camera or recorded source. That action causes the first command window to end the encoding and close the first command window. Then the second command window closes.
Now, I wouldn't mind so much if it was just Ugly, BUT, having that first command window open during an entire 2 hour show will GUARANTEE some IDIOT at the remote site will CLOSE instead of minimize the command window and ABORT the show. They almost always do that during the football games in the 4th quarter when the game is tied and our team has the ball on the 1 yard line. :^(
I have got to figure a way to make the LeftMouseUpAction=!Execute [#STARTCAMERA#] minimize or hide the command window while FMLEcmd is encoding the video.
Thanks
Bob
PS
OK, I know that there are some solutions mentioned on the forum. Autoit and others, BUT....
I can't for the life of me get my head around the BASICS of Autoit.
Earlier questions I had answered by handing me a couple files and a bit of RM code. That worked for that problem.
Now I think I could maybe figure out the code in the autoit files, but one was a .exe, and the other was a .AU3 I have no idea how to open or edit them, what compiler to use, etc. I may have missed it. (OK, I admit it I just can't fine it) but I can't seem to find any documentation on how to use AutoIt in Rainmeter. I do have another program I use for starting and stopping these cameras on a schedule (outside of RM) but that program only supports a limited subset of Autoit and the autoit "scripts" are simply typed in line with other commands in the scheduler's editor. All of it's AutoIt capabilities are built right into the application It does not involve creating any exe or au3 files. I tried putting some of the samples of autoit into my RM skins and got nowhere. I now know that there is more to it in RM than simply putting the code in line. But, like I said, I just haven't seen anything that is a clear example of building and calling a autoit from within a RM skin.