autly Posted February 20, 2009 Report Share Posted February 20, 2009 Man ir shaada funkcija, lai programa darbotos bacgrkounda: function execInBackgroundb($cmd, $file) { if (substr(php_uname(), 0, 7) == "Windows"){ pclose(popen("start /B ". $cmd, "r")); } else { exec($cmd . " > /dev/null &"); } } Tad man ir shaada rindinja, kas palaizh programu un taas darbiibu execInBackgroundb($ffmpeg." -i ".$upload_path.$filename." -s 480x234 -vcodec mjpeg -ss 5 -an -f rawvideo -vframes 1 ".$img, "$upload_path$filename"); Probleema ir taada, ka man vajag unlikot $upload_path.$filename , bet kameer ffmpeg konvertee sho failu nevar un nevajag izdzeest, ir iespeejams noteikt kad beidz konvertaacija, un tad likt unlikot? Quote Link to comment Share on other sites More sharing options...
autly Posted December 14, 2010 Author Report Share Posted December 14, 2010 sen nebiju te iegriezies, bet skatos, ka uz jautaajumu, kuru uzdevu ljoti sen veel pats neesmu atradis atbildi.. varbuut tomeer kaads zin? Quote Link to comment Share on other sites More sharing options...
Blitz Posted December 14, 2010 Report Share Posted December 14, 2010 emm, viens risinajums varetu but batch job. Batchjobam var padot arejaas references kas tava gadijumā būs $upload_path.$filename un $img, un batch jobā tad attiecīgi ieliec visu komandu ar referencēm, un aiz vinas faila dzesanu. Kad pirma komanda bus pabeigta batch izpildis nakamo. no php funkcijas savukart izsauc to batch ar parametriem. Sikāk skaties googlee. Par risinajumu neesmu drosh, nekad neesu meginajis, kur nu vel linux videe :( 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.