VideoReader Motion JPEG 2000 format does not work
5 次查看(过去 30 天)
显示 更早的评论
R2024a VideoReader does not import .mj2 files correctly. When inspecting the frames they are blank. R2023b has no issues importing .mj2 files. Here's the coded tested between both matlab verisons. Any suggestions for getting VideoReader working in 2024a?
% Get selected file
savelocation = "frames.mj2";
% Load frames
v = VideoReader(savelocation);
frames = read(v);
imagesc(frames(:,:,:,400))
1 个评论
Umar
2024-7-18
编辑:Walter Roberson
2024-7-19
Hi Evan,
One possible solution to this problem could be to try using a different approach to reading .mj2 files in MATLAB R2024a. You can consider using the mmfileinfo function to gather information about the multimedia file, followed by using the mmread function to read the frames from the .mj2 file. Here is an example of how you can modify your code to potentially resolve this issue:
% Get selected file
savelocation = "frames.mj2";
% Get information about the multimedia file
info = mmfileinfo(savelocation);
% Read frames from the multimedia file
frames = mmread(savelocation);
imagesc(frames.frames(400).cdata);
By utilizing these functions, you may be able to successfully read and display frames from .mj2 files in MATLAB R2024a. For more information on these functions, please refer to
Good luck!
回答(1 个)
Deep
2024-7-19
Hi Evan,
I understand that when you are importing an MJ2 file using ‘VideoReader’, it works fine in MATLAB R2023b but gives blank frames in MATLAB R2024a.
This is a known bug in MATLAB R2024a, here is the link to the bug report:
Unfortunately, there are no workarounds as per the bug report.
I hope my answer was helpful!
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Audio and Video Data 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!