JPEG 2000 over RTP

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

JPEG 2000 over RTP

boxerab@gmail.com
Hello GStreamers,

I am interested in streaming single frame J2K images over RTP.

I noticed there was a year-old issue in Bugzilla about
inability to stream single images using rtpj2kpay/rtpj2kdepay

https://bugzilla.gnome.org/show_bug.cgi?id=745187

Does anyone here have any insight into why this might be broken?

The original reporter never solved the problem.

Thanks very much,
Aaron



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: JPEG 2000 over RTP

Sebastian Dröge-3
On Mi, 2016-04-27 at 13:02 -0400, Aaron Boxer wrote:

> Hello GStreamers,
>
> I am interested in streaming single frame J2K images over RTP.
>
> I noticed there was a year-old issue in Bugzilla about
> inability to stream single images using rtpj2kpay/rtpj2kdepay
>
> https://bugzilla.gnome.org/show_bug.cgi?id=745187
>
> Does anyone here have any insight into why this might be broken?
The payloader or depayloader seem to have problems with many JPEG2000
bitstreams. They sometimes work, but get stuck on most others.

Someone will have to debug what goes wrong in there and make it handle
more JPEG2000 bitstreams properly.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: JPEG 2000 over RTP

boxerab@gmail.com


On Thu, Apr 28, 2016 at 2:28 AM, Sebastian Dröge <[hidden email]> wrote:
On Mi, 2016-04-27 at 13:02 -0400, Aaron Boxer wrote:
> Hello GStreamers,
>
> I am interested in streaming single frame J2K images over RTP.
>
> I noticed there was a year-old issue in Bugzilla about
> inability to stream single images using rtpj2kpay/rtpj2kdepay
>
> https://bugzilla.gnome.org/show_bug.cgi?id=745187
>
> Does anyone here have any insight into why this might be broken?

The payloader or depayloader seem to have problems with many JPEG2000
bitstreams. They sometimes work, but get stuck on most others.

Someone will have to debug what goes wrong in there and make it handle
more JPEG2000 bitstreams properly.


Thanks, Sebastian. I guess I will take a look. What library is used for parsing the JPEG 2000 streams?



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: JPEG 2000 over RTP

Sebastian Dröge-3
On Do, 2016-04-28 at 08:22 -0400, Aaron Boxer wrote:

> > Someone will have to debug what goes wrong in there and make it
> > handle more JPEG2000 bitstreams properly.
>
> Thanks, Sebastian. I guess I will take a look. What library is used
> for parsing the JPEG 2000 streams?

None, the relevant bits are all in the JPEG2000 payloader and
depayloader code. No external dependencies.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: JPEG 2000 over RTP

boxerab@gmail.com


On Thu, Apr 28, 2016 at 9:15 AM, Sebastian Dröge <[hidden email]> wrote:
On Do, 2016-04-28 at 08:22 -0400, Aaron Boxer wrote:

> > Someone will have to debug what goes wrong in there and make it
> > handle more JPEG2000 bitstreams properly.
>
> Thanks, Sebastian. I guess I will take a look. What library is used
> for parsing the JPEG 2000 streams?

None, the relevant bits are all in the JPEG2000 payloader and
depayloader code. No external dependencies.

Thanks. Would it make sense to use OpenJPEG to do the parsing?
It would guarantee that all known code streams are supported

I can make whatever modifications necessary to OpenJPEG to extract
the payload. Except, I might have to do this in a branch, if the maintainers
do not accept the changes.



 

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: JPEG 2000 over RTP

Sebastian Dröge-3
On Do, 2016-04-28 at 10:15 -0400, Aaron Boxer wrote:

>
>
> On Thu, Apr 28, 2016 at 9:15 AM, Sebastian Dröge  wrote:
> > On Do, 2016-04-28 at 08:22 -0400, Aaron Boxer wrote:
> > > 
> > > > Someone will have to debug what goes wrong in there and make it
> > > > handle more JPEG2000 bitstreams properly.
> > >
> > > Thanks, Sebastian. I guess I will take a look. What library is used
> > > for parsing the JPEG 2000 streams?
> >
> > None, the relevant bits are all in the JPEG2000 payloader and
> > depayloader code. No external dependencies.
> Thanks. Would it make sense to use OpenJPEG to do the parsing? 
> It would guarantee that all known code streams are supported
>
> I can make whatever modifications necessary to OpenJPEG to extract
> the payload. Except, I might have to do this in a branch, if the maintainers
> do not accept the changes.
No, the payloader/depayloader should have no external dependencies and
you probably also don't save a lot of work with that as the parsing
needs to be closely integrated with the payloading/depayloading anyway.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: JPEG 2000 over RTP

