Quantcast
Channel: Adobe Community : Discussion List - After Effects Scripting
Viewing all articles
Browse latest Browse all 2143

system.callSystem() on Mac and ffmpeg

$
0
0

Hi,

I've been working a few hours on this with no luck, maybe anyone here can help:

I have an issue on Mac with a script where I want to transcode some files using ffmpeg.

 

Here's what's going on:

 

var cmd = pathToFFMpegBin + '/ffmpeg -h';
var output = system.callSystem(cmd);
alert(output);

 

This works well, the command is executed and the alert shows the help for ffmpeg

 

But with the full command line to encode a file, like:

 

var cmd = pathToFFMpegBin + "/ffmpeg -h -i " + inputFilePath + " -c pcm_f32le " + outputFilePath;
var output = system.callSystem(cmd);
alert(output);

 

After Effects freezes (with the mouse cursor being the waiting cursor) like it's stuck in an endless loop

The alert is not shown, the script is stuck at the callSystem line.

BUT: the encoding does work, the new file is created and working...

 

- The same command works well in a terminal or as a bash script.

- The script works well in Windows

- If I provide a invalid path to the input file or the output file, it works as expected (the alert shows the error returned by ffmpeg)

- If I set ffmpeg to quiet mode (using the '-v quiet' option), it still don't work.

- I tried creating and executing a bash script, but I can't use File.execute() as it opens the script in a editor (even after I have set it to executable, that's normal behavior on Mac). I have to execute it via a callSystem('./file') and this freezes After Effects too.

- I tried launching the script via ExtendScript toolkit, both After Effecst and ExtendScript toolkit freeze, and I cannot stop the script in ES Toolkit.

- Tested on CC2017 and CC2015, same result.

- Javascript debugging is enabled, but I don't have any debug info, it's really like the script is in an endless loop, except I can't stop it.

 

Any idea? Or do you think about a workaround?

 

 

Oh and the ffmpeg binary was the snapshot build here: wihttps://evermeet.cx/ffmpeg/ the one recommended by the official ffmpeg website.

I still have to test with another version.


Viewing all articles
Browse latest Browse all 2143

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>