[FFmpeg-user] stopping ffmpeg correctly while piping

Dave Rice dave at dericed.com
Thu Jan 11 17:56:13 EET 2018

Hi Moritz,

> On Jan 11, 2018, at 10:19 AM, Moritz Barsnick <barsnick at gmx.net> wrote:
> On Thu, Jan 11, 2018 at 16:03:08 +0100, Moritz Barsnick wrote:
>> Interesting: ffmpeg doesn't close one output correctly, if the other
>> one fails? (I didn't double check, but that is an undesired limitation,
>> if you ask me. I'm not using the word "bug" yet. ;-))
> I just tested this with both testsrc2 and a streaming input on Windows,
> and it just works there, the MOV file can be played by mplayer. I can't
> test on Linux right now.

Could you share the working command you used?

Thanks for pointing out the tee muxer, I haven’t tried it before.

When I run:
ffmpeg -y -f lavfi -i testsrc -filter_complex vflip -c:v rawvideo -f tee "[f=mov:onfail=ignore]will_this_work.mov|[f=nut:onfail=ignore]pipe:1" | ffplay -
or switch the order via:
ffmpeg -y -f lavfi -i testsrc -filter_complex vflip -c:v rawvideo -f tee "[f=nut:onfail=ignore]pipe:1|[f=mov:onfail=ignore]will_this_work.mov" | ffplay -

and then close the ffplay window, ffmpeg stops, and will_this_work.mov still contains no moov atom.

Separate issue with the above command, but if I don’t include a filter_complex then I get an error:
Output file #0 does not contain any stream
pipe:: Invalid data found when processing input

Thanks much,
Dave Rice

More information about the ffmpeg-user mailing list