enhance(backend): fluent-ffmpegをnode-avに変更 - #17790
Conversation
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughFFmpegを使用していた動画処理とセンシティブ判定を Changesnode-av移行
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)センシティブ判定フローsequenceDiagram
participant FileInfoService
participant node-av
participant SensitiveDetection
FileInfoService->>node-av: 動画フレームをデコード
node-av->>FileInfoService: PNGフレームを返却
FileInfoService->>SensitiveDetection: detectSensitiveManyへ渡す
SensitiveDetection->>FileInfoService: 判定結果を返却
動画サムネイル生成フローsequenceDiagram
participant VideoProcessingService
participant node-av
participant sharp
VideoProcessingService->>node-av: 映像ストリームを取得
VideoProcessingService->>node-av: シークしてフレームをデコード
node-av->>VideoProcessingService: フレームを返却
VideoProcessingService->>sharp: フレームをWebPへ変換
sharp->>VideoProcessingService: WebPを返却
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## develop #17790 +/- ##
===========================================
- Coverage 26.15% 26.08% -0.08%
===========================================
Files 1175 1175
Lines 40137 40036 -101
Branches 11146 11122 -24
===========================================
- Hits 10498 10442 -56
+ Misses 23791 23744 -47
- Partials 5848 5850 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/backend/rolldown.config.ts`:
- Line 101: Update the external-module matching used by the Rolldown
configuration around externalModules so it externalizes node-av and every
node-av/* subpath, such as node-av/api and node-av/constants, using a
prefix-aware matcher rather than an exact-only entry.
In `@packages/backend/src/core/FileInfoService.ts`:
- Around line 292-311: Update the Fibonacci index transition in the
frame-selection loop so targetIndex advances monotonically after each accepted
frame. Adjust the nextIndex calculation using the current target and next
Fibonacci values, ensuring the sequence does not remain at 1 and continues
selecting later frames.
In `@pnpm-workspace.yaml`:
- Line 34: pnpm-workspace.yaml の node-av 設定を false から true に戻し、node-av の
build/postinstall script を実行可能にしてください。packages/backend の node-av/api 利用に必要な
FFmpeg バイナリとネイティブ資産がインストール時に準備される状態を維持してください。
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 4bdb9e75-1029-48f0-9b55-8d4ac51c7320
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
.github/min.node-version.github/workflows/test-backend.yml.github/workflows/test-federation.ymlDockerfilepackages/backend/package.jsonpackages/backend/rolldown.config.tspackages/backend/src/core/FileInfoService.tspackages/backend/src/core/VideoProcessingService.tspackages/backend/src/misc/node-av-log.tspnpm-workspace.yaml
💤 Files with no reviewable changes (2)
- .github/workflows/test-federation.yml
- .github/workflows/test-backend.yml
|
このPRによるapi.jsonの差分 |
🖥 Frontend Diagnostics Report(No significant changes) Requests by resource type
V8 heap snapshot statistics
📦 Bundle StatsChunk size diff (0 updated, 0 added, 0 removed)
Startup chunk size (0 updated, 0 added, 0 removed)
Startup chunks are the Vite entry for
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
⚙️ Backend Diagnostics ReportMemory: After GC
Only metrics showing significant changes are displayed. V8 Heap Snapshot Statistics
Download representative heap snapshot: base / head |
|
入れるか |
|
メモリ使用量の増加はffmpegを埋め込んだから? |
|
それ以外にあんまり考えられる要素がない それか実装が悪い? |
|
明日ヒープスナップショット見てみるか |
ffmpegを埋め込んだからというよりはnode-av自体の実装が大きめという感じだった |
バンドルは試みたけど動かなかったので外部化している |
|
ほむん |
|
いけたかもしれない |
|
ちょっと確認したいことがあるのでいったんdraft |
|
PSSとUSSの増加は多分ffmpegのバイナリが入ったことによる増加の影響の方が大きそうだから想定内 |
|
node-avの次のバージョンでメモリリークが治るなどの改善が入るみたいなので、それを待ってみたい感はある |
|
ほむん |



What
この変更により、Node v22では動作しなくなる (2026.7.0にはマージしない)
Why
Close #17638
Close #17633
Fix #16529
Fix #9172
Additional info (optional)
Checklist