1from apify_client import ApifyClient
2
3
4
5client = ApifyClient("<YOUR_API_TOKEN>")
6
7
8run_input = {
9 "videoUrls": [
10 "https://www.tiktok.com/@duolingo/video/7683994892506270989",
11 "https://media.w3.org/2010/05/sintel/trailer.mp4",
12 ],
13 "maxVideosPerSource": 5,
14 "mode": "auto",
15 "frameCount": 12,
16 "intervalSeconds": 5,
17 "sceneThreshold": 0.3,
18 "timestamps": [
19 "0:05",
20 "00:00:12.5",
21 "20",
22 ],
23 "maxFramesPerVideo": 50,
24 "thumbnailCount": 3,
25 "skipBlankFrames": True,
26 "skipDuplicates": True,
27 "imageFormat": "jpg",
28 "maxWidth": 1280,
29 "contactSheet": True,
30}
31
32
33run = client.actor("apimy/video-frame-extractor").call(run_input=run_input)
34
35
36print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
37for item in client.dataset(run.default_dataset_id).iterate_items():
38 print(item)
39
40