I have a compressed ultrasound video clip that has a portion at the top (usually 25-75 pixels) that has personal patient information. I'd like to get this value automatically. This upper portion of the clip does not change. Here's a sample clip:
http://www.ultrasoundoftheweek.com/clip ... 1_copy.mp4.
My original theory was to take a still every 5 seconds using ffmpeg:
Code: Select all
ffmpeg -i test.mp4 -vf fps=1 -y out%04d.bmp
Code: Select all
mogrify -resize 1x600! *.bmp
Code: Select all
convert *.bmp -compose difference -composite -threshold 0 -separate -evaluate-sequence Add difference.jpg
Last, use trim to determine how much would come off the top.
Code: Select all
Code?
2) Also, can anyone help me with the trim output step (looking for first grey pixel from top)?
3) Would another approach be more reliable?
Thanks in advance!