diff --git a/web/src/routes/remux/+page.svelte b/web/src/routes/remux/+page.svelte index ec42fa36..411112fe 100644 --- a/web/src/routes/remux/+page.svelte +++ b/web/src/routes/remux/+page.svelte @@ -11,13 +11,18 @@ let totalDuration: number | undefined; let processedDuration: number | undefined; + let speed: number | undefined; let progress = ''; $: { - if (totalDuration && processedDuration && processing) { - const percentage = ((processedDuration / totalDuration) * 100).toFixed(2); - progress = `(${percentage}%)`; - } else progress = ''; + if (totalDuration && processedDuration) { + const percentage = Math.min(100, (processedDuration / totalDuration) * 100).toFixed(2); + progress = `${percentage}%, ${speed}x`; + } else if (processing) { + progress = 'getting video metadata'; + } else { + progress = ''; + } } let processing = false; @@ -26,6 +31,10 @@ if (progress.out_time_sec) { processedDuration = progress.out_time_sec; } + + if (progress.speed) { + speed = progress.speed; + } }); ff.init(); @@ -83,7 +92,7 @@
{#if processing} - processing... {progress} + processing{progress ? ` (${(progress)})` : ''}... {:else} done! {/if}