Jump to content

Help with run command from the shell


Chrisj

Recommended Posts

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.

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.