[FFmpeg-user] How to pan hozitonally on a video?
rwilliams at busivid.com
Wed Jan 27 02:20:31 CET 2016
According to http://ffmpeg.org/ffmpeg-filters.html#crop the expression variables for t (time in seconds) and n (frame number) are available.
# X distance per frame = (400 - 0) / (10 * 25) = 1.6
# Y distance per frame = (10 - 0) / (10 * 25) = 0.04
I suspect you'll want something similar to the following.
-vf "crop=enable=lt(t\,10):w=1200:h=980, crop=enable=between(t\,10\,20):w=1200:h=980:x='(t-10)*1.6':y='(t-10)*.04', crop=enable=gte(t\,20):w=1200:h=980:x=400:y=10"
From: ffmpeg-user [mailto:ffmpeg-user-bounces at ffmpeg.org] On Behalf Of Paul B Mahol
Sent: Wednesday, 27 January 2016 05:35
To: FFmpeg user questions
Subject: Re: [FFmpeg-user] How to pan hozitonally on a video?
On 1/26/16, Sub Phil <phil4000n at gmail.com> wrote:
> I have a 30 sec video in 1920x1080 at 25fps
> I want to pan/crop with a constant rectangle of 1200x980
> It rectangle starts at position (0,0) till t=10 sec than from t=10 sec
> to t=20sec I wish my rectangle to move at a constant/linear speed from
> position (0,0) to (400,10)
> Than from t=20 sec onwards, rectangle stays at (400,10).
> How can I do that??
Using crop filter and some kind of expressions for x and y.
ffmpeg-user mailing list
ffmpeg-user at ffmpeg.org
More information about the ffmpeg-user