[FFmpeg-user] Change commands during runtime when the stream is being piped into stdin

Dennis Mungai dmngaie at gmail.com
Fri Jan 13 18:43:05 EET 2023


On Fri, 13 Jan 2023 at 18:46, Joao Pedro Borges Martins <jpedrobm0 at gmail.com>
wrote:

> I want to send a command to change the audio filters on an already running
> FFmpeg process using the process stdin but the audio data is being passed
> in the stdin itself, I tried prefixing the command with `#` but had no
> success. The program just considers my command as a malformed packet and
> lags the stream for a bit.
>
> Using node js ChildProcess to handle the FFMpeg:
>
> *> Initial args:* `-i - pipe:1 -analyzeduration 0 -loglevel 0 -f s16le -ar
> 48000 -ac 2`
> *> Command sent into stdin*: `af=bass=g=20:f=110:w=0.3\n` (Tried # and
> encoding in binary)
>
>
It *might* be possible, applicable to filters that can accept commands if
ffmpeg is linked to libzmq.
See the docs: https://ffmpeg.org/ffmpeg-filters.html#zmq_002c-azmq


More information about the ffmpeg-user mailing list