Multiple named pipes don't work
|Reported by:||burek||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
Summary of the bug: When 1 ffmpeg is used to produce multiple outputs to named pipes and another ffmpeg is used to read those named pipes as inputs, everything just stucks and doesn't work.
How to reproduce:
- Run 2 shells.
- Create 2 test named pipes (1 for audio and 1 for video):
mkfifo /tmp/aaa /tmp/vvv
- In first shell type the following, which would basically split the input to raw audio and raw video, sending the results to audio/video named pipes:
ffmpeg -y -i 1.flv -map 0:a -f u16le -acodec pcm_s16le -ac 2 -ar 44100 /tmp/aaa -map 0:v -f yuv4mpegpipe -vcodec rawvideo /tmp/vvv
- In second shell type the following, which should join inputs and create the output:
ffmpeg -y -i /tmp/mcs_aaa -i /tmp/mcs_vvv out.avi
The result: It doesn't work.
But, if you use 2 ffmpeg processes in the second shell instead, to separately grab the audio named pipe input and video named pipe input, then everything works as expected:
ffmpeg -y -i /tmp/mcs_aaa bla1.avi & ffmpeg -y -i /tmp/mcs_vvv bla2.avi
Conclusion: Something is implemented wrong in the ffmpeg's part that reads inputs in such a way that it prevents ffmpeg from reading both named pipes as inputs at the same time (second shell).