File size: 1,346 Bytes
483b020
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
ce88ec8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
from typing import Dict, Any, List, Literal
from pydantic import BaseModel, constr

Timestamp = constr(pattern=r'^\d{2}:\d{2}$')
RangeTimestamp = constr(pattern=r'^\d{2}:\d{2}-\d{2}:\d{2}$')
Score010 = constr(pattern=r'^(?:10|[0-9])\/10$')

class Hook(BaseModel):
    hook_text: str
    principle: str
    advantages: List[str]

class StoryboardItem(BaseModel):
    timeline: Timestamp
    scene: str
    visuals: str
    dialogue: str
    camera: str
    sound_effects: str

class ScriptLine(BaseModel):
    timeline: Timestamp
    dialogue: str

class VideoMetric(BaseModel):
    timestamp: RangeTimestamp
    element: str
    current_approach: str
    effectiveness_score: Score010
    notes: str

class VideoAnalysis(BaseModel):
    effectiveness_factors: str
    psychological_triggers: str
    target_audience: str
    video_metrics: List[VideoMetric]

class TimestampImprovement(BaseModel):
    timestamp: RangeTimestamp
    current_element: str
    improvement_type: str
    recommended_change: str
    expected_impact: str
    priority: Literal["High", "Medium", "Low"]

class AdAnalysis(BaseModel):
    brief: str
    caption_details: str
    hook: Hook
    framework_analysis: str
    storyboard: List[StoryboardItem]
    script: List[ScriptLine]
    video_analysis: VideoAnalysis
    timestamp_improvements: List[TimestampImprovement]