boxerab@gmail.com


On Thu, Apr 28, 2016 at 10:44 AM, Sebastian Dröge <[hidden email]> wrote:
On Do, 2016-04-28 at 10:15 -0400, Aaron Boxer wrote:
>
>
> On Thu, Apr 28, 2016 at 9:15 AM, Sebastian Dröge  wrote:
> > On Do, 2016-04-28 at 08:22 -0400, Aaron Boxer wrote:
> > > 
> > > > Someone will have to debug what goes wrong in there and make it
> > > > handle more JPEG2000 bitstreams properly.
> > >
> > > Thanks, Sebastian. I guess I will take a look. What library is used
> > > for parsing the JPEG 2000 streams?
> >
> > None, the relevant bits are all in the JPEG2000 payloader and
> > depayloader code. No external dependencies.
> Thanks. Would it make sense to use OpenJPEG to do the parsing? 
> It would guarantee that all known code streams are supported
>
> I can make whatever modifications necessary to OpenJPEG to extract
> the payload. Except, I might have to do this in a branch, if the maintainers
> do not accept the changes.

No, the payloader/depayloader should have no external dependencies and
you probably also don't save a lot of work with that as the parsing
needs to be closely integrated with the payloading/depayloading anyway.

Thanks. Makes sense. Can I copy-paste BSD licensed OpenJPEG code into
the payloader? I would maintain a piece of OpenJPEG inside, and try to keep
it as independant as possible, to ease maintenance.

 

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: JPEG 2000 over RTP

Sebastian Dröge-3
On Do, 2016-04-28 at 11:28 -0400, Aaron Boxer wrote:


> > No, the payloader/depayloader should have no external dependencies
> > and you probably also don't save a lot of work with that as the
> > parsing
> > needs to be closely integrated with the payloading/depayloading
> > anyway.
> Thanks. Makes sense. Can I copy-paste BSD licensed OpenJPEG code into
> the payloader? I would maintain a piece of OpenJPEG inside, and try
> to keep it as independant as possible, to ease maintenance.

If that really makes your life easier, sure :) But make sure to not
copy over much more code than needed, parsing JPEG2000 is not that
complicated in the end.

--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

signature.asc (968 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: JPEG 2000 over RTP

boxerab@gmail.com


On Thu, Apr 28, 2016 at 11:51 AM, Sebastian Dröge <[hidden email]> wrote:
On Do, 2016-04-28 at 11:28 -0400, Aaron Boxer wrote:


> > No, the payloader/depayloader should have no external dependencies
> > and you probably also don't save a lot of work with that as the
> > parsing
> > needs to be closely integrated with the payloading/depayloading
> > anyway.
> Thanks. Makes sense. Can I copy-paste BSD licensed OpenJPEG code into
> the payloader? I would maintain a piece of OpenJPEG inside, and try
> to keep it as independant as possible, to ease maintenance.

If that really makes your life easier, sure :) But make sure to not
copy over much more code than needed, parsing JPEG2000 is not that
complicated in the end.


Alright, I will take a look, thanks. Is there anyone currently maintaining this plugin?


 
--
Sebastian Dröge, Centricular Ltd · http://www.centricular.com


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: JPEG 2000 over RTP

boxerab@gmail.com
In reply to this post by Sebastian Dröge-3


On Thu, Apr 28, 2016 at 11:51 AM, Sebastian Dröge <[hidden email]> wrote:
On Do, 2016-04-28 at 11:28 -0400, Aaron Boxer wrote:


> > No, the payloader/depayloader should have no external dependencies
> > and you probably also don't save a lot of work with that as the
> > parsing
> > needs to be closely integrated with the payloading/depayloading
> > anyway.
> Thanks. Makes sense. Can I copy-paste BSD licensed OpenJPEG code into
> the payloader? I would maintain a piece of OpenJPEG inside, and try
> to keep it as independant as possible, to ease maintenance.

If that really makes your life easier, sure :) But make sure to not
copy over much more code than needed, parsing JPEG2000 is not that
complicated in the end.

Thanks. I looked over the IETF document describing J2K over RTP.
You're right, it is not complicated for a simple implementation.
The J2K code stream is broken up into:

Main Header
Start of Codestream Marker
     Tile Part Header
     Tile Part Data
         J2K packet 1 ... N
     .
     .
     Tile Part Header
     Tile Part Data
        J2K packet 1 ... M
End of Codestream Marker

where the image is broken into tiles, and the tiles are broken into tile parts.

It would be ideal to manage the RTP payloads to respect the packet structure
of J2K. This is recommended in the IETF doc, but I don't think this is happening in the current implementation.
I can work on this, time permitting.

Cheers,
Aaron



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel