简体   繁体   English

在MacOSX上的Matlab中读取H264编码的视频文件时损坏

[英]Corruption when reading an H264 encoded video file in Matlab on MacOSX

I am attempting to read an H264 AVI file on OSX with Matlab, but it appears that the video is corrupted. 我正在尝试使用Matlab在OSX上读取H264 AVI文件,但似乎视频已损坏。 When I display the frame it appears that the image is segmented by vertical grey lines and I can see a segmented and faded version of the actual image data repeated 3 times within the same frame. 当我显示框架时,图像似乎被垂直的灰线分割,并且我可以看到在同一帧中重复了3次的实际图像数据的分割和褪色版本。 On my windows box I am able to read in the frame successfully without any issue using the same code/avi. 在我的Windows框上,我可以使用相同的代码/ avi成功读取框架,而不会出现任何问题。 Here are my specs: 这是我的规格:

Mac OSX 10.6.4
Matlab 7.8.0.347 (R2009a) Student Version
Quicktime 10.0 with Perian_1.2.1 codec plugin

AVI File:
H264
RGB24
640x480
60 Frames per second

Quicktime is able to successfully play the file with the Perian plugin. Quicktime可以使用Perian插件成功播放文件。

Here is the example code I am using to display the file: 这是我用来显示文件的示例代码:

o=mmreader(avi_file_name);
figure(1);
imshow(read ( vid_obj, k ));

Any ideas? 有任何想法吗?

Found a solution: 找到了解决方案:

Turned out it wasn't only H264 codecs that didn't work, I found a variety of formats that gave me the same output. 事实证明,不仅只有H264编解码器无法正常工作,我发现各种格式可以提供相同的输出。 However, downloading mmread instead of using mmreader fixed all of my issues: 但是,下载mmread而不是使用mmreader修复了我的所有问题:

http://www.mathworks.com/matlabcentral/fileexchange/8028 http://www.mathworks.com/matlabcentral/fileexchange/8028

Although, the mmread bug should probably still be addressed by MathWorks. 尽管mmread错误可能仍应由MathWorks解决。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Apple Video Toolkit 进行 H264 解码 - H264 Decoding with Apple Video Toolkit 在Mac上将.yuv文件转换为h264文件的任何解决方案? - Any solution to convert .yuv file to h264 file on Mac? FFMPEG错误地读取了输入的h264文件的fps,从而导致输出文件的持续时间错误 - FFMPEG reads fps of input h264 file wrong, resulting in wrong duration of output file 在VTDecompressionSessionCreate中解码H264 VideoToolkit API失败,错误为-8971 - Decoding H264 VideoToolkit API fails with Error -8971 in VTDecompressionSessionCreate 如何在Mac上使用AVFoundation将图片编码为H264,而不使用x264 - How to encode picture to H264 use AVFoundation on Mac, not use x264 通过AVSampleBufferDisplayLayer显示H.264编码的图像 - Display H.264 encoded images via AVSampleBufferDisplayLayer 在Mac上,我应该使用哪种h264编码器作为gstreamer管道? - What h264 encoder should I use as a gstreamer pipe on Mac? OpenCV:FFMPEG:编解码器不支持标记 0x34363268/'h264' - OpenCV: FFMPEG: tag 0x34363268/'h264' is not supported with codec 如何调试Mac OS未使用硬件H264编码器的原因 - How to debug why Mac OS is not using Hardware H264 encoder 在流#0编解码器中找不到编解码器h264的标签(将ffmpeg flac转换为alac转换) - Could not find tag for codec h264 in stream #0 codec (ffmpeg flac to alac convert)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM