Reply to topic
CFEXECUTE and FFMPEG
Ennio


Joined: 17 Nov 2006
Posts: 101
Location: Scotch Plains, NJ
Reply with quote
How can I run the FFMPEG with CFEXECUTE?

I have this, but nothing happened.

<cfexecute name="D:\websites\cftube.com\videos\Upload\ffmpeg.exe"
arguments="-i #filename# #serverFileName#.flv">
</cfexecute>

Am I missing something?
Jason101
Forum Regular

Joined: 14 Mar 2006
Posts: 550
Location: Harrisburg, PA
Reply with quote
Ennio,

Unless you are using a Coldfusion VPS, you cannot use the <cfexecute> tag as it is disabled along with CFRegistry on all shared Coldfusion servers.
nathacof


Joined: 24 Oct 2006
Posts: 96
Location: Bear, DE
Reply with quote
CFExecute and CFRegistry are disabled on shared servers.

Sorry. Rolling Eyes
Workaround
comprug
Forum Regular

Joined: 15 Feb 2006
Posts: 343
Reply with quote
You can, however, execute the FFMPEG exe through a JAVA object.
Here's how you do it:
Code:
<cfscript>
function exec_cmd(cmd) {
   var runtimeClass="";
   var out="";
    // Initialize the Java class.
    runtimeClass=CreateObject("java", "java.lang.Runtime");
    // Execute command
    out=runtimeClass.getRuntime().exec(cmd);
    // Return the output
   out.waitFor();
   return out.getInputStream().read();
}
command_output = exec_cmd('D:\websites\cftube.com\videos\Upload\ffmpeg.exe -i #filename# #serverFileName#.flv');
</cfscript>
<cfoutput>#command_output#</cfoutput>
Re: Workaround
imstillatwork


Joined: 03 Apr 2006
Posts: 8
Reply with quote
This does not work for me on my server.

The only way i can get it to run is editing

Code:

   //out.waitFor();
   //return out.getInputStream().read();


But then that means that I have no control over the process - don't know when it ends... don't know if it failed... it just launches ffmpeg into a new process and forgets it it seems like.

Any idea why out.waitFor(); will not work? When i leave it in, ffmpeg never finishes,a nd the output flv file stays locked until reboot....

Any one have any success with this? I REALLY need feedback from ffmpeg during the conversion to know how to proceed in the application and to run flvtools against the newley created file. without out.waitFor() I never know if it finished.... and out.waitFor() doesn't seem to work...

THANKS!!!



comprug wrote:
You can, however, execute the FFMPEG exe through a JAVA object.
Here's how you do it:
Code:
<cfscript>
function exec_cmd(cmd) {
   var runtimeClass="";
   var out="";
    // Initialize the Java class.
    runtimeClass=CreateObject("java", "java.lang.Runtime");
    // Execute command
    out=runtimeClass.getRuntime().exec(cmd);
    // Return the output
   out.waitFor();
   return out.getInputStream().read();
}
command_output = exec_cmd('D:\websites\cftube.com\videos\Upload\ffmpeg.exe -i #filename# #serverFileName#.flv');
</cfscript>
<cfoutput>#command_output#</cfoutput>
CFEXECUTE and FFMPEG
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

  
  
 Reply to topic