Why does VideoReader return an empty video object on Linux?
이전 댓글 표시
I have an AVI file encoded in H.264 format. I am successfully able to read it in MATLAB on Windows 10. However, when opening the file with 'VideoReader' on Linux, I get the following output:
>> VideoReader('MyVideo.avi');
ans =
VideoReader with properties:
General Properties:
Name: 'MyVideo.avi'
Path: '/home/user/Documents/MyVideo.avi'
Duration: 300.0240
CurrentTime: 300.0240
NumFrames: <Calculating...> learn more
Video Properties:
Width: 0
Height: 0
FrameRate: 0
BitsPerPixel: 0
VideoFormat: ''
Notice that the 'Width', 'Height', 'FrameRate', and 'BitsPerPixel' properties are all 0 and the 'VideoFormat' string is empty. The 'mmfileinfo' command gives similar output:
>> mmfileinfo('MyVideo.avi').Video
ans =
struct with fields:
Format: ''
Height: []
Width: []
Finally, if I call 'readFrame' on this 'VideoReader' object, it errors with the following message:
No more frames available to read from file.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
