videoconverter-worker 1.0.4__tar.gz → 1.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: videoconverter-worker
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: VideoConverter Python Worker:从 queue 目录读取任务并执行切分/去字幕/合成
5
5
  License: MIT
6
6
  Keywords: videoconverter,ffmpeg,worker,video
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "videoconverter-worker"
7
- version = "1.0.4"
7
+ version = "1.0.6"
8
8
  description = "VideoConverter Python Worker:从 queue 目录读取任务并执行切分/去字幕/合成"
9
9
  readme = "README.txt"
10
10
  requires-python = ">=3.8"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: videoconverter-worker
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: VideoConverter Python Worker:从 queue 目录读取任务并执行切分/去字幕/合成
5
5
  License: MIT
6
6
  Keywords: videoconverter,ffmpeg,worker,video
@@ -37,7 +37,8 @@ def _desub_spinner(stop_event: threading.Event) -> None:
37
37
  while not stop_event.wait(0.25):
38
38
  dots = "." * ((i % 3) + 1)
39
39
  try:
40
- sys.stderr.write("\r [INFO] worker: 去字幕中 " + dots + " ")
40
+ ts = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
41
+ sys.stderr.write(f"\r{ts} [INFO] worker: 去字幕中 {dots} ")
41
42
  sys.stderr.flush()
42
43
  except (OSError, UnicodeEncodeError):
43
44
  break
@@ -198,7 +199,7 @@ def _log_split_to_merge_duration(data: dict, task_id: str, store: QueueStore) ->
198
199
  if processed and duration_sec > 0:
199
200
  src_duration_sec = processed[-1]["endTime"] - processed[0]["startTime"]
200
201
  capacity = (src_duration_sec / 3600.0) / (duration_sec / 3600.0)
201
- msg += f",产能预估: {capacity:.2f} 原视频小时/小时"
202
+ msg += f",产能预估: {capacity:.2f}(HV/h)"
202
203
  logger.info("videoId=%s %s", data.get("videoId", ""), msg)
203
204
  store.add_log(task_id, "INFO", msg)
204
205
  except Exception:
@@ -398,7 +399,7 @@ def run_simple_compose(
398
399
  src_duration_sec = end_sec - start_sec
399
400
  capacity = (src_duration_sec / 3600.0) / (elapsed / 3600.0) if elapsed > 0 else 0
400
401
  logger.info(
401
- "简易模式完成: %s,从切分到合成结束总时长: %s,产能预估: %.2f 原视频小时/小时",
402
+ "简易模式完成: %s,从切分到合成结束总时长: %s,产能预估: %.2f(HV/h)",
402
403
  out_file, _format_duration(elapsed), capacity,
403
404
  )
404
405
  return str(out_file)