[FFmpeg-user] redirect to 2 fifo files

Zoltan Kerenyi Nagy kerenyi.nagy.zoltan at gmail.com
Mon Jan 28 21:38:48 EET 2019


Anyhow your solution only creates files, not named pipes (fifo).
I'd like to create 2 fifos with the same data coming from the analog input.
The documentation says that I need to utilize pipe:1 which means output.
I just cant figure out how can I write to 2 fifos at the same time





*#!/bin/bashmkfifo fifo1 2>/dev/nullmkfifo fifo2 2>/dev/nullffmpeg -f alsa
-i hw:0,0 -f wav pipe:1 > fifo1 fifo2exit 0*

I'd use up fifo1 for recording into segments ,and fifo2 to streaming.

On Mon, 28 Jan 2019 at 20:06, Zoltan Kerenyi Nagy <
kerenyi.nagy.zoltan at gmail.com> wrote:

> fifo1 and fifo2 are not really pipes or fifo-s
>
> This way it asks me if I want to overwrite them:
> #!/bin/bash
> set -x
>
> mkfifo fifo1 2>/dev/null
> mkfifo fifo2 2>/dev/null
>
> ffmpeg -f alsa -i hw:0,0 -f wav fifo1 -f wav fifo2
>
> exit 0
>
> On Mon, 28 Jan 2019 at 19:20, Zoltan Kerenyi Nagy <
> kerenyi.nagy.zoltan at gmail.com> wrote:
>
>> If this tiny mistake is the root of the problem, than Ill buy you a beer
>> :-) Im checking this out as soon as I got home
>>
>> On 2019. Jan 28., Mon at 19:11, Moritz Barsnick <barsnick at gmx.net> wrote:
>>
>>> On Mon, Jan 28, 2019 at 16:18:12 +0100, Zoltan Kerenyi Nagy wrote:
>>> > This is how I create the 2 fifos:
>>> >
>>> > #!/bin/bash
>>> >
>>> > mkfifo fifo2 2>/dev/null
>>> > mkfifo fifo2 2>/dev/null
>>>
>>> You're creating the same fifo twice, by the way
>>>
>>> > ffmpeg -f alsa -i hw:0,0 -f wav pipe:1 > fifo1 -f wav pipe:1 > fifo2
>>>
>>> This should give some sort of syntax error from bash. You can't use the
>>> redirect operator ">" twice per command.
>>>
>>> You want to write directly to the fifos:
>>>
>>> $ ffmpeg -f alsa -i hw:0,0 -f wav fifo1 -f wav fifo2
>>>
>>> Cheers,
>>> Moritz
>>> _______________________________________________
>>> ffmpeg-user mailing list
>>> ffmpeg-user at ffmpeg.org
>>> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>>>
>>> To unsubscribe, visit link above, or email
>>> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>>
>>


More information about the ffmpeg-user mailing list