B
B
bezvozni2020-05-09 14:52:45
fmpeg
bezvozni, 2020-05-09 14:52:45

How to get the number of changed pixels in each frame?

Ideally, you need a stable analogue

vlc --video-filter=motion speed.mp4 --verbose=2 --file-logging --logfile=log.txt

because in vlc with this filter all is not well .
Perhaps this is due to the fact that the filter works during playback. If you know that there may be options in vlc to make this filter work more reliably - please hint at it.

In ffmpeg, the filter that seems to be close in meaning is: ffmpeg.org/ffmpeg-all.html#select_002c-aselect
In general, if there is documentation with an accessible Russian translation, this will already be enough.

If not: how in ffmpeg to get the number of changed pixels in each frame (compared to the previous one) as a .txt list?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2020-05-09
@sergiks

Maybe there is a filter - we need to continue the search.
But here's another idea: subtract the previous frame from the frame using the tmix filter . If the two frames are identical, the result will be completely black.
A measure of the difference or the number of unequal pixels will be the average brightness of the frame: its difference in plus from zero.
Check the option that when subtracting light from black instead of a negative value, the same 0 will remain. Then you need to run it twice: A - B and B - A.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question