Videos won't play?

Hi, I'm running Ubuntu Mate on a pi2. I have tried playing numerous videos of differing filetypes using the included VLC media player.

The audio plays fine but the video doesn't play and just shows the first frame the whole time.

I have included a screenshot of the codec information of one of the files. It is a .MPG file and is only 12 MB in size. I have also tried playing .MTS and .3gp files.

Any ideas what the problem is ?

Thanks

Hi @rph,

Generally, this type of challenge rests with display adapter drivers.

Updating your display adapter drivers could fix it; plus you could, perhaps, tweak the VLC settings to make the video work.

I say it is this… based on the fact that we are not talking about a “black screen” scenario - it is, at least, showing the first frame. :neutral_face:

If you can’t resolve the video issue via the above exploration, there could be some useful info available from your terminal by running VLC in verbose mode. It is going to spit out a great deal of output.

Start VLC in terminal: vlc -vvv

Scan thru the output - looking, primarily, for any failed plugins. :smiley:

I'm not too sure how to go about updating the display driver but I did find some sort of errors in the VLC output:

Do you, by chance, have “Ubuntu Restricted Extras” installed?

sudo apt-get install ubuntu-restricted-extras

Also, if by chance you are trying to play DVDs, as well, libdvdcss must be installed by entering this command in the terminal:

sudo /usr/share/doc/libdvdread4/install-css.sh

(to go with the above DVD info)

If you are running Ubuntu 15.10, libdvd-pkg is available to make installation of libdvdcss easier.

sudo apt-get install libdvd-pkg

Follow libdvd-pkg’s instructions to let it download, compile, and install libdvdcss.

You mentioned that you are experiencing this with multiple file types; I figured that meant more than just the MPG and MTS which you quantified. :smiley:

You must change the video output mode to x11.
See Ubuntu Mate 15.10 : Configure VLC to play videos (NO HD)

If you want to watch some video in full screen mode use omxplayer in command line instead.

Enjoy :wink:

1 Like

Thanks for the rescue, @aworan, I’m not the tech guy @rph was needing; I did not know, for instance, what to change the video output mode to :cold_sweat:.

You need to use omxplayer on the Pi 2 to get accelerated video playback.

1 Like

@aworan didn’t work for me.

@Wimpy when I try opening the video using OMX I only get the GUI and nothing plays. If I try adding the video to it and play it, it just flashes a big black screen .

It’s strange that doesn’t work. The error you had with vlc is xv video is not available so when you switch to x11 it would be work. Did you restart vlc after changing video output to x11 ?
Could you post vlc -vvv youvideofile.mpg log after switching to x11 ?
You can try with ffplay too in command line with :
ffplay youvideofile.mpg

There is another post here about Compile VLC with HW Acceleration manifesting that VLC needs to be recompiled to take into account the RPi 2 B hardware specific libraries for its GPU.

I have tried this, however still did not manage to get everything working 100%. I only get OMXPlayer working properly and playing my videos full screen under UbuntuMATE.

If you wanna to watch some video (no HD) you can use ffplay too. You can resize window and go full screen and it work not bad.
You can recompile ffmpeg too with hardware acceleration to have an ffplay version with hardware acceleration. The only difference is the video output it use x11 by default so it will be slow with 1080p video.
I use it everyday because I like to play some widowed video while doing another stuff on my pi :wink:
If you have some interest in it I can write some tutorial to recompile ffmpeg with hardware acceleration enabled ?

After looking over dozens of tutorials, it appears that problems can orbit whether or not the source is “HD.” Others say to check CPU usage whilst playing, to see if it is maxed out. Graphics card issues were brought up, and of course hardware acceleration.

A few links which revolve around some of these challenges:

https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=49114

http://elinux.org/Omxplayer

@aworan VLC doesn’t work with x11. I get the same errors as shown in the second screenshot I previously posted. I can’t get the video to play with OMX either :confused: ?

Could you try with ffplay un command line :
ffplay video.mpg

@aworan ffplay works fine with my smaller video. My HD video doesn’t play smoothly however.

I need something that can play the videos just by opening the video file with player controls.

How to get OMX GUI to work properly as people have said it works…

Vlc opens perfectly and is easy to use just the video won’t move…

@rph, I don’t know how applicable (or reliable) this may be; but I do know that we merely wish for you to get your videos up & running :smiley:.

http://www.idealshare.net/video-converter/vlc-mp4-solution.html

The Raspberry Pi 2 has NO accelerated video playback via VLC, ffmpeg, mplayer, etc. The only hardware assisted player in omxplayer which is a command line utility.

OMX GUI use omxplayer.
Si if omxplayer don’t work you cannot use OMX GUI.

omxplayer is the only one which can read HD video smoothly on RPI.
VLC or ffplay are not build with hardware acceleration by default on Ubuntu mate.
For using omxplayer with HD video I think you need to change a default setting in /boot/config.txt
Type in a terminal :
sudo pluma /boot/config.txt
And change the value of gpu_mem to at least 128 :
gpu_mem=128
(Erase the # before gpu_mem if any)
Reboot raspberry pi and try :
omxplayer video.mpg

@Wimpy what is omxplayer GUI that is installed ? I cant seem to get OMX to work via command line either, I just get the text “have a nice day” ???