feat/fix: filmstrip.js — growing migrate flow + deltacast cleanup
This commit is contained in:
parent
b0f504ca69
commit
167d9ad009
1 changed files with 13 additions and 1 deletions
|
|
@ -26,6 +26,18 @@ export const filmstripWorker = async (job) => {
|
|||
try {
|
||||
await mkdir(tmpDir, { recursive: true });
|
||||
|
||||
// Check asset status before doing any work
|
||||
const assetRow = await query(
|
||||
'SELECT status FROM assets WHERE id = $1',
|
||||
[assetId]
|
||||
);
|
||||
const asset = assetRow.rows[0];
|
||||
|
||||
if (asset?.status === 'pending_migration') {
|
||||
console.log(`[filmstrip] asset ${assetId} is pending_migration, skipping`);
|
||||
return;
|
||||
}
|
||||
|
||||
// 1. Download proxy from S3
|
||||
await job.updateProgress(5);
|
||||
console.log(`[filmstrip] Downloading ${proxyKey} for asset ${assetId}`);
|
||||
|
|
@ -38,7 +50,7 @@ export const filmstripWorker = async (job) => {
|
|||
|
||||
// 3. Extract FRAME_COUNT frames evenly spaced across the clip using FFmpeg
|
||||
// fps filter: select one frame every (duration / frameCount) seconds.
|
||||
// select=not(mod(n\,step)) is less reliable than fps for variable-frame content.
|
||||
// select=not(mod(n\\,step)) is less reliable than fps for variable-frame content.
|
||||
const interval = durationSec / FRAME_COUNT;
|
||||
const outputGlob = join(tmpDir, 'frame-%03d.jpg');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue