views:

13

answers:

0

Greetings!

I've run into a strange issue with using php passthru() building a realtime transcoding proxy on os x, here's the command:

passthru("/usr/bin/ffmpeg -i '/path/to/file.avi' -r 20 -ar 44100 -ab 196 -b 1500k -deinterlace -croptop 0 -cropbottom 0 -cropleft 0 -cropright 0 -f flv - 2>/dev/null");

On linux this works perfectly and streams the flash video as expected, and even works if you execute on command line on os x, except to a file:

/usr/bin/ffmpeg -i '/path/to/file.avi' -r 20 -ar 44100 -ab 196 -b 1500k -deinterlace -croptop 0 -cropbottom 0 -cropleft 0 -cropright 0 -f flv testfile.flv

But when using the same command above (piped to /dev/null), it just exits immediately with no errors reported.

Anyone have an idea? Is my assumption of pipe operation on os x wrong? I'm stumped, and I've never really had an issue with this before... Thanks!