Get the size of each compressed mj2 frame
1 view (last 30 days)
Show older comments
I used the VideoReader Class to read a Motion JPEG2000 mj2 file and was able to play it using the example in the documentation. But what I need is the size of each compressed frame in bytes. The object created from VideoReader is decompressed.
obj = VideoReader('j2kvid.mj2');
vidWidth = cr10Obj.Width;
vidHeight = cr10Obj.Height;
mov = struct('cdata',zeros(vidWidth,vidHeight,3,'uint8'),'colormap',[]);
k = 1;
while hasFrame(obj)
mov(k).cdata = readFrame(obj);
k = k+1;
end
I just want an array with each element being the size of each compressed frame. Anyone one have an idea how I can do this?
Mike
0 Comments
Answers (0)
See Also
Categories
Find more on Audio and Video Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!