Batch rendering rejects JSON files saved with a byte order mark
メンテナーはふだん 1 日以内に返信
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 74/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- cli
調査の方向性
packages/cli/src/jsonFlag.ts から始めてください。ここには既存の BOM/UTF-16 デコーダーがあり、render --batch が使うバッチリーダーを見つけてください — issue によると、それはそのデコーダーをバイパスしています。バッチファイルの読み取りを同じデコーダー経由にし、BOM 付き UTF-8 と UTF-16LE 入力に対応するテストを追加してください。完了とは、両方の再現コマンドが Café を含み total: 1, completed: 1, failed: 0 の動画を1本レンダリングすることです。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
render --batch rejects otherwise valid batch data saved as UTF-8 with a byte order mark (BOM), or as BOM-marked UTF-16LE. This blocks batch files written by Windows editors and Windows PowerShell 5.1. The CLI already has a decoder for these encodings in jsonFlag.ts, but the batch reader bypasses it.
Minimal reproduction
From a repository checkout after the normal bun install and bun run build, create a one-second project and the two batch files:
node --input-type=module <<'JS'
import { mkdirSync, writeFileSync, copyFileSync } from 'node:fs';
mkdirSync('bom-batch');
writeFileSync('bom-batch/index.html', `<!doctype html>
<html lang="en" data-composition-variables='[{"id":"title","type":"string","label":"Title","default":"Default"}]'>
<head><meta charset="UTF-8"><title>Batch encoding reproduction</title>
<script src="gsap.min.js"></script>
<style>body{margin:0;background:#111;color:#fff;font-family:sans-serif}#root{width:100%;height:100%;display:grid;place-items:center}h1{font-size:36px}</style></head>
<body><div id="root" data-composition-id="main" data-width="320" data-height="180" data-duration="1">
<h1 class="clip" data-start="0" data-duration="1" data-track-index="0"><span data-var-text="title">Default</span></h1>
</div><script>window.__timelines["main"]=gsap.timeline({paused:true});</script></body></html>
`);
copyFileSync('packages/player/node_modules/gsap/dist/gsap.min.js', 'bom-batch/gsap.min.js');
for (const encoding of ['utf8', 'utf16le']) {
writeFileSync(`bom-batch/rows-${encoding}.json`, Buffer.from('\uFEFF[{"title":"Café"}]', encoding));
}
JS
Steps to reproduce
cd bom-batch
node --import ../node_modules/tsx/dist/loader.mjs ../packages/cli/src/cli.ts render \
--batch rows-utf8.json --output 'renders/{index}.mp4' \
--fps 1 --workers 1 --json --quiet --strict-variables
Repeat with --batch rows-utf16le.json. The same problem occurs through the built packages/cli/bin/hyperframes.mjs entry point.
Expected behavior
Decode the file's encoding marker, parse the row and render one video containing Café, as with the same JSON in unmarked UTF-8.
Actual behavior
Both commands exit 1 before rendering with Invalid JSON in --batch. UTF-8 reports Unexpected token at U+FEFF; UTF-16LE reports Unexpected token at U+FFFD after the bytes are decoded as UTF-8. No batch output is produced.
Environment
- Baseline:
7e92aec502c6a56488807c3cf9edb8371c854abd(CLI 0.8.209). - Linux arm64, Node 24.22.1, Bun 1.4.4, FFmpeg/FFprobe 7.0.2, system Chromium 156.0.8078.47.
- Byte-exact UTF-8 BOM and UTF-16LE BOM fixtures were generated on Linux. Native Windows shell execution was not tested.
Additional context
The matching unmarked UTF-8 control renders successfully. Reusing the existing decoder makes both marked inputs render successfully too: each result reports total: 1, completed: 1, failed: 0, durationMs: 1000, with title: "Café". FFprobe confirms H.264, 320×180 and a 1-second duration; decoded frames were inspected.
Related work checked: #5725 covers project configuration, #6580 covers HTML decoding, and #6591 covers undefined injected readers for --variables-file. None changes this batch-file reader.
- 主要言語
- TypeScript
- スター
- 54.1k
- フォーク
- 4.9k
- 平均マージ
- 11時間 3分
- マージ済み PR(30日)
- 772
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
heygen-com/hyperframes のほかの issue
-
bug difficulty/easy triage/ready
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
heygen-com/hyperframes#6481 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Timeline: show a clip's full name when its label is cut off対応中かも @DanielMcSheehy が 11 日前に担当しました。 オープンdesktop-candidate difficulty/easy enhancement good first issue help wanted triage/ready
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
heygen-com/hyperframes#5582 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
Studio: press ? to open the keyboard shortcuts panel対応中かも @B-Payal が 15 日前に担当しました。 オープンdesktop-candidate difficulty/easy enhancement good first issue help wanted triage/ready
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
heygen-com/hyperframes#5580 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
lint: add tests for three caption rules that have none対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンdifficulty/easy enhancement help wanted triage/ready
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
heygen-com/hyperframes#5388 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Project archives silently replace existing assets when external paths collide対応中かも @AksharP5 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 35/100
heygen-com/hyperframes#6721 ·
メンテナーはふだん 1 日以内に返信
heygen-com/hyperframes の issue をすべて見る
似ている issue
-
Parallel reticle_verify opens per-flow leases without the source lease's ignoreHTTPSErrors対応中かも @as992949791 が今日担当しました。 オープンgood first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
reticlehq/reticle#2033 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
area:quality p3-medium ready-for-agent type:docs
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
fderuiter/deruiter.dev#3589 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
manfredsteyer/angular-oauth2-oidc#1514 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
marmelab/react-admin#11431 ·
メンテナーはふだん 1 日以内に返信