[FFmpeg-user] write output of find_rect to a file?
barsnick at gmx.net
Mon Jun 29 17:36:50 EEST 2020
On Mon, Jun 29, 2020 at 13:24:30 +0200, Michael Koch wrote:
> I want to track an object and need the x,y coordinates of this object
> for each frame.
> Is it possible to write the output of the find_rect filter to a file?
I don't have any good command line for find_rect handy, but it should
work with something like this (untested, of course):
$ ffprobe -f lavfi -i movie=input.mp4,find_rect=options -show_entries frame=pkt_pts_time:frame_tags=lavfi.rect.w,lavfi.rect.h,lavfi.rect.x,lavfi.rect.y -of csv
In other words, let ffprobe show you each frame's metadata.
You can redirect this output, or have the logging write a report file.
More information about the ffmpeg-user