E
E
Evgeny Shevtsov2017-03-17 17:02:21
PHP
Evgeny Shevtsov, 2017-03-17 17:02:21

How to transfer the result of a function to a file?

I am converting

echo shell_exec("ffmpeg -i /1.mp4  -s hd480 -c:v libx264 -preset faster -crf 23 -c:a aac -strict -2 /1_480.mp4  2> /ffmpeg.log");

The conversion is performed, everything is ok, but nothing is written to the logs and they are not created, and if I execute the same command from the console, everything is written to the logs ...
Here from the off site
<?php
  echo "Starting ffmpeg...\n\n";
  echo shell_exec("ffmpeg -y -i input.avi output.avi </dev/null >/dev/null 2>/var/log/ffmpeg.log &");
  echo "Done.\n";
?>

So too does not plow and the command is not executed at all.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
sim3x, 2017-03-17
@Rattlesneyk

which means
/ffmpeg.log

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question