From php using exec () is called ffmpeg, which puts the stream into the RTSP container, i.e. theoretically, ffmpeg can run indefinitely, can interrupt a second later.

The process itself that hangs on exec () is a fork that was created by the main daemon process. (If anything, it takes the flow parameters from the main one through ZeroMQ)

Question: how can the main process reliably (not by indirect signs) know what is happening with ffmpeg? Ideally, the current status of the record (when ffmpeg is started in the console, the last line of the exhaust), or at least know the reason for the completion of the ffmpeg process.

PS I only see the option with ffmpeg exhaust parsing (log file), but not the rainbow option.

  • one
    the child process can output data to stdout in exactly the same way, which the parent process will take. see passthru() and proc_open() . - etki

0