OpenJPEG Plugin

Aaron Boxer boxerab at gmail.com
Tue May 10 13:37:38 UTC 2016


On Tue, May 10, 2016 at 8:36 AM, Nirbheek Chauhan <
nirbheek.chauhan at gmail.com> wrote:

> On Tue, May 10, 2016 at 4:51 PM, Aaron Boxer <boxerab at gmail.com> wrote:
> > Thanks, Sebastian and Nirbheek. I will test this out.
> > What is the simplest way of doing the following:
> >
> > 1) passing a single TIFF image to gstreamer, and have it output a J2K
> > encoded image
> > 2) passing a single J2K image to gstreamer, and have it output a TIF
> image
> > (or PNG for example)
> >
>
> For TIFF, gstreamer has:
> One encoder: avenc_tiff (wrapper around libav)
> Two decoders: avdec_tiff (wrapper around libav) and gdkpixbuf (if you
> build gdk-pixbuf with the tiff pixbuf loader).
>
> For JPEG2000, the best encoder/decoder is openjpeg.
>
> For converting a file from tiff to jp2k, something like this should work:
>
> multifilesrc location=test.tiff num-buffers=1 caps=image/jp2 !
> avdec_tiff ! videoconvert ! openjpegenc ! 'image/jp2' ! filesink
> location=test.jp2
>
> Note that you need to specify which format you want for JPEG2000:
> 'image/jp2' or 'image/x-jpc', etc.
> For converting jp2k to tiff, this should work:
>
> multifilesrc location=test.jp2 num-buffers=1 caps=image/jp2 !
> openjpegdec ! videoconvert ! avenc_tiff ! filesink location=test.tiff
>
> The reason why you need multifilesrc is because it allows you to
> specify the caps of the data which is needed by decoders that do not
> implement parsers (such as openjpegdec, avdec_tiff, etc). If you used
> something like pngdec you could use filesrc directly and the decoder
> would figure out the caps.
>


Awesome, thanks for the detailed instructions.

Aaron






> _______________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160510/72abd9f2/attachment.html>


More information about the gstreamer-devel mailing list