[FFmpeg-user] ff_frame_thread_encoder_init failed when run via PHP exec

Moritz Barsnick barsnick at gmx.net
Sun Jun 24 23:51:03 EEST 2018

On Sat, Jun 23, 2018 at 04:39:27 -0700, rwilkin wrote:
> I am very new to ffmpeg, so sorry if this is a silly question.

Not at all.

> It works perfectly when I log in to the console via putty and run it. But
> when I run it via exec() in PHP it always comes back with
> ff_frame_thread_encoder_init failed Error initializing output stream 0:0 --
> Error while opening encoder for output stream #0:0 - maybe incorrect
> parameters such as bit_rate, rate, width or height.

The same is described here, without solution:

Running under PHP, is there some restriction on the number of threads a
process is allowed to use? (I'm guessing that's what the function's
name implies, that it is trying to spawn a thread.)

Or perhaps on memory usage? Though I would expect ffmpeg to give a
clearer error message.


More information about the ffmpeg-user mailing list