Why is the .avi-movie not showing after using videoReader and implay on it (Linux)

2 views (last 30 days)
Hi,
I have one .avi file. It is uncompressed, i.e. it is an RGB, raw video file. I want to watch it inside MATLAB. The file is being read properly with mov = VideoReader(file). I am now using implay(file), the MATLAB Movie Player is launching. There are no errors to be returned at all. On the bottom right of the Movie Player screen I see that MATLAB has recognized the correct resolution of the .avi as well as the correct number of frames. However the middle of the screen, where the video is supposed to come up, is being left blank. I can click on the "Play" button and see the frame number rising on the bottom left on the screen, but I do not see the movie - it is simply not shown. (see attached figure) Back to the MATLAB command line I type in 'imshow(read(mov,20))'. A figure is coming up showing me the 20th frame of the .avi-movie I have read out with VideoReader before, just as expected.
Why am I NOT able to watch the .avi-movie in the Movie Player?
I tried watching the .avi movie from the Help page (some pre-installed movie by MATLAB about rhinos), it worked perfectly. I tried watching another .avi movie (recorded with a different camera), it worked perfectly. All movies from this specific camera do not work. Again: This is an uncompressed, raw video from the Camera. Still my best guess is that some codec is missing. But how can I determine which one it is? I am running a Linux Mint 18 machine and have gstreamer0.10 installed with all plugins there are in the standard repository, which are the following: -base -ffmpeg -alsa (not important as the .avi clip comes without sound) -pulse (see alsa) -nice -good -bad
ANY help appreciated!

Answers (1)

T Webert
T Webert on 21 Feb 2017
Hi,
thank you very much for your reply! So I just checked what you said by doing: implay(read(mov,[1 98])); I am getting the same result as I stated above, hopefully this time the picture will get attached. It's a blank Movie Player, with the correct movie resolution and frame number on the bottom right of the screen, I can click any buttons and when clicking 'Play', I can see the frame number rising at the bottom right, however do not see any video.
  4 Comments
Walter Roberson
Walter Roberson on 22 Feb 2017
You can contact me through my profile (click on my name). You could email a dropbox or google drive link.
Walter Roberson
Walter Roberson on 23 Feb 2017
I tested the file on my (usual) OS-X system, where it works fine.
I fired up one of my Linux virtual machines, that happens to be Ubuntu 14.04 . On that virtual machine, I saw the same empty player behaviour you saw. But with it being a virtual machine, MATLAB is forced to use the most restrictive sofware OpenGL (even if I did load the NVIDIA drivers on the virtual machine, the virtual machine cannot talk to my real graphics card.)
I found that I was able to read the data out of the avi using
frames = read(VideoReader(TheFileName));
and then I could image() or imshow() any given frame -- suggesting that the problem is in the display rather than in the reading.
You might be able to make use of the File Exchange Contribution "videofig" as a player.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!