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.

Edited by Chrisj
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

 

Edited by kicken
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.