Sunday 21 June 2009

Video Player Quickly Closes, Crashes or flickers for video in Ubuntu?



After a fresh install of Ubuntu on my laptop (it's a 3 year old Dell Inspiron 6400 w/ ATI Mobility Radeon x1400 video card), I tried opening a video of Freedom Fry after downloading it to my desktop. To my surprise, and this is definitely the first time it has happened to me as I recall, the player quit!

I tried double clicking on the video again! Movie Player opened for a couple of seconds, opened and then quit again. I repeated the processes a couple of times, in vain of course. Then I remembered that I might have missed some codec (well, the Stephen Fry's video was in .ogv format, that was supposed to be supported right out of the box) so I added Gstreamer codec packs onto Ubuntu.

In case someone out there is curious this is how you Add GStreamer Codecs to play MP3s and MPEG and MOV files on Ubuntu's default Movie Player... First click on Applications > Add or Remove > Search for GStreamer > Check the checkbox beside the plugins you think you might need > Click the Apply Changes button below > Follow instructions.

However, doing so didn't fix the problem. So I repeated the same process above to go to the Add or Remove window and download VLC. VLC is one player that can play virtually ALL video files out there. Then I double clicked on the video.......... VLC opens..... closes in 0.5 seconds! Still no luck.

Then, I remembered that I had come across a similar problem a while ago, except the problem lead to the video fluttering and flickering when it was played. The solution was to use the X11 form of video output in VLC. And I came across this helpful post in the Ubuntu forums as well where the video player immediately crashed for some other people as well.

So in case you don't know how to change the output format to X11 in VLC, here's how you can do so. Of course, you'll need to get VLC first. Unfortunately, I don't think it's possible to change the output format in the default movie player in Ubuntu, but if someone else knows about how one can do so, please post in comments below.

Changing output format in VLC to prevent it from crashing or flickering when opening video

  1. Go to Applications > Sound & Video > VLC media player
  2. Click Tools > Preferences
  3. Choose Video from the left hand 'pile-on list'
  4. Beside output choose 'X11 video output' like so:
Then just click Save and try opening the file again.

Everything should work flawlessly now!

Why does this problem occur?


The flickering problem in my opinion is some by-product of bad ATI drivers and Compiz code. Some times, if you turn off all compiz effects and switch you appearance settings to minimal, you can get rid of the rapid flickering. I doubt it has anything to do with the codecs or the player as there is no degradation in the audio.

As for the video automatically closing/crashing the player problem, its most likely the graphics card driver. Since the drivers for graphic cards are proprietary (especially if you're using Compiz, you have to switch to the ATI proprietary drivers...) it's likely that there is some 'broken telephone' going on between the OS and the drivers and the hardware causing the problem.




Got a question, tip or comment? Send them to beyondteck+question@gmail.com and we'll try to answer it in a blog post!

4 comments:

  1. Thanks for the info! Now I can enjoy fullscreen video on my work laptop (ATI 9.5 Catalyst driver).
    I use SMPlayer. Using the info you posted above, I simply changed the default video output from "xv" to "x11 (slow)" & Fullscreen video no longer crashes my work laptop :)

    For those who don't know how to change the video output in SMPlayer:
    Options --> Preferences --> Video. Change "Output driver" fropm default "xv" to "x11 (slow)".

    ReplyDelete
  2. Thanks for sharing your solution Kermiac! I'm sure many others out there who have the same problem but choose to use SMPlayer are certainly going to appreciate it. And now that you mention it... I too am using the proprietary ATI/AMD FGLRX driver. I guess this problem mostly affects ATI users.

    ReplyDelete
  3. Thank you. I changed to x11 and can watch my avi in VLC now!

    ReplyDelete
  4. Thanks, this was very helpful.

    ReplyDelete