Skip to content

Commit

Permalink
fix nan transcoding estimate
Browse files Browse the repository at this point in the history
  • Loading branch information
mertalev committed Oct 23, 2024
1 parent c124cf9 commit 5621df1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/src/repositories/media.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ export class MediaRepository implements IMediaRepository {

lastProgressFrame = progress.frames;
const percent = ((progress.frames / frameCount) * 100).toFixed(2);
const ms = Math.floor((frameCount - progress.frames) / progress.currentFps) * 1000;
const ms = progress.currentFps ? Math.floor((frameCount - progress.frames) / progress.currentFps) * 1000 : 0;
const duration = ms ? Duration.fromMillis(ms).rescale().toHuman({ unitDisplay: 'narrow' }) : '';
const outputText = output instanceof Writable ? 'stream' : output.split('/').pop();
this.logger.debug(
Expand Down

0 comments on commit 5621df1

Please sign in to comment.