添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow , the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Visit Stack Exchange

Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.

Sign up to join this community

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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?