Important: Please read the Qt Code of Conduct -

QtMultimedia Media Player example can't play any video on Ubuntu 14.04

  • Hi, I am definitely not happy by Qt Multimedia...again.
    See my previous posts:

    All unaswered.

    Now a new one, on Qt 5.3.1.
    Build the Media Player example and no video can't be played.

    The error says the codec can't be found, like this:
    Warning: "No decoder available for type «video/x-xvid, framerate=(fraction)25/1, width=(int)720, height=(int)304»."
    Warning: "No decoder available for type «video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)646, height=(int)364, framerate=(fraction)25/1, codec_data=(buffer)0164001effe1001a6764001eacd980a42fe6bc0440000003004000000c83c58b668001000568e97b3c8f, parsed=(boolean)true, alignment=(string)au»."

    This is the output of dpkg -l | grep gstreamer:

    ii gir1.2-gstreamer-0.10 0.10.36-1.2ubuntu3 amd64 Description: GObject introspection data for the GStreamer library
    ii gir1.2-gstreamer-1.0 1.2.4-0ubuntu1
    ii gstreamer0.10-alsa:amd64 0.10.36-1.1ubuntu2
    ii gstreamer0.10-fluendo-mp3:amd64 0.10.23.debian-3
    ii gstreamer0.10-nice:amd64 0.1.4-1
    ii gstreamer0.10-plugins-bad:amd64 0.10.23-7.2ubuntu1
    ii gstreamer0.10-plugins-base:amd64 0.10.36-1.1ubuntu2
    ii gstreamer0.10-plugins-base-apps 0.10.36-1.1ubuntu2
    ii gstreamer0.10-plugins-good:amd64 0.10.31-3+nmu1ubuntu5
    ii gstreamer0.10-plugins-ugly:amd64 0.10.19-2ubuntu5
    ii gstreamer0.10-pulseaudio:amd64 0.10.31-3+nmu1ubuntu5
    ii gstreamer0.10-tools 0.10.36-1.2ubuntu3
    ii gstreamer0.10-x:amd64 0.10.36-1.1ubuntu2
    ii gstreamer1.0-alsa:amd64 1.2.4-1~ubuntu1
    ii gstreamer1.0-clutter 2.0.8-1build1
    ii gstreamer1.0-fluendo-mp3:amd64 0.10.23.debian-3
    ii gstreamer1.0-libav:amd64 1.2.4-1~ubuntu1
    ii gstreamer1.0-nice:amd64 0.1.4-1
    ii gstreamer1.0-plugins-bad:amd64 1.2.4-1~ubuntu1
    ii gstreamer1.0-plugins-bad-faad:amd64 1.2.4-1~ubuntu1
    ii gstreamer1.0-plugins-bad-videoparsers:amd64 1.2.4-1~ubuntu1
    ii gstreamer1.0-plugins-base:amd64 1.2.4-1~ubuntu1
    ii gstreamer1.0-plugins-base-apps 1.2.4-1~ubuntu1
    ii gstreamer1.0-plugins-good:amd64 1.2.4-1~ubuntu1
    ii gstreamer1.0-plugins-ugly:amd64 1.2.3-2build1
    ii gstreamer1.0-pulseaudio:amd64 1.2.4-1~ubuntu1
    ii gstreamer1.0-tools 1.2.4-0ubuntu1
    ii gstreamer1.0-x:amd64 1.2.4-1~ubuntu1
    ii libgstreamer-plugins-bad0.10-0:amd64 0.10.23-7.2ubuntu1
    ii libgstreamer-plugins-bad1.0-0:amd64 1.2.4-1~ubuntu1
    ii libgstreamer-plugins-base0.10-0:amd64 0.10.36-1.1ubuntu2
    ii libgstreamer-plugins-base0.10-dev 0.10.36-1.1ubuntu2
    ii libgstreamer-plugins-base1.0-0:amd64 1.2.4-1~ubuntu1
    ii libgstreamer-plugins-base1.0-0:i386 1.2.4-1~ubuntu1
    ii libgstreamer-plugins-good1.0-0:amd64 1.2.4-1~ubuntu1
    ii libgstreamer0.10-0:amd64 0.10.36-1.2ubuntu3
    ii libgstreamer0.10-dev 0.10.36-1.2ubuntu3
    ii libgstreamer1.0-0:amd64 1.2.4-0ubuntu1
    ii libgstreamer1.0-0:i386 1.2.4-0ubuntu1
    ii libreoffice-avmedia-backend-gstreamer 1:4.2.4-0ubuntu2
    ii phonon-backend-gstreamer:amd64 4:4.7.1+git20140403-0ubuntu1
    ii phonon-backend-gstreamer-common:amd64 4:4.7.1+git20140403-0ubuntu1
    ii phonon-backend-gstreamer1.0 4:4.7.1+git20140403-0ubuntu1

  • On Linux Qt uses gstreamer-0.10.
    h264 decoder is implemented in gstreamer-ffmpeg. I don't see it in the list of installed plugins.
    xvid is part of plugins-bad. It is in the list but does not work. You may need to dig deeper.
    Try to run your app with GST_DEBUG=3 or 4 and grep for xvid.
    $ GST_DEBUG=3 ./app 2>&1 | tee app.log | grep xvid

  • Ok, thanks for the hint.
    Here's the complete log with GST_DEBUG=3

    On Ubuntu 14,04 there is no gstreamer ffmpeg package. On the other hand, in my log I see gstreamer registering type video/x-h264

    I can't read relevant info about xvid from the log. Maybe you can ?

    If I remember correctly, videos were playing beautifully with Qt 5.2.1. Not sure though if I had still Ubuntu 13.04 though.

  • You have gstreamer1.0-libav package that provides h.264
    But Qt does not support gstreamet-1.0 yet.

    To make things even "better" Ubuntu 14.04 does not provide gstreamer0.10-ffmpeg.

    I don't see anything special about xvid except that decoder is not found.
    "Some people says": that removing .gstreamer from home directory helps to play xvid

  • Just tried to remove .gstreamer
    No change.

    I have no idea what is the target of Qt5 on Linux, but Unbuntu 14.04 is a LTS release so it's presumably going to be around for a while.
    Also, VLC, mplayer and most video players can decode those videos, so I'd say QtMultimedia is still not a reliable package thus blocking the deployment of a few projects (mine too)
    Funny thing is that it works well on Windows but very badly on OSX.

    The gstreamer 1.0 support is getting more and more urgent. I am following the development to finally have video support also on the Raspberry Pi.

  • Take a look on "QtGstreamer":
    It supports GStreamer-1.2 and does not use QTMultimedia if I understood it correctly.

  • any luck on resolving this? I too am stuck on this.

    By the way as a temporary solution i installed ffmpeg following
    Works for me and at least i can ship a demo, before that i was completely stuck.

  • [quote author="techfort" date="1405712616"]any luck on resolving this? I too am stuck on this.

    By the way as a temporary solution i installed ffmpeg following
    Works for me and at least i can ship a demo, before that i was completely stuck.[/quote]

    Yeah, there's no other solution at the moment. We need to wait for gstreamer-1.0 support, hopefully coming with Qt 5.4.0

    Here's the Qt bugreport I opened and all the comments:

  • An extra repository is needed in Ubuntu to correctly decode videos with ffmpeg:

    sudo add-apt-repository ppa:mc3man/trusty-media
    sudo apt-get update
    sudo apt-get install gstreamer0.10-ffmpeg

  • Hi I have this problem as well and I am using Qt5.5.1 and gstreamer1.0 with libav plugin installed. The logs indicate that the video format feature, pad, caps etc have been found and added. But still the video doesn't play with logs showing plugin missing errors.
    The bug report mentioned above should be reopened.

  • Hmmm just ran into this after upgrading some systems I'm using (MaintenanceTool updated) Qt5.6 on from Debian wheezy to jessie (yes quite a late move; jessie has been stable for ages, but wheezy was working fine for me as "oldstable").

    The bug at still looks relevant. It was closed with a claim a move to GStreamer 1.x was in progress and would most likely make it into Qt 5.4.0. However while jessie seems to include both gstreamer 0.10 and 1.0... strace shows my Qt5.6-built application still loading gstreamer0.10 libs. Guessing the fundamental problem is that the 1.x migration didn't happen and/or that Debian removed the gstreamer0.10-ffmpeg package after wheezy:

    A thread here isn't optimistic about a gstreamer0.10-ffmpeg reappearing given next Debian release will move to gstreamer1.0 (I did check jessie-backports, but there doesn't seem to be anything useful there).

    However a bit more digging finds me which seems to show 5.6 should prefer gstreamer1.0 over 0.10 when available. The associated code change seems to be in some build config file... but it's unclear to me whether this means that whatever I'm downloading via the MaintenanceTool might be limited to gstreamer0.10 if that's all the system the binaries were compiled on has, or whether it means on my machine (in which case the check for 1.0 maybe failing).

  • Fortunately in debian you can draw gstreamer0.10-ffmpeg from oldstable (wheezy) for jessie without conflicts. It is fixing it for me until stretch brings the newer Qt libraries working directly with gstreamer1.0 which is supporting everything just fine at the time of writing.

  • Hello everyone,

    This package also work with Qt5.6 on ubuntu 16.06?

    Because I facing an issue with the 'gstreamer'

Log in to reply