2

I have a situation where I pipe the output of ffmpeg into a PHP script for some processing. I might have a few of these processes running at any given time and I figured to start and stop them I might use Supervisor.

However, I'm running into the problem where I can start a new process but where I can't successfully stop it. I'm trying to execute the following command:

ffmpeg -i http://mystream.com -v 0 -f s16le -acodec pcm_s16le - | php process.php

To make the "piping" work I use the following for the command in Supervisor:

[program:process]
command = /bin/bash -c 'exec /usr/bin/ffmpeg -i http://mystream.com -v 0 -f s16le -acodec pcm_s16le - | php /home/me/process.php'

This seems to be working and starts the whole process just fine, however, when I stop the process using supervisorctl:

stop process

I see with an ps aux that the ffmpeg process is still running. The php process.php seems to have been killed though.

What is the correct way to start and stop a piped command with Supervisor?

1 Answer 1

2

% sh -c 'your one-liner' I think this works

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .