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.bmpCode: Select all
mogrify -resize 1x600! *.bmpCode: Select all
convert *.bmp -compose difference -composite -threshold 0 -separate -evaluate-sequence Add difference.jpgLast, 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!