I am trying to extract a KLV stream embedded in an MPEG file. Is this
possible with Xuggler? After seeing
http://groups.google.com/group/xuggler-users/browse_thread/thread/1f7db711ed56dcb8,
it seems possible but I'm having some difficulties.
I've been playing with the DecodeAndPlayVideo demo. As the video
plays, I want to dump out the KLV data to console. I've modified the
demo so I know what IPackets are the KLV data but I'm not sure what
the next step is. Should I be working with an IBuffer to do this
(packet.getData())? Is there some kind of built in mechanism that I'm
missing? If anyone has a piece of code or example to get me started,
that would be great. I'm not very good at working byte arrays and
buffers in Java and seems like this will be required at some point.
Any help is appreciated! Thanks!
--
You received this message because you are subscribed to the Google Groups "xuggler-users" group.
To post to this group, send email to xuggle...@googlegroups.com.
To unsubscribe from this group, send email to xuggler-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xuggler-users?hl=en.
Take a look at the KLV class that's provided here:
http://iharder.sourceforge.net/current/java/klv/
You can pass the packet data as such:
(assuming you have an IPacket packet)
byte[] data = packet.getData().getByteArray(0,
packet.getData().getSize());
List<KLV> klvs = KLV.bytesToList(data, 0, data.length,
KLV.KeyLength.SixteenBytes, KLV.LengthEncoding.BER);
That would give you all of the KLV's from that packet in a nice List
to work with, but beware that sometimes, you'd need to make sure that
the KLV are not wrapped by a checksum KLV. In other words, sometimes,
the KLV byte stream could be: <checksum key><checksum data
length><real KLV list stream>
Good luck!
-Teddy
On Feb 10, 12:36 pm, ecks <hine...@gmail.com> wrote:
> Hello xuggler-users,
>
> I am trying to extract a KLV stream embedded in an MPEG file. Is this
> possible with Xuggler? After seeinghttp://groups.google.com/group/xuggler-users/browse_thread/thread/1f7...,
--
You received this message because you are subscribed to the Google Groups "xuggler-users" group.
To post to this group, send email to xuggle...@googlegroups.com.
To unsubscribe from this group, send email to xuggler-user...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/xuggler-users?hl=en.
> > xuggler-user...@googlegroups.com<xuggler-users%2Bunsubscribe@goog legroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/xuggler-users?hl=en.
>