Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. How to play a video in Raspberry Pi
Forum Updated to NodeBB v4.3 + New Features

How to play a video in Raspberry Pi

Scheduled Pinned Locked Moved Solved Mobile and Embedded
10 Posts 3 Posters 5.2k 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.
  • A Offline
    A Offline
    ascnp
    wrote on last edited by ascnp
    #1

    Hi,
    I want to embed a video window in my qml applacation in Rasp pi. I find that mediaplayer qml type can easily make it. But now I'm getting into a trouble.
    1.Mediaplayer need to be supported by gstreamer in linux. And if I want to play a .mp4 video, I have to install gst-ffmpeg. I use the following terminal code and install successfully in linux.

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

    BUT, when I try to use the same way to install gst-ffmpeg in Rasp pi, it can not find the gstreamer-ffmpeg. So, how can I install the gst-ffmpeg in Rasp pi?

    1. As is known, gstreamer0.10 is very old vision of gstreamer. What should I do if I want to use gstreamer1.0 or higher vision with Qt qml applacation on Rasp pi?
    2. Any other way to embed a video window in qml applacation in Rasp pi?
    1 Reply Last reply
    0
    • A Offline
      A Offline
      ascnp
      wrote on last edited by ascnp
      #2

      Hello everyone,
      After trying hundreds of add-repository, I finally get my Raspberry installed with gstreamer0.10-ffmpeg. BUT, unfortunately, it still cant work.
      It still shows "defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"" But I do make sure that I already install gsreamer0.10 and all its plugins in Raspberry, include gstreamer0.10-ffmpeg, cause I get them installed by
      sudo apt-get install gstreamer0.10-*.

      I'm really confused how can I use qml multimedia in Raspberry. What should I do to solve this problem.

      1 Reply Last reply
      0
      • liewjlsL Offline
        liewjlsL Offline
        liewjls
        wrote on last edited by
        #3

        Not sure this will work for you becaue my raspberry pi is running on arch linux. I'm still new on Raspberry Pi and Qt. But mine application requires to play the video on the raspberry pi as well but it needs to display the webpage at the same time. So i had some investigation and i learned that Raspberry Pi the best way to stream video is using omxplayer. You might want to have a look on it.

        hope it helps.

        thanks.

        A 1 Reply Last reply
        0
        • liewjlsL liewjls

          Not sure this will work for you becaue my raspberry pi is running on arch linux. I'm still new on Raspberry Pi and Qt. But mine application requires to play the video on the raspberry pi as well but it needs to display the webpage at the same time. So i had some investigation and i learned that Raspberry Pi the best way to stream video is using omxplayer. You might want to have a look on it.

          hope it helps.

          thanks.

          A Offline
          A Offline
          ascnp
          wrote on last edited by
          #4

          @liewjls Thanks a lot! I will have a try on omxplayer. Do you know how to use omxplayer with Qt? I only have the way on vlc.

          1 Reply Last reply
          0
          • A Offline
            A Offline
            ascnp
            wrote on last edited by
            #5

            I think I find out the reason. I checked plugin mediaservice, and I find that there is only one .so file, which supposed to be 4 files. That means when I install plugins, I miss some files. So I try to rebuild and install the mediaservice. But when I try to qmake the plugins, it shows

            Checking for openal... no
            Checking for alsa... no
            Checking for pulseaudio... no
            Checking for gstreamer... no
            Checking for resourcepolicy... no
            Checking for gpu_vivante... no

            How can I make these "no" to "yes"? Should I install gstreamer* first in Raspberry mount file?

            jsulmJ 1 Reply Last reply
            0
            • A ascnp

              I think I find out the reason. I checked plugin mediaservice, and I find that there is only one .so file, which supposed to be 4 files. That means when I install plugins, I miss some files. So I try to rebuild and install the mediaservice. But when I try to qmake the plugins, it shows

              Checking for openal... no
              Checking for alsa... no
              Checking for pulseaudio... no
              Checking for gstreamer... no
              Checking for resourcepolicy... no
              Checking for gpu_vivante... no

              How can I make these "no" to "yes"? Should I install gstreamer* first in Raspberry mount file?

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @ascnp You need to install dev packages for all those missing things (at least for what you really need):

              • alsa
              • pulseaudio
              • gstreamer
                Not sure about other things.

              https://forum.qt.io/topic/113070/qt-code-of-conduct

              A 2 Replies Last reply
              0
              • jsulmJ jsulm

                @ascnp You need to install dev packages for all those missing things (at least for what you really need):

                • alsa
                • pulseaudio
                • gstreamer
                  Not sure about other things.
                A Offline
                A Offline
                ascnp
                wrote on last edited by
                #7

                @jsulm Thanks! I'm trying to do that.

                1 Reply Last reply
                0
                • jsulmJ jsulm

                  @ascnp You need to install dev packages for all those missing things (at least for what you really need):

                  • alsa
                  • pulseaudio
                  • gstreamer
                    Not sure about other things.
                  A Offline
                  A Offline
                  ascnp
                  wrote on last edited by
                  #8

                  @jsulm Do you mean that I have to install the .img file on SD card and then install all of the necessary package and then make a .img file again and mount to my system, so that I can get my .so file? Do you have any easier method?

                  jsulmJ 1 Reply Last reply
                  0
                  • A ascnp

                    @jsulm Do you mean that I have to install the .img file on SD card and then install all of the necessary package and then make a .img file again and mount to my system, so that I can get my .so file? Do you have any easier method?

                    jsulmJ Offline
                    jsulmJ Offline
                    jsulm
                    Lifetime Qt Champion
                    wrote on last edited by jsulm
                    #9

                    @ascnp If you have a card reader then you can simply mount the SD card in your PC after installing the stuff.

                    https://forum.qt.io/topic/113070/qt-code-of-conduct

                    A 1 Reply Last reply
                    0
                    • jsulmJ jsulm

                      @ascnp If you have a card reader then you can simply mount the SD card in your PC after installing the stuff.

                      A Offline
                      A Offline
                      ascnp
                      wrote on last edited by ascnp
                      #10

                      @jsulm Sounds good idea!Thank you

                      1 Reply Last reply
                      0

                      • Login

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