Re: http://ffmpeg.org/ffmpeg.html#crop
I have filmed a play on a stage.
I have cropped to the size I wanted, but I'm wondering if I can go beyond namely.
The stage is fixed, the shoot was done without a support so that there is some movement
Is it possible(if yes, explanation please ) to tell ffmpeg that the cropping rectangle will move according to the a fixed point given on the first frame?
Something as
ffmpeg -i 2012-0331Praha.mp4 -acodec copy -vf crop=720:540:430:40:640:300 -sameq -vcodec mpeg4 output.avi
Instructing:
Sets the cropping rectangle top left corner at (430,40) the dimensions of the cropping rectangle being 720x540
The fixed point is located at 640:300 and this is the reference point of focus (like a giroscope).
Thanks
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 6 of 6
Thread
-
-
If I'm understanding you correctly: No, because ffmpeg doesn't have a motion tracker
The "fixed point" is no longer "fixed" between subsequent frames due to the movement of the camera (ie. it's no longer at x,y , it might be at x+11, y+12)
If you stabilize the shot, then crop , then it would be possible. You can use stabilization software e.g. deshaker , prodad mercalli, after effects -
What's your goal? To stabilize? Or to pan within the frame, like a Ken Burns?
Last edited by budwzr; 11th May 2012 at 11:06.
-
If I'm understanding you correctly...The "fixed point" is no longer "fixed"
Yes you understood correctly, eventhough I was not clear.
Goal: Rather "restabilize" vertically.
Source is 1280x 720 (HD Ready)
If I crop so:
ffmpeg -i 2012-0331Praha.mp4 -acodec copy -vf crop=720:540:430:40 -sameq -vcodec mpeg4 output.avi
I would say that on the first half of the video one sees lot of ceiling on top of heads of dancers, while on 2nd half one sees lot of stage and virtually no ceiling.
The stage being fixed, I wanted to take one point on it as the tracking point
Seeing complex coding like
# trembling effect
"crop=in_w/2:in_h/2in_w-out_w)/2+((in_w-out_w)/2)*sin(n/10)in_h-out_h)/2 +((in_h-out_h)/2)*sin(n/7)"
I thought that there might exist an option
>Or to pan within the frame, like a Ken Burns?
How do you achieve that with ffmpeg?
ThanksLast edited by feelart; 11th May 2012 at 11:41.
-
Your tracking point can be visualized and assigned manually if you throw a grid overlay. Your pixel resolution would be the points. Like on a travel map when you find a destination in one plane and a departure in the other plane, then triangulate the mileage.
Panning within a frame? An example would be to shoot in 1080, then make a 720 crop rectangle. Then you can stabilize with no edge loss or jello effect too.Last edited by budwzr; 11th May 2012 at 12:11.
Similar Threads
-
Program for cropping a video as one would crop an image
By mgmt in forum EditingReplies: 4Last Post: 28th Mar 2012, 05:08 -
FFMPeg CLI : How to crop and pad?
By Bonie81 in forum Newbie / General discussionsReplies: 6Last Post: 26th Jun 2011, 07:31 -
Crop from time point AVIDemux
By remlap in forum Newbie / General discussionsReplies: 1Last Post: 5th Dec 2010, 22:09 -
FFmpeg : Audio tracks
By Klagar in forum AudioReplies: 2Last Post: 13th Oct 2010, 15:14 -
Cropping in Vegas Pro 8 - I crop the video, but output file still has black
By Mysteriouskk in forum Newbie / General discussionsReplies: 2Last Post: 5th Mar 2008, 11:24