← Back

Decode Motion JPEG 2000 video using the <canvas> tag

Motion JPEG 2000 (ISO/IEC 15444-3) stores each frame as an independent JPEG 2000 picture, so the still-image decoder of the JPEG 2000 demo is reused unchanged: isobmff_1 demultiplexes the mjp2 track and openjpeg_1 expands one frame per sample into the compositor. Each sample here is a complete JP2 file rather than a bare codestream, so the decoder walks the boxes to find the jp2c payload and reads the colour space from colr — sYCC in this sequence, which comes out as 4:2:0 with no conversion at all.

Code snippet

<canvas is="universal-canvas_1" data-url="testcard_j2k.mov" using="solver_1"
     with="isobmff_1;openjpeg_1"> </canvas>

Specifications :

The specifications of the test sequence are :

Format Motion JPEG 2000 (mjp2), 320x180, 25 fps, 50 frames
FileSize 411 Ko
Solver solver_1