Downloading...

Console usage

This page allows running the MP4Box and GPAC applications in web browsers.

The webassembly build is experimental. It tries to uses webcodecs whenever decoding or encoding is involved. If webcodecs can't be used, it falls back to software implementation running in wasm.

Select an exemple and make edits, or type in your own command. Finally press Enter key or click the Run button.

Remote DASH and HLS playlists can be used as input, provided that they are hosted with proper CORS configurations.

The console also provides basic shell file system, commands to import media export media files, and support advanced gpac configuration, as described below:

File import / export

IndexedDB is used for persistent storage, mounted at /idbfs. Typing any command will synchronize the file system.

Handling large files

The variable $(NAME) can be used to design a file not on Emscripten's file system. The file will be handled as a stream (not copied). This is the recommended methods for handling large files.

If NAME is an absolute URL other than file:// scheme:

Otherwise, NAME designs a file to be picked on the user's file system

For output files, the extension will be used to derive the output format, e.g. ($file.ts) will use MPEG-2 TS. Use $(file):ext=ts to override format if desired. This syntax CANNOT work when editing files (MP4Box, dasher context, etc...).

Shell commands

Configuration commands

Performances

The default behaviour for gpac app is to run on the browser/worker main loop in non-blocking mode, running the session at most 100 times before returning control.

This can be configured when calling gpac (see gpac -hx), for example:

When running without worker, internal threading of filters (e.g. ffmpeg & co) will be disabled if the session runs only on the main thread.

Use -threads=N with N > 0 (typically -threads=1) to enable threading in these filters.