/    Sign up×
Community /Pin to ProfileBookmark

Help with run command from the shell

It was suggested that I add a ‘report’ parameter to the ffmpeg code(in the php file), 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

to post a comment
PHP

2 Comments(s)

Copy linkTweet thisAlerts:
@NogDogJun 04.2019 — From https://ffmpeg.org/ffmpeg.html#Options looks like the default is a file named program-YYYYMMDD-HHMMSS.log in the current directory. BTW, looks like you need a space after "-report" and before the single quote that follows?
Copy linkTweet thisAlerts:
@chrisjchrisjauthorJun 04.2019 — Thanks for your reply.

I have added a program-YYYYMMDD-HHMMSS.log file in the main directory with write permissions, however after running the script (after making the code correction that you suggested) the video upload appears that it is prevented and the .log file remains at 0 file size. Any additional help is appreciated
×

Success!

Help @chrisjchrisj spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.14,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...