Chrisj Posted June 4, 2019 Share Posted June 4, 2019 (edited) It was suggested that I add a ‘report’ parameter to the code, after revising with the ‘scale2ref’ code which appears to prevent the video from uploading/proceeding: $ffmpegCommand =''.$ffmpeg_b.' -y -i '.$video_file_full_path.' -i '.$watermark_image_full_path.' -filter_complex "[0]scale=426:-2[vid];[1][vid]scale2ref='oh*mdar':'ih/10'[wm][vid];[vid][wm]overlay=5:5:format=rgb,format=yuv420p" -vcodec libx264 -preset '.$pt->config->convert_speed.' -crf 26 -report'.$video_output_full_path_240.' 2>&1'; $shell = shell_exec($ffmpegCommand); I couldn’t see where the -report parameter was supposed to output (error.log has a filesize of 0). So I was asked to “run command from the shell and check”? But, I’m not sure what command and where/how to do that. I tried adding this to the php code, and attempted to upload again, same result echo shell_exec("/usr/local/bin/ffmpeg -report log.txt 2>&1"); any additional help is appreciated Any guidance with that is appreciated. Edited June 4, 2019 by Chrisj Quote Link to comment https://forums.phpfreaks.com/topic/308792-help-with-run-command-from-the-shell/ Share on other sites More sharing options...
gw1500se Posted June 4, 2019 Share Posted June 4, 2019 I don't understand what you are trying to do. Where is the input (-i) file in that command. Quote Link to comment https://forums.phpfreaks.com/topic/308792-help-with-run-command-from-the-shell/#findComment-1567312 Share on other sites More sharing options...
kicken Posted June 4, 2019 Share Posted June 4, 2019 (edited) add echo $ffmpeg_command; To the code, then copy the command that is output and run that in a shell to test it. Your code has quoting issues though, as it's written above the code shouldn't even run at all. You'd get a parse error. $ffmpegCommand =''.$ffmpeg_b.' -y -i '.$video_file_full_path.' -i '.$watermark_image_full_path.' -filter_complex "[0]scale=426:-2[vid];[1][vid]scale2ref='oh*mdar':'ih/10'[wm][vid];[vid][wm]overlay=5:5:format=rgb,format=yuv420p" -vcodec libx264 -preset '.$pt->config->convert_speed.' -crf 26 -report'.$video_output_full_path_240.' 2>&1'; //--------------^^^ Unnecessary -------------------------------------------------------------------------------------------------------------------------^^^^^^^^^^^^^^^^^ Invalid quoting error --------------------------------------------------------------------------------------------------------^^ Needs a space Edited June 4, 2019 by kicken Quote Link to comment https://forums.phpfreaks.com/topic/308792-help-with-run-command-from-the-shell/#findComment-1567315 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.