Definitive reference for FFmpeg and ASS/SSA animation timing units, optimal durations, and best practices. PROACTIVELY activate for: (1) Animation timing questions, (2) ASS subtitle timing, (3) Karaoke timing tags, (4) Caption duration calculation, (5) Transition duration selection, (6) Fade/zoom timing, (7) Frame rate considerations, (8) Platform-specific timing (TikTok/Shorts/Reels), (9) Readability formulas, (10) Audio-video sync tolerances. Provides: Complete time unit reference tables, optimal duration guidelines, psychology-based timing recommendations, caption readability formulas, and platform-specific timing profiles.
JosiahSiegel24 スター2026/01/10
職業
カテゴリ
メディア
スキル内容
CRITICAL GUIDELINES
Windows File Path Requirements
MANDATORY: Always Use Backslashes on Windows for File Paths
When using Edit or Write tools on Windows, you MUST use backslashes (\) in file paths, NOT forward slashes (/).
Documentation Guidelines
NEVER create new documentation files unless explicitly requested by the user.
FFmpeg Animation Timing Reference (2025-2026)
Quick Reference Card
Context
Unit
Example
FFmpeg filters (fade, xfade, drawtext)
Seconds
duration=1.5
関連 Skill
FFmpeg zoompan d= parameter
Frames
d=150 (150 frames)
FFmpeg time variable t
Seconds
enable='gte(t,2)'
ASS karaoke tags (\k, \kf, \ko)
Centiseconds
{\k100} = 1 second
ASS animation tags (\t, \fad, \move)
Milliseconds
\t(0,500,...) = 0.5s
ASS dialogue timestamps
H:MM:SS.CC
0:00:05.50
CRITICAL: ASS Has TWO Different Time Units!
This is the most common source of confusion in subtitle animations.
ASS/SSA Time Unit Disambiguation
Tag Type
Unit
Conversion
Example
Karaoke tags (\k, \kf, \ko, \K)
Centiseconds (1/100s)
× 100
{\k50} = 0.5 seconds
Animation tags (\t)
Milliseconds (1/1000s)
× 1000
\t(0,200,...) = 0.2 seconds
Fade tags (\fad)
Milliseconds
× 1000
\fad(300,0) = 0.3s fade in
Move tags (\move)
Milliseconds
× 1000
\move(x1,y1,x2,y2,0,500) = 0.5s
Dialogue timestamps
H:MM:SS.CC
Centiseconds
0:00:01.50 = 1.5 seconds
Example: Same Duration, Different Units
; Both animations last 0.5 seconds but use DIFFERENT UNITS:
; Karaoke: 50 CENTISECONDS = 0.5 seconds
{\k50}Word
; Animation: 500 MILLISECONDS = 0.5 seconds
{\t(0,500,\fscx120)}Word
Section 1: FFmpeg Time Units (All Filters)
Complete FFmpeg Time Unit Reference
Filter/Context
Parameter
Unit
Example
Notes
fade
duration (d)
Seconds
fade=t=in:d=2
Floating point
fade
start_time (st)
Seconds
fade=st=5:d=2
When fade begins
afade
duration (d)
Seconds
afade=d=3
Audio fade
xfade
duration
Seconds
duration=1.5
Transition length
xfade
offset
Seconds
offset=4
When transition starts
acrossfade
duration (d)
Seconds
acrossfade=d=1
Audio crossfade
drawtext
t variable
Seconds
enable='gte(t,5)'
Time since start
drawtext
alpha
0-1 scale
alpha='min(1,t/2)'
Opacity over time
zoompan
d
Frames
d=150
Duration in frames
zoompan
t variable
Seconds
z='1+0.1*t'
Time in expressions
fps
fps
Frames/second
fps=30
Frame rate
trim
start, end
Seconds
trim=start=2:end=10
Cut points
setpts
PTS
Timestamps
setpts=PTS-STARTPTS
Presentation timestamps
Frame Rate Conversion
Frame Rate
1 Frame Duration
30 Frames
60 Frames
24 fps
41.67 ms
1.25 s
2.5 s
25 fps
40 ms
1.2 s
2.4 s
30 fps
33.33 ms
1 s
2 s
50 fps
20 ms
0.6 s
1.2 s
60 fps
16.67 ms
0.5 s
1 s
Zoompan Duration Calculation
# zoompan d= parameter is in FRAMES, not seconds!
# For 2-second zoom at 30fps:
ffmpeg -i input.mp4 -vf "zoompan=z='1.2':d=60:s=1080x1920" output.mp4
# d=60 frames ÷ 30fps = 2 seconds
# For 2-second zoom at 60fps:
ffmpeg -i input.mp4 -vf "zoompan=z='1.2':d=120:s=1080x1920" output.mp4
# d=120 frames ÷ 60fps = 2 seconds
# Formula: frames = seconds × fps
Viral Video Timing Optimizations (2025-2026)
Based on the 1.3-second attention threshold research, hook animations must be fast and dramatic:
Effect Type
FPS
Effect Duration
Frame Count
d= Parameter
Hook zoom punch
60
0.4-0.5s
24-30 frames
d=1 (use time conditional)
Hook flash
60
0.2-0.3s
12-18 frames
d=1 (use time conditional)
Continuous zoom
30
Entire video
N/A
d=1 (recalc per frame)
Text animations
60
0.3-0.5s
18-30 frames
d=1 (use time conditional)
Important: Always use d=1 for continuous per-frame processing. Limit effect duration using time conditionals like if(lt(t,0.5),effect,1) rather than setting d= to a frame count (which would freeze the video after that many frames).
Critical Rule: Hook animations MUST complete within 0.5 seconds to fit in the 1.3-second attention window with room for text/content.
Optimal Zoom Parameters by Platform
Platform
Hook Zoom
Hook Duration
Continuous Zoom
Recommended FPS
TikTok
1.5x (50%)
0.4-0.5s
+0.2%/sec
60fps for hooks
YouTube Shorts
1.5x (50%)
0.5-0.6s
+0.15%/sec
60fps throughout
Instagram Reels
1.4x (40%)
0.5-0.6s
+0.18%/sec
60fps for hooks
Optimized Hook Effect Formulas
# 1.5x zoom punch over 0.5s at 60fps (RECOMMENDED):
# Always use d=1 for continuous processing; time conditional limits effect duration
fps=60,zoompan=z='if(lt(t,0.5),1.5-t,1)':d=1:s=1080x1920
# 8% zoom pulse at ~2Hz for 1.5s (sin(t*12) = 12 rad/s = 1.91 Hz):
fps=60,zoompan=z='if(lt(t,1.5),1+0.08*sin(t*12),1)':d=1:s=1080x1920
# Subtle continuous zoom for TikTok (0.2%/sec - minimum perceptible):
zoompan=z='1+0.002*t':d=1:s=1080x1920
# Subtle continuous zoom for YouTube Shorts (0.15%/sec - larger screens):
zoompan=z='1+0.0015*t':d=1:s=1080x1920
Section 2: ASS/SSA Subtitle Timing
Karaoke Tags (Centiseconds)
Tag
Name
Unit
Effect
\k
Karaoke
Centiseconds
Instant highlight (no fill)
\kf
Karaoke Fill
Centiseconds
Progressive fill left-to-right
\ko
Karaoke Outline
Centiseconds
Outline wipe effect
\K
Karaoke (alt)
Centiseconds
Same as \k
Karaoke Timing Examples
; Each word highlights for the specified duration
; Values are in CENTISECONDS (100 = 1 second)
; 0.5 second per word:
{\k50}This {\k50}is {\k50}a {\k50}test
; Variable timing matching speech:
{\k30}The {\k25}quick {\k40}brown {\k35}fox
; Karaoke fill (progressive highlight):
{\kf100}Slowly {\kf150}highlighting {\kf80}each {\kf120}word
Conversion Table: Centiseconds
Centiseconds
Seconds
Common Use
10
0.1s
Very fast syllable
25
0.25s
Quick word
50
0.5s
Normal word
100
1.0s
Long word/pause
150
1.5s
Extended emphasis
200
2.0s
Dramatic pause
Animation Tags (Milliseconds)
Tag
Format
Unit
Effect
\t
\t(t1,t2,tags)
Milliseconds
Animate between t1 and t2
\fad
\fad(in,out)
Milliseconds
Fade in/out duration
\move
\move(x1,y1,x2,y2,t1,t2)
Milliseconds
Move from t1 to t2
Animation Timing Examples
; Animation over 300 milliseconds (0.3 seconds):
{\t(0,300,\fscx120\fscy120)}Pop effect
; Scale animation: 0-200ms scale up, 200-400ms scale down
{\fscx80\fscy80\t(0,200,\fscx110\fscy110)\t(200,400,\fscx100\fscy100)}Bounce
; Fade in over 500ms, no fade out:
{\fad(500,0)}Fade in text
; Move over 800ms:
{\move(0,1920,540,960,0,800)}Slide in from bottom
Conversion Table: Milliseconds
Milliseconds
Seconds
Common Use
50
0.05s
Instant flash
100
0.1s
Very fast animation
200
0.2s
Quick pop/snap
300
0.3s
Standard UI animation
500
0.5s
Smooth transition
800
0.8s
Noticeable movement
1000
1.0s
Slow, deliberate
2000
2.0s
Very slow, dramatic
Dialogue Timestamps (H:MM:SS.CC)
; Format: Hours:Minutes:Seconds.Centiseconds
; Dialogue line from 1.5s to 5.0s:
Dialogue: 0,0:00:01.50,0:00:05.00,Default,,0,0,0,,Your text here
; Examples: