VideoHelp Forum

Try DVDFab and download streaming video, copy, convert or make Blu-rays,DVDs! Download free trial !
+ Reply to Thread
Results 1 to 6 of 6
Thread
  1. 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
    Quote Quote  
  2. Originally Posted by feelart View Post
    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


    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
    Quote Quote  
  3. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    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.
    Quote Quote  
  4. 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?

    Thanks
    Last edited by feelart; 11th May 2012 at 11:41.
    Quote Quote  
  5. Member budwzr's Avatar
    Join Date
    Apr 2007
    Location
    City Of Angels
    Search Comp PM
    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.
    Quote Quote  
  6. budwzr, I tried to find out to set parameters in ffmpeg for that, but I haven't found a reference.

    I would be so kind enough if you could give an URL and some examples please.
    Quote Quote  



Similar Threads