waxical
waxical

Reputation: 3896

System command - doesn't get return

Seem to have a problem with PHP system command - I place a command with it and if return code is above 0 - I cite failure otherwise I carry on.

It never seems to return on FFMPEG commands lower than a certain number of seconds (generally 3-5 seconds duration video encodes that are very quick to encode). Is this something that'd be from FFMPEG not returning properly or system command?

An example command:-

system('ffmpeg -i /home/test.wmv -f flv 340x160 -vcodec libx264 export.flv', $returnCode);
if($returnCode > 0) { error(); }

The only way to get round this seems to be to run a timer and check log files if nothing back after an amount of time but if anyone has any pointers - be gratefully received.

Upvotes: 1

Views: 138

Answers (1)

Thomas
Thomas

Reputation: 222

have you checked the code syntax? Seems you're closing the string earlier on the first parameter

Upvotes: 1

Related Questions