[FFmpeg-user] How can I pipe ffmpeg listing?

Moritz Barsnick barsnick at gmx.net
Wed Feb 5 16:37:32 EET 2020


On Tue, Feb 04, 2020 at 23:17:28 -0500, Mark Filipak wrote:
> This:
>   >ffmpeg -ss 2:00 -i g:\VIDEO_TS\VTS_02_2.VOB -filter:v idet -frames:v
> 900 -an -f rawvideo -y NUL
> produces the listing at the bottom -- it is that listing that I'm trying
> to pipe.

With "listing", do you mean these lines?
> [Parsed_idet_0 @ 0000015ef0c72840] Repeated Fields: Neither:   772 Top:    66 Bottom:    63
> [Parsed_idet_0 @ 0000015ef0c72840] Single frame detection: TFF:   687 BFF:     1 Progressive:   159 Undetermined:    54
> [Parsed_idet_0 @ 0000015ef0c72840] Multi frame detection: TFF:   901 BFF:     0 Progressive:     0 Undetermined:     0

These are emitted by the idet filter using ffmpeg's logging mechanism,
which goes to stderr (the shell's standard error stream). You cannot
change that target from the ffmpeg command line tool.

> Redirection to a file doesn't work, either.

To capture the log messages behind a '|' pipe, you need to redirect the
stderr stream to stdout. I have no idea how to do that on Windows. A
search on the net tells me to use "2>&1", like in a Unix Bourne shell.

A cleaner method would be to let ffmpeg additionally log to a report
file (environment "FFREPORT", or command line "-report")". You could
let ffmpeg create such a report file, and parse it afterwards.

> Thanks for any help,

Cheers,
Moritz


More information about the ffmpeg-user mailing list