Page 1 of 1

ffmpeg

Posted: Mon Mar 23, 2015 11:57 pm
by sn4fu
Hi I have a stack (MacOS X 10.9) that sends shell commands to the terminal app. However I need to send a ffmpeg concat shell from the stack and nothing happens. no errors.
Other shells have worked for me but anything to do with ffmpeg seems to fail.
I have pasted this script directly into the terminal and it works fine. I'm a bit lost on this as the ffmpeg route is perfect for my ends.

this is the shell script. .

<ffmpeg -i "concat:/Volumes/terra/images/movie1.mpg|/Volumes/terra/movie2.mpg|/Volumes/terra/movie3.mpg" -c copy /Volumes/terra/xxx.mpg>

Hope there is a way round this . . .


I am using livecode community 7.04

Re: ffmpeg

Posted: Tue Mar 24, 2015 8:41 pm
by mwieder
Try something like

Code: Select all

on mouseUp pMouseBtnNo
   local cmd = "/usr/local/bin/ffmpeg"
   local tInput = "-i concat:/Volumes/terra/images/movie1.mpg|/Volumes/terra/movie2.mpg|/Volumes/terra/movie3.mpg"
   local tOutput = "-c copy /Volumes/terra/xxx.mpg"
   local tResponse
   
   put shell(cmd && tInput && tOutput) into tResponse
   put tResponse
end mouseUp

Re: ffmpeg

Posted: Thu Mar 26, 2015 11:14 am
by sn4fu
Thanks for the answer mwieder, but this gave a few permission errors and did not recognise output . . .

however I did add the path to ffmpeg and hey presto it works.

Did not understand why I needed to include the path from LC app when runs fine in terminal without path?

Re: ffmpeg

Posted: Thu Mar 26, 2015 6:32 pm
by mwieder
This may help http://unix.stackexchange.com/questions ... by-default
The "problem" is with the path in the type of shell that's being launched and the config files that come into play.

There are a few ways to deal with this. One is to state the path explicitly, another is to set the shellcmd before invoking shell, a third would be to fiddle with various config files. There aren't any solutions that are best, just depends on how you want to deal with things.

But yeah, it's a pain and it would be so much nicer if osx just behaved like linux.