• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Save cfexecute output

Explorer ,
Jan 17, 2008 Jan 17, 2008

Copy link to clipboard

Copied

Hello all-

I am on a quest to determine .flv file dimensions. (Posted in the Flash section already- but my current attempts are not Flash specific)

I am currently trying to use ffmpeg via cfexecute to get the file information.

One 'feature' of ffmpeg is that any time you address a .flv file, the ffmpeg output will tell you the file dimensions.

Awesome, fantastic....but how can I save that information?!?

I have tried:

cfexecute name = "d:\websites\test\media\ffmpeg.exe"
arguments = "-i wheel.flv"
timeout = "90"

With both the 'variable=' and 'outputfile=', but neither of them seem to work. In fact, the variable name I set does not even exist, and the outputfile is never created.

Also, I have tried this with DOS (on Windows...) with the ffmpeg -i videoname.flv >info.txt but the file that comes back is completely empty.

If anyone has an idea of how to save what is essentially an error message on a cfexecute, I would greatly appreciate it.


Thanks,

Karl
TOPICS
Advanced techniques

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jan 20, 2008 Jan 20, 2008

Copy link to clipboard

Copied

I ran into a similar problem recently. The two issues I had were that ffmpeg was timing out and I was unable to capture the error stream. What solved it for me was two excellent tips on cfexecute from Ben Forta's blog.

I wrote up an entry on it here
http://cfsearching.blogspot.com/2008/01/cfexecute-ffmpeg-and-mencoder-mystery.html

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 16, 2008 Jun 16, 2008

Copy link to clipboard

Copied

I am having the same problem, and I have tried the /c and the 2>&1 suggestions, but they haven't worked. I am trying to call an Exchange Management Shell cmdlet after loading the EMS extension into Powershell. Writing this code to a batch file and running that directly works. I've also tested that it's not a permissions issue. CF runs under a domain account in my setup so I was able to log in and run the batch file under the same account. Here are 2 versions of the cfexecute tag I've tried. I've also tried executing the batch file itself with the /c and the 2>&1 redirect. In all cases, the cfexecute times out leaving cmd.exe and/or powershell.exe running on the server.
Please help! Thanks!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Jun 17, 2008 Jun 17, 2008

Copy link to clipboard

Copied

Hi msk0802,

I used /c and the 2>&1 fix were for a very specific issue: ffmpeg writes to stderr and cfexecute was not capturing the stderr stream. Though that issue was fixed in CF8 Update 1.

Not being familiar with Powershell, I do not know if your problem is caused by the same issue. I did see one article that mentioned a problem using Powershell with java's Runtime.exec().
http://blogs.sun.com/vaibhav/entry/not_as_easy_as_we

I have not read it thoroughly, but you might try the suggestion of writing the output to a file, instead of a variable. Just to see if the process always hangs, or just when using the "variable" attribute.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jun 23, 2008 Jun 23, 2008

Copy link to clipboard

Copied

cfexecute can be very unpredicatable. Your best bets are to a) try it using CF8.1, if it works great, 2) if not, or if you don't have access to CF8.1, trying writing it directly through a Java object using CF's built-in native Java support and CFSCRIPT. There are some pretty good resources out there if you Google it (they are too specific to mention any single solution here).

I happen to come across this post while researching how to capture a "success" message once cfexecute is finished (I'm using CF8.1). I think the Java route is the best for this because you can get very granual control over the messages.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 23, 2008 Jun 23, 2008

Copy link to clipboard

Copied

LATEST
Thanks very much for your response. I meant to post again a few days ago, when I was able to use suggestions from the link that CFSearching posted on 6/17 (thanks very much CFSearching!) to write my own Java object and call that instead of CFExecute (specifically the comment about proc.getOutputStream().close(); did the trick). Thanks everyone.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation