Hi,
Does anybody know how to make a script that will execute some .exe file every time some movie is played via wild media server ?
Thank you,
Marko
Script to execute file
Re: Script to execute file
Hi,
If playback does not matter, you can add a transcoding profile, which will call a exe-file as a transcoder or use the system ole-objects. Set a transcoding profile for some movie.
If playback does not matter, you can add a transcoding profile, which will call a exe-file as a transcoder or use the system ole-objects. Set a transcoding profile for some movie.
Re: Script to execute file
What I would like to accomplish is to call an exe file on some "important" events.
For example, I have log file somewhere on the network, and I have report.exe which connects to my server and reports an status.
report.exe accepts parameter for example
When movie1 is played to call report.exe "Movie1 playing"
When movie1 is stopped to call report.exe "Movie1 stopped"
this can also be accomplished by calling to an URL instead exe file
For example:
When movie1 is played to call http://www.myserver.com/report.php?text=Movie1 playing
When movie1 is stopped to call http://www.myserver.com/report.php?text=Movie1 stopped
Is it possible to accomplish in Wild media server ?
Thank you,
Marko
For example, I have log file somewhere on the network, and I have report.exe which connects to my server and reports an status.
report.exe accepts parameter for example
When movie1 is played to call report.exe "Movie1 playing"
When movie1 is stopped to call report.exe "Movie1 stopped"
this can also be accomplished by calling to an URL instead exe file
For example:
When movie1 is played to call http://www.myserver.com/report.php?text=Movie1 playing
When movie1 is stopped to call http://www.myserver.com/report.php?text=Movie1 stopped
Is it possible to accomplish in Wild media server ?

Thank you,
Marko
Re: Script to execute file
In this case, no concepts start-stop. In fact it is http-server, the device may request content from any position and portions. Request content from position 0 - event "After the beginning of a playback" of a media resource", transfer the last byte of the media resource - event "After the end of a playback of a media-resource" (Settings - Additional - Events). You can use the system ole-objects for http-requests in the events "After the beginning of a playback" of a media resource", "After the end of a playback of a media-resource"marko3d wrote:What I would like to accomplish is to call an exe file on some "important" events.
For example, I have log file somewhere on the network, and I have report.exe which connects to my server and reports an status.
report.exe accepts parameter for example
When movie1 is played to call report.exe "Movie1 playing"
When movie1 is stopped to call report.exe "Movie1 stopped"
this can also be accomplished by calling to an URL instead exe file
For example:
When movie1 is played to call http://www.myserver.com/report.php?text=Movie1 playing
When movie1 is stopped to call http://www.myserver.com/report.php?text=Movie1 stopped
Is it possible to accomplish in Wild media server ?
Thank you,
Marko
Re: Script to execute file
Thank you Eugene,
Could you please give me an example of such script ?
I'm not good at programming so I don't know how to accomplish that.
Thank you very much
Could you please give me an example of such script ?
I'm not good at programming so I don't know how to accomplish that.
Thank you very much
Re: Script to execute file
Settings - Processing - Add - Name: Start playback
Script:
Ok - Add - Name: End playback
Script:
Ok - Ok
Additonal - Events - "After the beginning of a playback..." - "Start playback" - "After the end of a playback..." - "End playback" - OK
Script:
Code: Select all
begin
//WmsLogMessage(mtiInfo, 'http://www.myserver.com/report.php?text=' + WmsHttpEncode(CurrentMediaItem.Properties[mpiTitle] + ' playing'))
WmsDownloadUrl('http://www.myserver.com/report.php?text=' + WmsHttpEncode(CurrentMediaItem.Properties[mpiTitle] + ' playing'))
end.
Script:
Code: Select all
begin
//WmsLogMessage(mtiInfo, 'http://www.myserver.com/report.php?text=' + WmsHttpEncode(CurrentMediaItem.Properties[mpiTitle] + ' stopped'))
WmsDownloadUrl('http://www.myserver.com/report.php?text=' + WmsHttpEncode(CurrentMediaItem.Properties[mpiTitle] + ' stopped'))
end.
Additonal - Events - "After the beginning of a playback..." - "Start playback" - "After the end of a playback..." - "End playback" - OK
Re: Script to execute file
It's been a while.
This solution you provided worked very good.. but now I'm thinking of a different approach and I would love to call an exe file with some parameter when playback is started or ended.
It should be the same way as this url calling but is there some procedure instead WmsDownloadUrl that will call program ? .. something like WmsExecute("program.exe start");
and when stopped WmsExecute("program.exe stop");
Is there some function that will accomplish that ? ..
Thank you,
Marko
This solution you provided worked very good.. but now I'm thinking of a different approach and I would love to call an exe file with some parameter when playback is started or ended.
It should be the same way as this url calling but is there some procedure instead WmsDownloadUrl that will call program ? .. something like WmsExecute("program.exe start");
and when stopped WmsExecute("program.exe stop");
Is there some function that will accomplish that ? ..
Thank you,
Marko