qgyd2021 commited on
Commit
5d69c1b
·
1 Parent(s): 4137d9e
data/porter_tasks/porter_task_chenjieshen_douyin_live_record_to_hf_netdisk.json CHANGED
@@ -143,6 +143,18 @@
143
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_hf_netdisk/live_record/陈杰森/file_info.json",
144
  "extra_tags": ["陈杰森"]
145
  },
 
 
 
 
 
 
 
 
 
 
 
 
146
  {
147
  "enable": true,
148
  "type": "douyin_live_record",
 
143
  "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_hf_netdisk/live_record/陈杰森/file_info.json",
144
  "extra_tags": ["陈杰森"]
145
  },
146
+ {
147
+ "enable": true,
148
+ "type": "douyin_live_record",
149
+ "room_name": "清源第十帅",
150
+ "room_id": "81689018506",
151
+ "sec_user_id": "MS4wLjABAAAAEYlZ5AWlOqQnQf-e7qGWrarvtqYQqoYgN4Rpd0TS2frZS2hnGmVt-6UN1vQKrk6g",
152
+ "key_of_credentials": "douyin_wentao_credentials",
153
+ "check_interval": 10,
154
+ "output_video_dir": "data/tasks/chenjieshen_douyin_live_record_to_hf_netdisk/live_record/陈杰森",
155
+ "output_video_info_file": "data/tasks/chenjieshen_douyin_live_record_to_hf_netdisk/live_record/陈杰森/file_info.json",
156
+ "extra_tags": ["陈杰森"]
157
+ },
158
  {
159
  "enable": true,
160
  "type": "douyin_live_record",
toolbox/porter/tasks/video_format_convert_task.py CHANGED
@@ -149,9 +149,14 @@ class VideoFormatConvertTask(BaseTask):
149
  command = [
150
  "ffmpeg",
151
  "-i", input_file_.as_posix(),
152
- "-crf", "23", # 视频质量(18-28,数值越小质量越高,文件越大)
 
 
153
  "-c:a", "aac",
154
- "-b:a", "128k", # 音频比特率
 
 
 
155
  output_file_.as_posix(),
156
  ]
157
  elif self.cmd_plan == "tertiary":
@@ -159,10 +164,18 @@ class VideoFormatConvertTask(BaseTask):
159
  "ffmpeg",
160
  "-i", input_file_.as_posix(),
161
  "-c:v", "libx264",
162
- "-crf", "28",
163
- "-preset", "slow",
 
 
 
 
164
  "-c:a", "aac",
165
- "-b:a", "96k",
 
 
 
 
166
  output_file_.as_posix(),
167
  ]
168
  else:
 
149
  command = [
150
  "ffmpeg",
151
  "-i", input_file_.as_posix(),
152
+ "-c:v", "libx265", # 使用 H.265,压缩率更高
153
+ "-crf", "32", # H.265 的 CRF 可以更高
154
+ "-preset", "fast",
155
  "-c:a", "aac",
156
+ "-b:a", "32k",
157
+ "-tag:v", "hvc1", # 兼容性标签
158
+ "-movflags", "+faststart",
159
+ "-y",
160
  output_file_.as_posix(),
161
  ]
162
  elif self.cmd_plan == "tertiary":
 
164
  "ffmpeg",
165
  "-i", input_file_.as_posix(),
166
  "-c:v", "libx264",
167
+ "-r", "10", # 极低帧率
168
+ "-crf", "38", # 很高的CRF
169
+ "-preset", "veryslow", # 最慢但压缩最好
170
+ "-tune", "zerolatency",
171
+ "-profile:v", "baseline", # 最低profile
172
+ "-level", "3.0",
173
  "-c:a", "aac",
174
+ "-b:a", "16k", # 极低音频比特率
175
+ "-ac", "1",
176
+ "-ar", "16000", # 电话质量采样率
177
+ "-movflags", "+faststart",
178
+ "-y",
179
  output_file_.as_posix(),
180
  ]
181
  else: