mirror of
https://github.com/immich-app/immich.git
synced 2025-06-02 21:24:28 -04:00
fix(server): nan transcoding estimate (#13693)
fix nan transcoding estimate
This commit is contained in:
parent
c124cf9ace
commit
a76c39812f
@ -200,7 +200,7 @@ export class MediaRepository implements IMediaRepository {
|
|||||||
|
|
||||||
lastProgressFrame = progress.frames;
|
lastProgressFrame = progress.frames;
|
||||||
const percent = ((progress.frames / frameCount) * 100).toFixed(2);
|
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 duration = ms ? Duration.fromMillis(ms).rescale().toHuman({ unitDisplay: 'narrow' }) : '';
|
||||||
const outputText = output instanceof Writable ? 'stream' : output.split('/').pop();
|
const outputText = output instanceof Writable ? 'stream' : output.split('/').pop();
|
||||||
this.logger.debug(
|
this.logger.debug(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user