[FFmpeg-user] stopping ffmpeg correctly while piping

Moritz Barsnick barsnick at gmx.net
Thu Jan 11 20:44:50 EET 2018


On Thu, Jan 11, 2018 at 10:56:13 -0500, Dave Rice wrote:
> Could you share the working command you used?

I'm sure it was
$ ffmpeg -report -f lavfi -i testsrc2 -f nut - test.mov -y | ffplay -

That was at work, under Windows. Now I'm at home, and "all" I have
access to is Linux. And here, I can reproduce your issue. Even using
"-loglevel debug", ffmpeg doesn't say anything about closing its files,
unlike it did under Windows. Its log just stops right in it:

[libx264 @ 0x14a0020] frame=  83 QP=29.90 NAL=2 Slice:B Poc:166 I:4    P:114  SKIP:170  size=1524 bytes
[rawvideo @ 0x1490040] PACKET SIZE: 115200, STRIDE: 480
[libx264 @ 0x14a0020] frame=  84 QP=26.50 NAL=0 Slice:B Poc:164 I:2    P:98   SKIP:198  size=995 bytes
[rawvideo @ 0x1490040] PACKET SIZE: 115200, STRIDE: 480

So apparently, ffmpeg is getting some different signal under Linux,
and/or handling it differently.

> 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 -
> 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

Apparently, this requires you to explicitly map something ("-map 0"). I
don't recall why, and why not with a filter involved. Too lazy to
contemplate. *shrug*

Moritz


More information about the ffmpeg-user mailing list