VideoReader doesn't seem to read videofiles (Ubuntu)
1 次查看(过去 30 天)
显示 更早的评论
I am having some trouble with VideoReader, using Ubuntu 14.04 and MATLAB 2015A. The amount of code I've written at this point is pretty straight forward:
vidObj = VideoReader('9/video.avi');
vidObj produces the following output:
vidObj =
VideoReader with properties:
General Properties:
Name: 'video.avi'
Path: '/home/xx/Dropbox/xx/9'
Duration: 8.1920
CurrentTime: 0
Tag: ''
UserData: []
Video Properties:
Width: 0
Height: 0
FrameRate: 0
BitsPerPixel: 0
VideoFormat: ''
I might add that the actual duration of the video is more like 2 seconds. Now, I've been looking into GStreamer and installed version 1.0 through a PPA and codecs packages (the latter through software center). It also seems to me that many people get an explicit error, when there are problems regarding this (looking at previously asked questions), which I am not getting. I have read, write and execute properties of the file in question.
2 个评论
Dinesh Iyer
2015-7-20
Tobias,
First of VideoReader only supports Gstreamer version 0.10 and not version 1.0. My initial guess would be that the file has a video stream encoded in a format for which there are no codecs available on your system to read. Couple of things to try are?
1. Are you able to play this file using Totem Player which also uses Gstreamer?
2. Try to execute the following on the Linux console against Gstreamer 0.10
gst-launch-0.10 playbin2 uri=file:///home/xx/Dropbox/xx/9/video.avi video-sink=appsink audio-sink=fakesink text-sink=fakesink
and verify that it does not generate any errors.
采纳的回答
Dinesh Iyer
2015-7-21
Tobias, I am glad that installing the missing MPEG4 codecs resolved this issue.
Dinesh
更多回答(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!