[Bug 753323] mpegts: add support for JPEG 2000 to mpegtsmux and tsdemux

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Wed Oct 26 09:11:27 UTC 2016


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

--- Comment #35 from Milos Seleceni <milos.seleceni at comprimato.com> ---
Hi all, we made a great progress with tsmuxer and demuxer. We are compatible
now with AJA HW devices for creating and decoding Mpeg-TS with Jpeg2000. Few
issues left to finish this:

1) Mpeg-TS requires Broadcast profile and Broadcast profile main level in j2k
descriptor. We also have an jpeg2000 encoder producing such J2k codestream. My
question is how should I get this info? I can create special structure, holding
this information, in  output caps of our encoder, but what about other
encoders? This is not the best way probably!

Or add extra property for it in mpegtsmux plugin, it's only for jpeg2000 so
adding extra property for it is not the best idea either.

2) How to handle interlace video. The standard requires this structure in
single buffer
 [[ELSM header][1. j2k codestream][2. codestream]]. The jpeg2000 encoder should
produce two buffer for interlace video then in mpegtsmux I need concat these
two buffers into the one plus add ELSM header. This is the only way I can think
of it. If the encoder produce single buffer with both interlace frames in it I
won't be able to separate them later in mpegtsmux. If my idea is right do you
have any hints how to get two frames in mpegtsmux plugin instead of one?  I've
implemented it similar to Opus. I add callback for it 

mpegtsmux.c: mpegtsmux_create_stream()

    ts_data->prepare_func = mpegtsmux_prepare_jpeg2000;
    ts_data->prepare_data = private_data;
    ts_data->free_func = mpegtsmux_free_jpeg2000;

but it calls for every frame. I can't create my extra buffer for two frames and
wait for two calls of my callback and then just mux it all together.

3) When the j2k codestream exceed the 65Kb the buffer after adding the ELSM
header is later split into two PES packets instead of one which produce invalid
Mpeg-TS stream.


Thanks for any help and suggestions.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list