{#if value && value.length > 0} { value = ""; if (!consoleView) return; const transaction = consoleView.state.update({ changes: [{ from: 0, to: consoleView.state.doc.length }], }); consoleView.dispatch(transaction); }} aria-label="Clear Search Button" > {/if} {#if $loading && !$initializing} { get(abortCtlr)?.abort?.(); if (!ffmpeg) return; // if () // ffmpeg?.terminate?.(); ffmpeg?.exit?.('break'); // ffmpegLoaded (async () => { loading.set(true); initializing.set(true); // await ffmpeg?.load?.({ // coreURL: FFmpegCoreUrl, // wasmURL: FFmpegCoreWASMUrl, // workerURL: FFmpegCoreWorkerUrl, // }); loading.set(false); initializing.set(false); })(); }} > {:else} {/if}
{#if value && value.length > 0 && tryURL(value)} {/if}
Examples
{#each samplesArr as sample, i} {/each}
Advanced FFmpeg Config
Logs
Results
{#if typeof $error == "string"} {$error} {:else if $loading || $initializing || $results.length <= 0} {$loading || $initializing ? "Loading..." + (!$initializing ? Math.round($progress * 100) + "%" : "") : "Empty..."} {/if}
{#each $results as { url, type }, i (url)} {#if url && type && url.length > 0}
{#if type == "video" || type == "audio"} {:else} {/if}
{/if} {/each}
Convert videos and images into gifs, vice-versa, etc...

I created this as a side-quest to
  1. Try using FFmpeg WASM (FFmpeg's WASM package feels older than I am, probs due Emscripten 🤷‍♂️)
  2. Plus, it seemed pretty neat to be able convert a gif to mp4 and vice-versa without needing to open it to a server.

Thanks @fbritoferreira for creating fbritoferreira/m3u8-parser it really is a beautiful library.

The playground uses @ffmpeg.wasm/main. FFmpeg and the corresponding media format libraries are licenced under GPL.