mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-27 01:21:20 -08:00
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>
This commit is contained in:
commit
0896841d23
538 files changed
+379715
No files matched your search
@@ -0,0 +1 @@
|
||||
[{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u6253\u620f\u8d4f\u5fc3\u60a6\u76ee","time":60.139,"color":"#FFFFFF"},{"text":"\u6765\u770b\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u6f14\u6280\u5927\u8d4f","time":61.765,"color":"#FABE96"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u597d\u4e0a\u955c","time":61.857,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u6253\u620f\u975e\u5e38\u884c\u4e91\u6d41\u6c34","time":61,"color":"#FFFFFF"},{"text":"\u60f3\u5230\u4e86\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u6a21\u4eff\u522b\u4eba\u5b66\u7740\u4f9d\u504e\u7684\u6837\u5b50","time":61.486,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u4eea\u6001\u597d\u6c14\u8d28\u4f73","time":62.995,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u6253\u620f\u8d4f\u5fc3\u60a6\u76ee","time":62.925,"color":"#FFFFFF"},{"text":"\u770b\u4e86\u8fd9\u4e2a\u5267\u66f4\u559c\u6b22\u7f57\u4e91\u7199\u4e86","time":62.717,"color":"#FFFFFF"},{"text":"\u6211\u53ef\u592a\u559c\u6b22\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u7684\u7709\u773c\u4e86","time":63.529,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u554a\u554a\u554a\u554a","time":63.287,"color":"#FFFFFF"},{"text":"\u5927\u7231\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u7684\u989c\u503c\u6c14\u8d28","time":64.412,"color":"#FFFFFF"},{"text":"\u9ed1\u5316\u5427\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec","time":64.365,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u6f14\u6280\u975e\u5e38\u597d","time":65.875,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u6253\u620f\u771f\u7cbe\u5f69","time":66.107,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u8ff7\u7684\u6211\u4e94\u8ff7\u4e09\u9053","time":66.316,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u62ff\u7a33\u88ab\u8650\u5267\u672c","time":66.873,"color":"#FFFFFF"},{"text":"\u6765\u770b\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u6f14\u6280\u5927\u8d4f","time":67.407,"color":"#FABE96"},{"text":"\u770b\u5b8c\u4e0a\u5b98\u900f\u6765\u770b\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u8fa3","time":67.848,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u6253\u620f\u884c\u4e91\u6d41\u6c34","time":67.964,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u725b\u903c","time":67.454,"color":"#FFFFFF"},{"text":"\u7247\u5934\u90fd\u820d\u4e0d\u5f97\u8df3","time":68.336,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u6253\u620f\u5f88\u597d","time":68.661,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u51fa\u573a\u5373\u60ca\u8273","time":68.474,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u7684\u6bcf\u4e00\u4e2a\u89d2\u8272\u90fd\u8ba9\u4eba\u65e0\u6cd5\u6297\u62d2","time":68.984,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u786e\u5b9e\u503c\u5f97\u4e00\u770b","time":69.311,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u6211\u592a\u53ef\u4ee5\u4e86","time":69,"color":"#FFFFFF"},{"text":"\u770b\u4e86\u8fd9\u4e2a\u5267\u66f4\u559c\u6b22\u7f57\u4e91\u7199\u4e86","time":69.915,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u80fd\u628a\u60ac\u6d6e\u7684\u6fb9\u53f0\u70ec\u9970\u6f14\u7684\u8ba9\u4eba\u5171\u60c5","time":69,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6f14\u6280\u592a\u597d\u4e86","time":69.775,"color":"#FFFFFF"},{"text":"\u5439\u7206\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec","time":70.356,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u771f\u662f\u624b\u63a7\u798f\u5229","time":70.913,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u60c5\u5546\u6ee1\u5206","time":70.797,"color":"#FFFFFF"},{"text":"\u4e0b\u73ed\u5403\u996d\u5b8c\u5c31\u6253\u5f00\u7535\u8111","time":70.89,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u53e4\u88c5\u9ca8\u6211","time":70.1,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u597d\u5e05","time":70,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u7f57\u4e91\u7199","time":70.978,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u65f6\u9694\u4e94\u5e74\u7684\u53e4\u88c5\u4ed9\u4fa0\u957f\u6708\u70ec\u660e","time":70.867,"color":"#FFFFFF"},{"text":"\u5927\u7231\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u7684\u989c\u503c\u6c14\u8d28","time":71.238,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u7684\u6fb9\u53f0\u70ec\u975e\u5e38\u6709\u827a\u672f\u5438\u5f15\u529b","time":71,"color":"#FFFFFF"},{"text":"\u770b\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u7b80\u76f4\u662f\u79cd\u4eab\u53d7","time":72.515,"color":"#FFFFFF"},{"text":"\u597d\u559c\u6b22\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u7684\u8fd9\u4e2a\u611f\u89c9","time":72.33,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec\u597d\u82cf\u554a","time":72,"color":"#FFFFFF"},{"text":"\u559c\u6b22\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec","time":72.33,"color":"#FFFFFF"},{"text":"\u71ac\u591c\u770b\u7f57\u4e91\u7199\u6fb9\u53f0\u70ec","time":72.98,"color":"#FFFFFF"},{"text":"\u7f57\u4e91\u7199\u6fb9\u53fLine truncated
|
||||
Reference in new issue
Block a user