LanceT Posted January 29, 2011 Share Posted January 29, 2011 I want to get a simple true/false to check if my ffmpeg is still converting a video. You can check out the shell command I executed below. convertToFlv( $input, $output ); function convertToFlv( $input, $output ) { echo "Converting $input to $output"; $command = "ffmpeg -y -i $input -acodec libfaac -ar 44100 -ab 96k -vcodec libx264 -level 41 -crf 20 -bufsize 20000k -maxrate 25000k -g 250 -r 20 -s 640x480 -coder 1 -flags +loop -cmp +chroma -partitions +parti4x4+partp8x8+partb8x8 -flags2 +brdo+dct8x8+bpyramid -me umh -subq 7 -me_range 16 -keyint_min 25 -sc_threshold 40 -i_qfactor 0.71 -rc_eq 'blurCplx^(1-qComp)' -bf 16 -b_strategy 1 -bidir_refine 1 -refs 6 -deblockalpha 0 -deblockbeta 0 $output"; shell_exec( $command ); } Can someone provide me some code that will help me check if ffmpeg is still doing the conversion? Quote Link to comment Share on other sites More sharing options...
l4nc3r Posted January 29, 2011 Share Posted January 29, 2011 Well, it should just keep moving through the code, so you could echo out some AJAX loader, run shell_exec, and in the line right after shell_exec do whatever. And so you know, shell_exec outputs the return from the command. Quote Link to comment Share on other sites More sharing options...
LanceT Posted February 6, 2011 Author Share Posted February 6, 2011 It will be if the user loaded another page and wants to check if his video is done converting. So it won't be on the same page as the code above. Anyone have any ideas? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.