Ethscriptions commited on
Commit
883a724
·
verified ·
1 Parent(s): 840fb37

Set 9 (恋爱词 9 张): manifest, items, scripts, base photos — sync 1/2

Browse files
README.md CHANGED
@@ -9,7 +9,24 @@ pinned: false
9
 
10
  # 这个用英语怎么说?· 热点事件英语实况图
11
 
12
- 参考 [Ethscriptions/eths](https://huggingface.co/spaces/Ethscriptions/eths) 的制作流程(Pillow 逐帧渲染 → ffmpeg 编码 → 写入苹果实况配对标识),面向 **雅思 / 托福考生、留学生、年轻职场人**,目前共四组 36 张带声音的苹果实况照片(JPG + MOV,全部 ≤ 3 秒,微信朋友圈兼容)。
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
13
 
14
  ## 第八组:本周国内社会热点里的 9 个词(10.22–10.29,2026-10-29 新增)
15
 
 
9
 
10
  # 这个用英语怎么说?· 热点事件英语实况图
11
 
12
+ 参考 [Ethscriptions/eths](https://huggingface.co/spaces/Ethscriptions/eths) 的制作流程(Pillow 逐帧渲染 → ffmpeg 编码 → 写入苹果实况配对标识),面向 **雅思 / 托福考生、留学生、年轻职场人**,目前共五组 45 张带声音的苹果实况照片(JPG + MOV,全部 ≤ 3 秒,微信朋友圈兼容)。
13
+
14
+ ## 第九组:恋爱里那些说不出口的词(2026-10-29 新增)
15
+
16
+ | # | 中文 | 英文 | 音标 | 类别 | 底图 |
17
+ | --- | --- | --- | --- | --- | --- |
18
+ | 80 | 暧昧 | **situationship** | /ˌsɪtʃuˈeɪʃnʃɪp/ | 事 | AI 生成 |
19
+ | 81 | 相亲 | **blind date** | /ˌblaɪnd ˈdeɪt/ | 事 | AI 生成 |
20
+ | 82 | 官宣 | **hard launch** | /ˌhɑːrd ˈlɔːntʃ/ | 事 | AI 生成 |
21
+ | 83 | 备胎 | **backup** | /ˈbækʌp/ | 人 | AI 生成 |
22
+ | 84 | 冷暴力 | **silent treatment** | /ˌsaɪlənt ˈtriːtmənt/ | 事 | AI 生成 |
23
+ | 85 | 异地恋 | **long-distance relationship** | /ˌlɔːŋ ˈdɪstəns rɪˈleɪʃnʃɪp/ | 事 | AI 生成 |
24
+ | 86 | 分手 | **breakup** | /ˈbreɪkʌp/ | 事 | AI 生成 |
25
+ | 87 | 吃醋 | **jealous** | /ˈdʒeləs/ | 事 | AI 生成 |
26
+ | 88 | 搭讪 | **hit on** | /ˈhɪt ɑːn/ | 事 | AI 生成 |
27
+
28
+ - 下载包:`live/love-words-live-photos.zip`;清单 `pack9.json`;脚本 `source/studio/items9.json`、`package9.py`
29
+ - 9 张底图均为本项目 AI 生成的电影感剧照(全部着装正常、无真实人物),Commons 未找到合适的情感场景实拍
30
 
31
  ## 第八组:本周国内社会热点里的 9 个词(10.22–10.29,2026-10-29 新增)
32
 
pack9.json ADDED
@@ -0,0 +1,166 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "key": "i",
3
+ "name": "第九组 · 恋爱里那些说不出口的词",
4
+ "zip": "love-words-live-photos.zip",
5
+ "zipMB": 40.9,
6
+ "items": [
7
+ {
8
+ "id": "80",
9
+ "index": 1,
10
+ "zh": "暧昧(不明确的关系)",
11
+ "en": "situationship",
12
+ "ipa": "/ˌsɪtʃuˈeɪʃnʃɪp/",
13
+ "pos": "n.",
14
+ "cat": "事",
15
+ "hook": "不是朋友也不是情侣,天天聊天却从不确定关系——Z 世代最热的词之一",
16
+ "source": "ai",
17
+ "duration": 2.37,
18
+ "cover": "cover_80.jpg",
19
+ "final": "final_80.jpg",
20
+ "preview": "preview_80.mp4",
21
+ "identifier": "13FCFB27-A7E5-47F5-A68C-AA9644FDA59E",
22
+ "file": "LIVE_80_situationship"
23
+ },
24
+ {
25
+ "id": "81",
26
+ "index": 2,
27
+ "zh": "相亲",
28
+ "en": "blind date",
29
+ "ipa": "/ˌblaɪnd ˈdeɪt/",
30
+ "pos": "n.",
31
+ "cat": "事",
32
+ "hook": "被爸妈安排、第一次见面就谈房子车子的那种饭局",
33
+ "source": "ai",
34
+ "duration": 3.0,
35
+ "cover": "cover_81.jpg",
36
+ "final": "final_81.jpg",
37
+ "preview": "preview_81.mp4",
38
+ "identifier": "658D4B68-3061-44FE-9EC5-188744911EB6",
39
+ "file": "LIVE_81_blind-date"
40
+ },
41
+ {
42
+ "id": "82",
43
+ "index": 3,
44
+ "zh": "官宣",
45
+ "en": "hard launch",
46
+ "ipa": "/ˌhɑːrd ˈlɔːntʃ/",
47
+ "pos": "n.",
48
+ "cat": "事",
49
+ "hook": "社交平台正式公开恋情、放合照;偷偷露只手叫 soft launch",
50
+ "source": "ai",
51
+ "duration": 3.0,
52
+ "cover": "cover_82.jpg",
53
+ "final": "final_82.jpg",
54
+ "preview": "preview_82.mp4",
55
+ "identifier": "2856CE0E-8467-4DF1-A38E-AB92918A0F58",
56
+ "file": "LIVE_82_hard-launch"
57
+ },
58
+ {
59
+ "id": "83",
60
+ "index": 4,
61
+ "zh": "备胎",
62
+ "en": "backup",
63
+ "ipa": "/ˈbækʌp/",
64
+ "pos": "n.",
65
+ "cat": "人",
66
+ "hook": "永远排在第二位、随叫随到却不被选择的那个人",
67
+ "source": "ai",
68
+ "duration": 3.0,
69
+ "cover": "cover_83.jpg",
70
+ "final": "final_83.jpg",
71
+ "preview": "preview_83.mp4",
72
+ "identifier": "2B530C82-7DE9-4690-8EA4-FD8F8FC077D5",
73
+ "file": "LIVE_83_backup"
74
+ },
75
+ {
76
+ "id": "84",
77
+ "index": 5,
78
+ "zh": "冷暴力",
79
+ "en": "silent treatment",
80
+ "ipa": "/ˌsaɪlənt ˈtriːtmənt/",
81
+ "pos": "n.",
82
+ "cat": "事",
83
+ "hook": "不吵不闹,就是不回消息、不说话——比吵架更伤人",
84
+ "source": "ai",
85
+ "duration": 2.53,
86
+ "cover": "cover_84.jpg",
87
+ "final": "final_84.jpg",
88
+ "preview": "preview_84.mp4",
89
+ "identifier": "273642BB-5DD8-45BD-A28E-ECD23D3FD185",
90
+ "file": "LIVE_84_silent-treatment"
91
+ },
92
+ {
93
+ "id": "85",
94
+ "index": 6,
95
+ "zh": "异地恋",
96
+ "en": "long-distance relationship",
97
+ "ipa": "/ˌlɔːŋ ˈdɪstəns rɪˈleɪʃnʃɪp/",
98
+ "pos": "n.",
99
+ "cat": "事",
100
+ "hook": "留学生最熟的词:时差、机票、视频通话和每一次机场告别",
101
+ "source": "ai",
102
+ "duration": 3.0,
103
+ "cover": "cover_85.jpg",
104
+ "final": "final_85.jpg",
105
+ "preview": "preview_85.mp4",
106
+ "identifier": "AA6FD49E-D4B6-4011-9D9A-15218DEE84A3",
107
+ "file": "LIVE_85_long-distance-relationship"
108
+ },
109
+ {
110
+ "id": "86",
111
+ "index": 7,
112
+ "zh": "分手",
113
+ "en": "breakup",
114
+ "ipa": "/ˈbreɪkʌp/",
115
+ "pos": "n.",
116
+ "cat": "事",
117
+ "hook": "最简单的事,最说不出口的词",
118
+ "source": "ai",
119
+ "duration": 3.0,
120
+ "cover": "cover_86.jpg",
121
+ "final": "final_86.jpg",
122
+ "preview": "preview_86.mp4",
123
+ "identifier": "F59A8B8B-FE4D-4D2A-A8B9-D0FBFF394331",
124
+ "file": "LIVE_86_breakup"
125
+ },
126
+ {
127
+ "id": "87",
128
+ "index": 8,
129
+ "zh": "吃醋",
130
+ "en": "jealous",
131
+ "ipa": "/ˈdʒeləs/",
132
+ "pos": "adj.",
133
+ "cat": "事",
134
+ "hook": "看到 TA 给别人点赞那一秒的表情",
135
+ "source": "ai",
136
+ "duration": 3.0,
137
+ "cover": "cover_87.jpg",
138
+ "final": "final_87.jpg",
139
+ "preview": "preview_87.mp4",
140
+ "identifier": "05315D89-02F0-4622-B0B8-621D4D1D35E2",
141
+ "file": "LIVE_87_jealous"
142
+ },
143
+ {
144
+ "id": "88",
145
+ "index": 9,
146
+ "zh": "搭讪",
147
+ "en": "hit on",
148
+ "ipa": "/ˈhɪt ɑːn/",
149
+ "pos": "phr. v.",
150
+ "cat": "事",
151
+ "hook": "酒吧、健身房、图书馆……开口第一句的勇气",
152
+ "source": "ai",
153
+ "duration": 3.0,
154
+ "cover": "cover_88.jpg",
155
+ "final": "final_88.jpg",
156
+ "preview": "preview_88.mp4",
157
+ "identifier": "1C6D5E06-63CB-4725-9D72-A4B142B3115B",
158
+ "file": "LIVE_88_hit-on"
159
+ }
160
+ ],
161
+ "copy": {
162
+ "title": "暧昧、备胎、冷暴力、官宣……这 9 个恋爱词,你一个都不会用英语说🫣",
163
+ "body": "中文一秒就懂,英文卡住三秒:暧昧不是 ambiguous,备胎不是 spare tire,冷暴力不是 cold violence,官宣更不是 official announce……9 个恋爱里天天上演的词,看图先猜,长按听答案👀\n先看封面猜一猜,再长按实况看答案(记得开声音🔊)\n评论区报一下你答对了几个~\n\n暧昧(不明确的关系) / 相亲 / 官宣 / 备胎 / 冷暴力 / 异地恋 / 分手 / 吃醋 / 搭讪\n\n图片来源:9 张均为 AI 生成(本项目制作)\n\n#恋爱 #暧昧 #备胎 #冷暴力 #官宣 #异地恋 #分手 #英语���词 #实况图 #每日英语 #英语学习 #雅思 #留学生"
164
+ },
165
+ "credits": []
166
+ }
source/photos/live-backup.png ADDED

Git LFS Details

  • SHA256: acbf7a5342d02e3fc03529f55a84882960cab95cb9fe95b07f8579b5c4b3e11a
  • Pointer size: 132 Bytes
  • Size of remote file: 2.18 MB
source/photos/live-blind-date.png ADDED

Git LFS Details

  • SHA256: 90cdafa0b754507618b5bdb521951ecbd5f38fcfae931564fbd4b13ec1d22bc5
  • Pointer size: 132 Bytes
  • Size of remote file: 2.12 MB
source/photos/live-breakup.png ADDED

Git LFS Details

  • SHA256: fadffacb115ff74ddd6643873b5eee3a5f3de12736b48e92ac11736ac8cad914
  • Pointer size: 132 Bytes
  • Size of remote file: 2.4 MB
source/photos/live-hard-launch.png ADDED

Git LFS Details

  • SHA256: 6f9ec44f2cde03d2b96264e2a79e720b9218be04a601d7043d8d5a6b9c649647
  • Pointer size: 132 Bytes
  • Size of remote file: 2.17 MB
source/photos/live-hit-on.png ADDED

Git LFS Details

  • SHA256: 193f38517dfd471d3bd02bafbee673cf6b0068070bcafc436cf5cb99e4acd86b
  • Pointer size: 132 Bytes
  • Size of remote file: 2 MB
source/photos/live-jealous.png ADDED

Git LFS Details

  • SHA256: 9ba2d6d3d393e3e4de1a575a68f42c726de68d56b569bf256dc8b3f228d776b2
  • Pointer size: 132 Bytes
  • Size of remote file: 2.25 MB
source/photos/live-long-distance.png ADDED

Git LFS Details

  • SHA256: b567a333f8497ed15b3142ad7ce1274e5a685ee58bdc3a3edf911f1f1a72fac0
  • Pointer size: 132 Bytes
  • Size of remote file: 1.86 MB
source/photos/live-silent-treatment.png ADDED

Git LFS Details

  • SHA256: 0b2fc0518abdaeb90ab0744bcaf688e507fe7eb065542c583b075554f5f9c687
  • Pointer size: 132 Bytes
  • Size of remote file: 2.06 MB
source/photos/live-situationship.png ADDED

Git LFS Details

  • SHA256: deab360644362d5672efb1b7e5405ed7dc252f70caca24fd5155b6be8d0acefa
  • Pointer size: 132 Bytes
  • Size of remote file: 2.4 MB
source/studio/credits9.json ADDED
@@ -0,0 +1 @@
 
 
1
+ []
source/studio/items9.json ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "id": "80",
4
+ "zh": "暧昧(不明确的关系)",
5
+ "en": "situationship",
6
+ "ipa": "/ˌsɪtʃuˈeɪʃnʃɪp/",
7
+ "pos": "n.",
8
+ "cat": "事",
9
+ "hook": "不是朋友也不是情侣,天天聊天却从不确定关系——Z 世代最热的词之一",
10
+ "q": [
11
+ "couple texting phone night",
12
+ "two people sitting apart bench phones",
13
+ "young couple awkward cafe"
14
+ ],
15
+ "tts": "situationship",
16
+ "card_y": 1130
17
+ },
18
+ {
19
+ "id": "81",
20
+ "zh": "相亲",
21
+ "en": "blind date",
22
+ "ipa": "/ˌblaɪnd ˈdeɪt/",
23
+ "pos": "n.",
24
+ "cat": "事",
25
+ "hook": "被爸妈安排、第一次见面就谈房子车子的那种饭局",
26
+ "q": [
27
+ "two people dinner restaurant table first date",
28
+ "restaurant table two glasses wine candle",
29
+ "couple dinner date restaurant"
30
+ ],
31
+ "tts": "blind date",
32
+ "card_y": 1130
33
+ },
34
+ {
35
+ "id": "82",
36
+ "zh": "官宣",
37
+ "en": "hard launch",
38
+ "ipa": "/ˌhɑːrd ˈlɔːntʃ/",
39
+ "pos": "n.",
40
+ "cat": "事",
41
+ "hook": "社交平台正式公开恋情、放合照;偷偷露只手叫 soft launch",
42
+ "q": [
43
+ "couple selfie phone smiling",
44
+ "couple photo together phone screen",
45
+ "couple taking selfie"
46
+ ],
47
+ "tts": "hard launch",
48
+ "card_y": 1140
49
+ },
50
+ {
51
+ "id": "83",
52
+ "zh": "备胎",
53
+ "en": "backup",
54
+ "ipa": "/ˈbækʌp/",
55
+ "pos": "n.",
56
+ "cat": "人",
57
+ "hook": "永远排在第二位、随叫随到却不被选择的那个人",
58
+ "q": [
59
+ "spare tire car trunk",
60
+ "person waiting alone phone night",
61
+ "spare wheel"
62
+ ],
63
+ "tts": "backup",
64
+ "card_y": 1130
65
+ },
66
+ {
67
+ "id": "84",
68
+ "zh": "冷暴力",
69
+ "en": "silent treatment",
70
+ "ipa": "/ˌsaɪlənt ˈtriːtmənt/",
71
+ "pos": "n.",
72
+ "cat": "事",
73
+ "hook": "不吵不闹,就是不回消息、不说话——比吵架更伤人",
74
+ "q": [
75
+ "phone no reply message waiting",
76
+ "person staring at phone sad",
77
+ "couple back to back not talking"
78
+ ],
79
+ "tts": "silent treatment",
80
+ "card_y": 1130
81
+ },
82
+ {
83
+ "id": "85",
84
+ "zh": "异地恋",
85
+ "en": "long-distance relationship",
86
+ "ipa": "/ˌlɔːŋ ˈdɪstəns rɪˈleɪʃnʃɪp/",
87
+ "pos": "n.",
88
+ "cat": "事",
89
+ "hook": "留学生最熟的词:时差、机票、视频通话和每一次机场告别",
90
+ "q": [
91
+ "airport goodbye couple hug",
92
+ "video call laptop couple",
93
+ "airport farewell hug"
94
+ ],
95
+ "tts": "long distance relationship",
96
+ "card_y": 1140
97
+ },
98
+ {
99
+ "id": "86",
100
+ "zh": "分手",
101
+ "en": "breakup",
102
+ "ipa": "/ˈbreɪkʌp/",
103
+ "pos": "n.",
104
+ "cat": "事",
105
+ "hook": "最简单的事,最说不出口的词",
106
+ "q": [
107
+ "couple arguing street",
108
+ "woman walking away man rain",
109
+ "sad woman window rain"
110
+ ],
111
+ "tts": "breakup",
112
+ "card_y": 1130
113
+ },
114
+ {
115
+ "id": "87",
116
+ "zh": "吃醋",
117
+ "en": "jealous",
118
+ "ipa": "/ˈdʒeləs/",
119
+ "pos": "adj.",
120
+ "cat": "事",
121
+ "hook": "看到 TA 给别人点赞那一秒的表情",
122
+ "q": [
123
+ "jealous woman looking at phone",
124
+ "woman annoyed looking at man phone",
125
+ "couple phone jealousy"
126
+ ],
127
+ "tts": "jealous",
128
+ "card_y": 1140
129
+ },
130
+ {
131
+ "id": "88",
132
+ "zh": "搭讪",
133
+ "en": "hit on",
134
+ "ipa": "/ˈhɪt ɑːn/",
135
+ "pos": "phr. v.",
136
+ "cat": "事",
137
+ "hook": "酒吧、健身房、图书馆……开口第一句的勇气",
138
+ "q": [
139
+ "man talking to woman bar",
140
+ "bar counter two people talking",
141
+ "cafe stranger conversation"
142
+ ],
143
+ "tts": "hit on",
144
+ "card_y": 1130
145
+ }
146
+ ]
source/studio/package9.py ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Pair rendered clips as Apple Live Photos (JPG + MOV, with audio), build web previews, ZIP and manifest for set 5."""
2
+ import json, os, shutil, subprocess, sys, zipfile
3
+ sys.path.insert(0, os.path.dirname(__file__))
4
+ from pair_live_photo import pair
5
+
6
+ OUT = '/tmp/work/out'
7
+ PUB = '/tmp/work/site/live'
8
+ SET = dict(key='i', items='items9.json', credits='credits9.json',
9
+ name='第九组 · 恋爱里那些说不出口的词',
10
+ folder='恋爱英语实况图-第九组', zip='love-words-live-photos.zip',
11
+ title='暧昧、备胎、冷暴力、官宣……这 9 个恋爱词,你一个都不会用英语说🫣',
12
+ intro='中文一秒就懂,英文卡住三秒:暧昧不是 ambiguous,备胎不是 spare tire,冷暴力不是 cold violence,官宣更不是 official announce……9 个恋爱里天天上演的词,看图先猜,长按听答案👀',
13
+ tags='#恋爱 #暧昧 #备胎 #冷暴力 #官宣 #异地恋 #分手 #英语单词 #实况图 #每日英语 #英语学习 #雅思 #留学生')
14
+
15
+ README = """恋爱英语 · 实况图素材包({n} 张)
16
+
17
+ 每张实况图 = 一对同名的 .JPG + .MOV(例如 {example}.JPG / {example}.MOV)。
18
+ 两个文件里写入了相同的苹果实况标识,视频带声音(英语发音 + 音效),全部 ≤ 3 秒,可发微信朋友圈 / 小红书 / 抖音图文。
19
+
20
+ Mac 导入方法:
21
+ 1. 解压本压缩包;
22
+ 2. 全选全部 JPG 和 MOV,一起拖进「照片」App(或 照片 → 文件 → 导入);
23
+ 3. 照片会把每一对识别为一张 LIVE 实况照片;
24
+ 4. 通过 iCloud 照片或隔空投送到 iPhone,发图文时选择这些照片并保持「实况」开启。
25
+
26
+ 注意:JPG 和 MOV 必须成对导入;不要用其他软件重新转码 MOV,否则会丢失配对信息。
27
+ 尺寸 1080×1440(3:4 竖屏),30fps,H.264 + AAC。
28
+
29
+ 建议标题:{title}
30
+
31
+ 建议正文:
32
+ {body}
33
+
34
+ 图片来源:
35
+ {credits}
36
+ """
37
+
38
+
39
+ def main():
40
+ items = json.load(open(os.path.join(os.path.dirname(__file__), SET['items'])))
41
+ credits = json.load(open(os.path.join(os.path.dirname(__file__), SET['credits'])))
42
+ cmap = {c['id']: c for c in credits}
43
+ dist = f"/tmp/work/dist/{SET['folder']}"
44
+ shutil.rmtree(dist, ignore_errors=True); os.makedirs(dist); os.makedirs(PUB, exist_ok=True)
45
+ out_items = []
46
+ for k, it in enumerate(items, 1):
47
+ d = os.path.join(OUT, it['id'])
48
+ meta = json.load(open(os.path.join(d, 'render.json')))
49
+ live = os.path.join(d, 'live'); shutil.rmtree(live, ignore_errors=True)
50
+ m = pair(os.path.join(d, 'cover.jpg'), os.path.join(d, 'motion.mp4'), live, meta['coverTime'], meta['fps'])
51
+ assert m['metadataVerified'], m
52
+ base = f"LIVE_{it['id']}_{it['en'].replace(' ', '-')}"
53
+ shutil.copy(os.path.join(live, 'live.jpg'), os.path.join(dist, base + '.JPG'))
54
+ shutil.copy(os.path.join(live, 'live.mov'), os.path.join(dist, base + '.MOV'))
55
+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', os.path.join(d, 'cover.jpg'), '-vf', 'scale=720:-2', '-q:v', '3', os.path.join(PUB, f"cover_{it['id']}.jpg")], check=True)
56
+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', os.path.join(d, 'final.jpg'), '-vf', 'scale=720:-2', '-q:v', '3', os.path.join(PUB, f"final_{it['id']}.jpg")], check=True)
57
+ subprocess.run(['ffmpeg', '-v', 'error', '-y', '-i', os.path.join(d, 'motion.mp4'), '-vf', 'scale=720:-2', '-c:v', 'libx264', '-crf', '24', '-preset', 'medium', '-pix_fmt', 'yuv420p', '-c:a', 'aac', '-b:a', '128k', '-movflags', '+faststart', os.path.join(PUB, f"preview_{it['id']}.mp4")], check=True)
58
+ src = 'wikimedia' if it['id'] in cmap else 'ai'
59
+ out_items.append({'id': it['id'], 'index': k, 'zh': it['zh'], 'en': it['en'], 'ipa': it['ipa'], 'pos': it['pos'], 'cat': it['cat'], 'hook': it['hook'],
60
+ 'source': src, 'duration': round(meta['duration'], 2), 'cover': f"cover_{it['id']}.jpg", 'final': f"final_{it['id']}.jpg",
61
+ 'preview': f"preview_{it['id']}.mp4", 'identifier': m['identifier'], 'file': base})
62
+ print('paired', base, m['identifier'], flush=True)
63
+ body = (SET['intro'] + '\n先看封面猜一猜,再长按实况看答案(记得开声音🔊)\n评论区报一下你答对了几个~\n\n'
64
+ + ' / '.join(i['zh'] for i in items) + '\n\n图片来源:9 张均为 AI 生成(本项目制作)\n\n' + SET['tags'])
65
+ cred_txt = '\n'.join(f"- {c['zh']} / {c['en']}: 「{c['file']}」 by {c['author']} · {c['license']} · {c['page']}" for c in credits) + '- 9 张均为 AI 生成图片(本项目制作)'
66
+ open(os.path.join(dist, '使用说明.txt'), 'w', encoding='utf-8').write(README.format(n=len(items), example=f"LIVE_{items[0]['id']}_{items[0]['en']}", title=SET['title'], body=body, credits=cred_txt))
67
+ zp = os.path.join(PUB, SET['zip'])
68
+ with zipfile.ZipFile(zp, 'w', zipfile.ZIP_STORED) as z:
69
+ for f in sorted(os.listdir(dist)):
70
+ z.write(os.path.join(dist, f), f"{SET['folder']}/{f}")
71
+ manifest = {'key': SET['key'], 'name': SET['name'], 'zip': SET['zip'], 'zipMB': round(os.path.getsize(zp) / 1e6, 1), 'items': out_items,
72
+ 'copy': {'title': SET['title'], 'body': body},
73
+ 'credits': [{'id': c['id'], 'zh': c['zh'], 'en': c['en'], 'author': c['author'], 'license': c['license'], 'licenseUrl': c.get('license_url') or '', 'page': c['page'], 'file': c['file']} for c in credits]}
74
+ json.dump(manifest, open('/tmp/work/site/pack9.json', 'w'), ensure_ascii=False, indent=1)
75
+ print('zip MB', manifest['zipMB'])
76
+
77
+
78
+ if __name__ == '__main__':
79
+ main()