ffmpeg

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
sn4fu
Posts: 4
Joined: Mon Mar 23, 2015 11:46 pm

ffmpeg

Post by sn4fu » Mon Mar 23, 2015 11:57 pm

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

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: ffmpeg

Post by mwieder » Tue Mar 24, 2015 8:41 pm

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

sn4fu
Posts: 4
Joined: Mon Mar 23, 2015 11:46 pm

Re: ffmpeg

Post by sn4fu » Thu Mar 26, 2015 11:14 am

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?

mwieder
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 3581
Joined: Mon Jan 22, 2007 7:36 am
Contact:

Re: ffmpeg

Post by mwieder » Thu Mar 26, 2015 6:32 pm

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.

Post Reply