I have an issue which has recently presented itself which didn't happen before and I'd really appreciate some help. Unfortunately I cannot trace it back to a specific change I made and my extensive searching has not turned up any solutions.

The issue is when I try and stream a video on a site like youtube, but not limited to youtube. The video loads, but wont play. I can skip through the video and see frames etc but I cannot play it. If there is an Ad before the video, that wont play either.

If I download and open an mp4 video in the default "videos" app, it also wont play in the same way, e.g loads the first frame, I can skip through it but I can't just play it.

However, if I load the same video in VLC it works fine.

I have done a lot of searching, and have tried everything which is recommended but can't solve the issue.

I'm not sure if there is a diagnostic tool which can check for issues with codecs etc. Happy to provide any useful output from tools etc but I'm pulling my hair out abit now.

I'm running Ubuntu 20.04.1 LTS.

With the sample mp4 file I am testing with:

In "Videos" app, (totem) the only properties I can see are: "Codec: H.264 (Main Profile)". When I launch from terminal I get the following warning (still with the video first frame loaded, but not playing):

Gtk-WARNING **: 11:40:23.965: Drawing a gadget with negative dimensions. Did you forget to allocate a size? (node slider owner GtkScale)

In VLC I can see it says "Codec: H264-MEPG-4 AVC (part 10) (avc1)

I'm not sure if that means anything to anyone but it's not helped me find the issue!

Thanks in advance to anyone who might be able to help

EDIT: I've since found this isn't limited to mp4 files and also happens with other formats I have tried.

  • You have a lot of info here. Can I summarize it as VLC works and nothing else does? Is that correct?
    – David
    Commented Jan 1, 2021 at 13:23
  • @David Hi, Thanks, I suppose that sums it up pretty well. I had thought that it was limited to mp4 file formats however I have just tried with an AVI and the same issue happens.
    – Zac
    Commented Jan 1, 2021 at 16:25
  • I have been doing some more investigations, and tried playing the local videos using command line via gst-launch-1.0 and enabling debug logs. I couldn't see anything of use. I tested randomly if it gave any different results or errors if I ran it with sudo and both the sample avi and sample mp4 plays fine. I then tried with another pre-existing user account and again videos work fine. Again, I'm not sure how best to interpret that but I expect it narrows down the issue!
    – Zac
    Commented Jan 1, 2021 at 16:58

2 Answers 2


Since you're using Ubuntu 20.04, you should install the ubuntu-restricted-extras package. The package contains all the necessary codecs for media playback on the system.

It also contains the Microsoft fonts and the flash package (I think this one has been removed though) but it's better not to include those two, unless you really need those fonts.

The command to install the package is: sudo apt install ubuntu-restricted-extras.

  • Hi - Thanks for the suggestion however I have already got this installed, and since the issue presented itself I removed and reinstalled it just to be sure but no joy.
    – Zac
    Commented Jan 1, 2021 at 16:26

I am going to answer my own question as I have found the solution, and I thought it may be of use to others in the future.

My issue was actually related to the audio not the video.

I am using Jack and the server wasn't started. It appears gstreamer was unable to start it normally but was able to when running as sudo. That is why it worked with sudo. For the other user accounts, they were not using Jack so didn't have the issue without sudo either.

I'm sure this is unlikely to be an issue anyone has exactly in the future however for anyone who experiences similar issues in the future and end up looking at this thread, it might be worth sharing that I found this issue by looking at the gstreamer logs, and in my case comparing the normal ones to those produced when ran with sudo.

Gstreamer debugs are enabled by setting an environmental variable

export GST_DEBUG=5

You can look at the different log levels on the gstreamer docs here: https://gstreamer.freedesktop.org/documentation/tutorials/basic/debugging-tools.html

I would suggest starting with the lower log levels first as it's less to read through I expect if its a major error you are having.

You can then try to Play the Video from the Command line and, if you want to, pipe the log to a file:

gst-launch-1.0 playbin uri=file:///path_to_my_video.mp4 &> gs.log

If you do see differences when running as sudo, you can generate those logs the same way but you need to use the -E option to pass the Environment Variable:

sudo -E gst-launch-1.0 playbin uri=file:///path_to_my_video.mp4 &> gs_sudo.log

If you need to compare two different logs, like I did, I used a tool called "meld" and used sed to trim the first 81 chars which stopped all the timestamps being flagged as changes.

As I say above, even if others don't have the exact same issue as me, hopefully the above will be useful in diagnosing other issues which may have led people to this thread.

Thanks to those who tried to help.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .