You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a bug, only a little help that might be useful for some people passing through here.
It might be worth noting a scenario I've just encountered: I'm running a ffmpeg command with amphp/process and I was only interested in what was produced by STDOUT (wav audio).
But I noticed that for some reason, the process got eventually stuck on the read() and could go no further.
After digging for a while, and remembering a similar situation using the native proc_open() with $pipes, I understood that it was not because I didn't care about STDERR in my case, that the corresponding pipe was not filling up anyway! Until it was completely full and the process got stuck, waiting for the pipe to be read/emptied.
In this precise case, the optimal solution is not to fill STDERR in the first place, using the options -hide_banner -loglevel quiet for ffmpeg, but if you cannot control the command's output, I suppose you can use this:
This is not a bug, only a little help that might be useful for some people passing through here.
It might be worth noting a scenario I've just encountered: I'm running a
ffmpeg
command withamphp/process
and I was only interested in what was produced by STDOUT (wav audio).So basically it was as simple as:
But I noticed that for some reason, the process got eventually stuck on the
read()
and could go no further.After digging for a while, and remembering a similar situation using the native
proc_open()
with$pipes
, I understood that it was not because I didn't care aboutSTDERR
in my case, that the corresponding pipe was not filling up anyway! Until it was completely full and the process got stuck, waiting for the pipe to be read/emptied.In this precise case, the optimal solution is not to fill
STDERR
in the first place, using the options-hide_banner -loglevel quiet
forffmpeg
, but if you cannot control the command's output, I suppose you can use this:Feel free to correct me. I did not test this solution myself but I thought it was important to mention.
The text was updated successfully, but these errors were encountered: