Log in

View Full Version : Importing 12-bit JPEG2000 sequences in AviSynth+?


TomArrow
23rd December 2018, 12:26
I have some JPEG2000 sequences in 12 bit I would like to import. They are in XYZ colorspace, but for my purposes I'm just fine if they are imported as "RGB", I can take care of the XYZ->RGB conversion myself.

So far the best way I know is to convert them to TIFF via OpenJPEG, but this creates a huge amount of wasted bits (around 35 MB per file compared to around 500KB).

Tried OpenJPEG, just in case, doesn't work. ImageSource doesn't work either. I also tried importing an .mxf file with the identical JPEG2000 stream via FFMS2, didn't work either. All of those just threw an alert box with an error and that was that.

Is there any way? Hell, I would even be fine with somehow frameserving the JPEG2000 sequence into AVS+ if that is possible somehow.

poisondeathray
23rd December 2018, 19:21
I also tried importing an .mxf file with the identical JPEG2000 stream via FFMS2, didn't work either. All of those just threw an alert box with an error and that was that.


What is your jpeg2000 sequence exactly ?

ffms2 should work with the mxf; it might be your ffms2 version wasn't complied with support. Try another, or newer version. jpeg2000 has dozens of variants, but the DCP compliant version should work ok

An image sequence is possible too, but it's very slow with avs, because the work around uses FFImageSource with scriptclip

Other options are vapoursynth , which can load with Imagemagick, or ffms2 with python to load an image sequence (or mxf directly) . You can do your manipulations in vapoursynth or import certain pixel types into avisynth with vsimport (12bit RGB or YUV is not supported for that vsimport plugin, so you'd probably go to 16)

SeeMoreDigital
23rd December 2018, 19:34
Hi Tom,

Are you able to provide some of your Jpeg2000 images?