PDA

View Full Version : Help with MJPEG 2000


Hyper Shinchan
9th October 2006, 16:12
In the last few days i was getting interested into testing MJPEG 2000 formats, but I'm having several difficulties. as you know actually there are few software that support it (just like there are few software that support the simple JPEG 2000, but here we are talking about just 3 avaible solutions), mainly for the problems with the licenses and of course because it's a new standard and that it's not really useful for end-users.
Anyway I was trying to use kakadu softwares (just for testing purpose of course), but I've various problem with it.
The first problem is with the weird .vix file format used by the encoder (kdu_v_compress.exe). It would be a simple raw rbg or yuv file with a simple textual header, but I'm not able to create such file, the encoded file are always wrong. Is anyone able to understand that file format? A description of the file format is avaible using the -usage string as argument in the compressor.
I've an other problem with the kdu_merge.exe. When i input file it doesn't find them if I input them as:
kdu_merge.exe -i C:\myfile1.jp2,C:\myfile2.jp2,.....
but it finds them as:
kdu_merge.exe -i myfile1.jp2,myfile2.jp2,....
Of course it works only if I put them in C:\... it's really weird....
An other freely avaible solution is the OPEN JPEG encoder, but it's only as source file they don't offer binaries (well, they offer binaries, but for the newest version of their software that doesn 't include the MJ2 encoder). The source files can be found here: http://www.openjpeg.org/openjpeg_v097.tar.gz, if anyone make a build for windows I'd really like to test it.
Kakadu page: http://www.kakadusoftware.com/
Well, thank you in advance.
EDIT: http://digilander.libero.it/Hyper_Shinchan/MJ2/rei.mj2 this a MJ2 test file created using the merge tool of the Kakadu software. The original jp2 files were created with QT7. if you decompress this file you can take a look to the vix file format.

bond
9th October 2006, 18:47
iirc the jpeg2000 format is a mp4 variant, like .3gp. try some of the mp4 tools available

Hyper Shinchan
12th October 2006, 11:06
As you said Motion JPEG-2000 is derivated from the ISO base file format (MPEG-4/JPEG-2000 part 12) but it has a file signature at the beginning of the file that make the file unreadable to almost all the current mp4tools (for example MP4Box can't parse the file).
A solution is to remove this value with an hex editor and then re-add it.
However I was more interested into creating MJPEG 2000 video and so I would need to understand the structure of the kakadu input files.
I was able to build by myself the binaries (!) of the Open JPEG encoder, that it's more user-friendly, it uses as input normal YUV files. Sadly it doesn't allow RGB input....
http://digilander.libero.it/Hyper_Shinchan/MJ2/openjpeg_v097.7z
Other test samples:
http://digilander.libero.it/Hyper_Shinchan/MJ2/foreman_part_qcif.mj2
http://digilander.libero.it/Hyper_Shinchan/MJ2/foreman_part_qcif_422.mj2
http://digilander.libero.it/Hyper_Shinchan/MJ2/foreman_part_qcif_444.mj2