If I save a frame as a JPG using something like:
ffmpeg -i /dev/video0 -frames:0 1 check.jpg
I can get the coordinates to create an image with the perspective corrected using:
ffmpeg -i check.jpg -vf "perspective=51:31:230:30:263:159:23:161" corrected.jpg
It looks great. However, if I try this:
ffmpeg -i /dev/video -vf "perspective=51:31:230:30:263:159:23:161" test.avi
Then I get a video where the image appears to implode on itself. I've noticed that the JPG images I get are 320x240 and the video frames are 640x480, but scaling the coordinates doesn't have any effect. So, I assume the geometry of the frame is different in some way; maybe the origin isn't top left, but I can't find any information.