I have tried encoding with ffmpeg via a PHP script, but the process freezes at a certain point. When the same command is run via the command line in Windows it encodes just fine.
I have tried different videos, which aren't corrupted and don't use any exotic codecs or anything.
What could be the reason the process freezes when run from a script (ie exec() in PHP) but not when run directly from the command line? Any tips?
I have had a similar Problem. For me, my webserver has had a maximum execution time.
For IIS (web.config):
<system.web>
<httpRuntime executionTimeout="180" />
</system.web>
For other Server google about
maximum execution time <webservername>
I'm thinking this has something to do with pipes. Ie, the FFmpeg output is redirecting into a pipe that is never being drained by another process so the FFmpeg/PHP process blocks.
Some questions:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.