Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QtMultimedia Media Player example can't play any video on Ubuntu 14.04

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

Scheduled Pinned Locked Moved Solved General and Desktop
14 Posts 8 Posters 30.3k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    mcallegari79
    wrote on last edited by A Former User
    #1

    Hi, I am definitely not happy by Qt Multimedia...again.
    See my previous posts:
    http://qt-project.org/forums/viewthread/39941/
    http://qt-project.org/forums/viewthread/38668/
    http://qt-project.org/forums/viewthread/38670/

    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

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andreyc
      wrote on last edited by
      #2

      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
      @

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mcallegari79
        wrote on last edited by
        #3

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

        http://pastebin.com/sBMCtnTP

        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.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          andreyc
          wrote on last edited by
          #4

          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":http://ubuntuforums.org/showthread.php?t=1326967&p=8319711#post8319711 that removing .gstreamer from home directory helps to play xvid

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mcallegari79
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            1
            • A Offline
              A Offline
              andreyc
              wrote on last edited by
              #6

              Take a look on "QtGstreamer":http://gstreamer.freedesktop.org/data/doc/gstreamer/head/qt-gstreamer/html/
              It supports GStreamer-1.2 and does not use QTMultimedia if I understood it correctly.

              1 Reply Last reply
              1
              • T Offline
                T Offline
                techfort
                wrote on last edited by
                #7

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

                By the way as a temporary solution i installed ffmpeg following http://fcorti.com/2014/04/22/ffmpeg-ubuntu-14-04-lts/
                Works for me and at least i can ship a demo, before that i was completely stuck.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  mcallegari79
                  wrote on last edited by
                  #8

                  [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 http://fcorti.com/2014/04/22/ffmpeg-ubuntu-14-04-lts/
                  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: https://bugreports.qt-project.org/browse/QTBUG-40183

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mcallegari79
                    wrote on last edited by
                    #9

                    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

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      spsingh
                      wrote on last edited by
                      #10

                      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.

                      1 Reply Last reply
                      0
                      • timdayT Offline
                        timdayT Offline
                        timday
                        wrote on last edited by timday
                        #11

                        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 https://bugreports.qt.io/browse/QTBUG-40183 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: https://packages.debian.org/search?keywords=gstreamer0.10-ffmpeg&searchon=names&suite=all&section=all

                        A thread here http://stackoverflow.com/a/30334654/24283 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 https://bugreports.qt.io/browse/QTBUG-47920 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).

                        1 Reply Last reply
                        0
                        • L Offline
                          L Offline
                          lweberk
                          wrote on last edited by
                          #12

                          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.

                          1 Reply Last reply
                          0
                          • V Offline
                            V Offline
                            Vicky Sharma
                            wrote on last edited by
                            #13

                            Hello everyone,

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

                            Because I facing an issue with the 'gstreamer'

                            P 1 Reply Last reply
                            0
                            • V Vicky Sharma

                              Hello everyone,

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

                              Because I facing an issue with the 'gstreamer'

                              P Offline
                              P Offline
                              pniemima
                              wrote on last edited by
                              #14

                              @Vicky-Sharma This did the trick for me in ubuntu 16.04:
                              http://www.open-terrain.org/index.php/Pong/August30th2016QMediaPlayerOnUbuntu16-04LTS

                              1 Reply Last reply
                              1

                              • Login

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • Users
                              • Groups
                              • Search
                              • Get Qt Extensions
                              • Unsolved