Cannot play avi or mp4 file in both Movie Player and VLC

I downloaded some videos (both mp4 and avi) and I am unable to play them both in Movie Player and VLC.

In Movie Player, it displays error message saying "Could not determine type of stream".

When I see the properties of those video files, there is no information on 'Audio/Video' tab. There should be information about audio and video codec, bitrate, etc.

Are these videos corrupt? Or, am I missing some codecs?


Solution 1:

My solution was to go to Tools > Preferences in VLC and, in the Video tab:

  • Check the box for Enable video (if it's unchecked).
  • Check the box for Window decorations (if it's unchecked).
  • Set the Output drop-down menu to X11 video output (XCB).

Then Save your changes. That may fix the problem.

enter image description here

Solution 2:

You are probably missing the codecs, which may be patented and are not included in Ubuntu by default.

Installing ubuntu-restricted-extras, via sudo apt-get or via the Software Center by clicking this link should solve your problem.