Files
ArtPlayer/assets/sample/subtitle.srt
T
糖猫猫andrionzhao 0896841d23 feat: batch video upscaling with folder upload, directory save, and result comparison (#1051)
* feat: support batch video upscaling with folder upload and directory save

- Add multi-file selection and entire folder upload (webkitdirectory)
- Support drag & drop of both files and folders via FileSystemEntry API
- Add save directory picker using File System Access API (showDirectoryPicker)
- Process videos sequentially with per-file progress and status tracking
- Add right-side result list with click-to-compare functionality
- Add per-video duration and total batch duration display
- Add retry button for failed items with error detail display
- Remove auto-play on comparison viewer load
- Fix worker error handling: handle "error" command to reject stale promises
- Fix event listener accumulation in video comparison (AbortController)
- Fix XSS risk by escaping HTML in all innerHTML injections
- Fix URL revocation timing in download to prevent large file truncation
- Extract writeToSaveDirectory and truncateName helpers to reduce duplication
- Add Usage Guide panel explaining single/multiple/folder upload options

Files changed:
  docs/upscaler/index.html  (+1110/-181)
  docs/upscaler/upscaler.js (+110)

* fix: prevent auto-play and resource consumption during upscaling

- Set preload="metadata" on preview and comparison video elements
- Explicitly pause preview video after setting src in showVideoPreview
- Remove preview video seek sync from batch processing progress callbacks
  (was causing continuous decode during upscaling, wasting GPU resources)
- Remove preview video seek sync from retry progress callback
- All videos now require manual play; no background resource usage

* fix: improve upscaled video quality with higher bitrate and codec support

- Raise base bitrate from 2.5 Mbps (25e5) to 8 Mbps (8e6) for standard and
  firefox processors, preventing quality loss when source videos have high
  bitrates (e.g. 720p @ 16.7 Mbps was producing 1440p @ 10 Mbps, smaller
  than the original file)
- Double the bitrate for mediabunny processor (X.n1 * 2) to account for the
  4x pixel increase from 2x upscaling
- Add H.264 Level 5.1 (avc1.640033) and Level 5.2 (avc1.640034) codecs to
  the fallback lists, since Level 4.0 (avc1.640028, ~24.6 Mbps) cannot
  support the higher bitrates for 1440p+ outputs
- Add latencyMode: "quality" to VideoEncoder configs for both standard and
  firefox processors, prioritizing encoding quality over latency (suitable
  for offline processing)

* feat: add video data comparison panel for original vs upscaled metrics

- Add a comparison data table below the file info bar showing 6 metrics:
  Resolution, File Size, Duration, Est. Bitrate, Pixels, Process Time
- Display per-metric change percentage with color-coded indicators:
  green (↑) for improvements, red (↓) for regressions, gray for neutral
- Estimated bitrate calculated from file size × 8 / video duration
- Table renders after both original and upscaled video metadata loads
- Auto-hide panel on reset

* fix: make video data comparison panel full-width and responsive

- Move comparison data table from inside the left column to the full-width
  area below the left/right layout, so it is no longer constrained by the
  comparison viewer column width
- Remove table-fixed colgroup and overflow-x-auto that caused horizontal
  scrolling on smaller screens
- Table now uses w-full auto-layout, displaying all 4 columns (Metric,
  Original, Upscaled, Change) without requiring horizontal scrolling

---------

Co-authored-by: rionzhao <rionzhao@tencent.com>
2026-09-10 17:19:38 +08:00

169 lines
2.4 KiB
Plaintext

1
00:00:00,306 --> 00:00:00,844
那一天
あの日
2
00:00:01,280 --> 00:00:02,220
星星降落的日子
星が降った日
3
00:00:03,148 --> 00:00:04,412
那简直是
それはまるで
4
00:00:04,446 --> 00:00:04,966
简直
まるで
5
00:00:05,120 --> 00:00:06,300
像梦中的景色一样
夢の景色のように
6
00:00:07,438 --> 00:00:08,978
美丽的景色
美しい眺めだった
7
00:00:24,596 --> 00:00:25,089
放学后
放課後
8
00:00:25,705 --> 00:00:26,261
不好
悪い
9
00:00:26,475 --> 00:00:27,679
我今天开始打工
おれ今日これからバイト
10
00:00:29,345 --> 00:00:31,689
已经讨厌这样的乡下了
もうこんな田舎嫌だよー
11
00:00:31,969 --> 00:00:33,527
讨厌这样的人生
こんな人生嫌だ
12
00:00:33,927 --> 00:00:37,970
来世请让我成为东京的帅哥吧
来世は東京のイケメン男子にしてくださーい
13
00:00:42,083 --> 00:00:42,874
哪里
どこ
14
00:00:43,052 --> 00:00:44,166
那么说来
そういえば
15
00:00:44,554 --> 00:00:47,078
我觉得好像一直做着奇怪的梦
ずっと変な夢を見てたような気がするんだけど
16
00:00:48,324 --> 00:00:50,626
别人的人生中…梦
別の人の人生の…夢
17
00:00:51,452 --> 00:00:52,740
这是什么
何だ これ
18
00:00:54,778 --> 00:00:55,442
这个,这个
これって
19
00:00:56,724 --> 00:00:57,724
这难道是
これってもしかして
20
00:00:58,076 --> 00:00:59,328
我们在梦中
俺達は夢の中で
21
00:01:00,136 --> 00:01:01,202
替换着
入れ替わってる
22
00:01:07,369 --> 00:01:08,297
确实的事情
確かなことが
23
00:01:08,757 --> 00:01:09,541
只有一个
一つだけある
24
00:01:10,325 --> 00:01:11,037
我们是
私達は
25
00:01:11,425 --> 00:01:12,317
见面的话绝对
会えば絶対
26
00:01:12,681 --> 00:01:13,531
马上就明白
すぐにわかる
27
00:01:14,255 --> 00:01:15,279
我想说
言おうと思ったんだ
28
00:01:16,075 --> 00:01:17,579
你是世界的无论在哪里
お前が世界のどこにいても
29
00:01:17,955 --> 00:01:19,051
一定要去见你
必ず会いに行くって
30
00:01:20,141 --> 00:01:20,943
你是
あなたは
31
00:01:21,361 --> 00:01:21,803
谁
誰
32
00:01:22,197 --> 00:01:22,759
你是
お前は
33
00:01:23,483 --> 00:01:24,039
谁
誰だ
34
00:01:25,693 --> 00:01:26,465
你的名字是
君の名は