Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt WebKit
  4. QTWebkit 5.3.1 Configuration for HTML5 Video playback
QtWS25 Last Chance

QTWebkit 5.3.1 Configuration for HTML5 Video playback

Scheduled Pinned Locked Moved Qt WebKit
8 Posts 3 Posters 3.8k 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.
  • V Offline
    V Offline
    Vinoth
    wrote on last edited by
    #1

    Hi,

    I am trying to enable HTML5 video playback on QTWebkit 5.3.1 for ARM based Embedded device. In my QtWebkit configuration logs, I see the following warning:

    ' ! Missing GStreamer or QtMultimedia, disabling HTML5 media element support'.

    I have QtMultimedia working on the target. and I am able to play video and audio using QML MediaPlayer. I have GStreamer also present in the platform.

    Can anyone help me configure the QTWebkit appropriately to use QTMultimedia so that HTML5 media element tag support is enabled?

    Regards,
    Vinoth

    K 1 Reply Last reply
    0
    • V Vinoth

      Hi,

      I am trying to enable HTML5 video playback on QTWebkit 5.3.1 for ARM based Embedded device. In my QtWebkit configuration logs, I see the following warning:

      ' ! Missing GStreamer or QtMultimedia, disabling HTML5 media element support'.

      I have QtMultimedia working on the target. and I am able to play video and audio using QML MediaPlayer. I have GStreamer also present in the platform.

      Can anyone help me configure the QTWebkit appropriately to use QTMultimedia so that HTML5 media element tag support is enabled?

      Regards,
      Vinoth

      K Offline
      K Offline
      Konstantin Tokarev
      wrote on last edited by
      #2

      @Vinoth said in QTWebkit 5.3.1 Configuration for HTML5 Video playback:

      Hi,

      I am trying to enable HTML5 video playback on QTWebkit 5.3.1 for ARM based Embedded device.

      I would recommend you to use newer QtWebKit version, as lots of bugs were fixed since 5.3.1 release.

      • If you want to use QML WebView, or your compiler lacks C++11 support, use QtWebKit from 5.6 git branch, or from 5.6.2 tarball
      • Otherwise you can try technology preview 4 [1], it doesn't provide QML API yet but otherwise should work much better with modern Web

      Both versions are compatible with Qt 5.3.1 if you still have to use it.

      [1] https://github.com/annulen/webkit/releases/tag/qtwebkit-tp4

      In my QtWebkit configuration logs, I see the following warning:

      ' ! Missing GStreamer or QtMultimedia, disabling HTML5 media element support'.

      • In old QtWebKit (not TP4 linked above) GStreamer is discovered via pkg-config and also requires glib to be discovered. In cross-compiled Qt you may have pkg-config disabled, in this case you may need to hack Tools/qmake/mkspecs/features/features.prf and other files

      • QtMultimedia requires QtMultimediaWidgets modules to be present. Also, there is no much sense in using QtMultimedia on embedded linux as it uses GStreamer internally anyway

      I have QtMultimedia working on the target. and I am able to play video and audio using QML MediaPlayer. I have GStreamer also present in the platform.

      Can anyone help me configure the QTWebkit appropriately to use QTMultimedia so that HTML5 media element tag support is enabled?

      Regards,
      Vinoth

      1 Reply Last reply
      0
      • V Offline
        V Offline
        Vinoth
        wrote on last edited by
        #3

        @Konstantin-Tokarev Many thanks for your inputs.

        For now, I have to stick with Qt 5.3.1. We will be switching to Qt 5.5.1 for another Intel based platform.

        I am not sure what files to be changed for enabling GStreamer. However, I was able to enable QTMultimedia in the package config for QTWebkit. I thought, this would solve my problem as video playback is working for me using QTMultimedia. It almost did. Now, I could see that HTML5 media element support is now present on my target.

        Now, youtube videos do not play but earlier I used to get the following error message:

        ' Playback is not supported on this device'.

        Now, the above error is not shown. But the playback does not start and the duration is shown as Infinity/NaN.

        Any ideas, what could be the problem?

        Regards,
        Vinoth

        K 1 Reply Last reply
        0
        • V Vinoth

          @Konstantin-Tokarev Many thanks for your inputs.

          For now, I have to stick with Qt 5.3.1. We will be switching to Qt 5.5.1 for another Intel based platform.

          I am not sure what files to be changed for enabling GStreamer. However, I was able to enable QTMultimedia in the package config for QTWebkit. I thought, this would solve my problem as video playback is working for me using QTMultimedia. It almost did. Now, I could see that HTML5 media element support is now present on my target.

          Now, youtube videos do not play but earlier I used to get the following error message:

          ' Playback is not supported on this device'.

          Now, the above error is not shown. But the playback does not start and the duration is shown as Infinity/NaN.

          Any ideas, what could be the problem?

          Regards,
          Vinoth

          K Offline
          K Offline
          Konstantin Tokarev
          wrote on last edited by
          #4

          @Vinoth said in QTWebkit 5.3.1 Configuration for HTML5 Video playback:

          @Konstantin-Tokarev Many thanks for your inputs.

          For now, I have to stick with Qt 5.3.1.

          That's fine, all QtWebKit versions I've posted above are compatible, use one of them.

          We will be switching to Qt 5.5.1 for another Intel based platform.

          I am not sure what files to be changed for enabling GStreamer. However, I was able to enable QTMultimedia in the package config for QTWebkit. I thought, this would solve my problem as video playback is working for me using QTMultimedia. It almost did. Now, I could see that HTML5 media element support is now present on my target.

          Now, youtube videos do not play but earlier I used to get the following error message:

          ' Playback is not supported on this device'.

          Now, the above error is not shown. But the playback does not start and the duration is shown as Infinity/NaN.

          Any ideas, what could be the problem?

          I guess you are missing necessary GStreamer plugins. Install "good", "bad", and "ugly"

          Regards,
          Vinoth

          1 Reply Last reply
          0
          • V Offline
            V Offline
            Vinoth
            wrote on last edited by
            #5

            Sure, I will give it a try.

            Meanwhile, I have some more updates from my end.

            1. My target platform does not have X and we are using 'Wayland'. May be this is an issue I suppose. Because, I tried to play 'ogg' format audio using HTML5 audio tag and it plays (but the total time of audio is shown as 0:00). I then tried to play 'ogv' format video using HTML5 video tag but it does not play at all.

            I do not think it is an issue with missing plugins because the ogv format video plays fine from my QML media player on the target.

            I think we are getting close. Any more thoughts?

            1 Reply Last reply
            0
            • K Offline
              K Offline
              Konstantin Tokarev
              wrote on last edited by
              #6

              QtWebKit does not have any direct use of X11 releated to video playback. Video is known to work fine on X-less platforms like EGLFS and DirectFB, so I guess it should work on Wayland too, except maybe your Qt is too old and has issues with your Wayland version.

              The only direct uses of X11 are related to NPAPI and acceleration of texture sharing in QML (WebKit2) API, both are disabled automatically if you don't have X11.

              1 Reply Last reply
              0
              • C Offline
                C Offline
                chanyenping
                wrote on last edited by
                #7

                Hi, Konstantin ,

                Would you please advice all the GStreamer plugins required for QtWebKit ? I've tried cross-compiled GStreamer-1.0 and its plugins - base, good, bad, ugly. But still can't play youtube video via demo browser ( qtwebkit-examples/examples/webkitwidgets/browser/brower).

                After GStreamer and its plugins are ready, what I did were

                1. configure and build qt
                2. build qtwebkit and examples
                3. copy necessary files to target board, and set QT environment variables (QT_PLUGIN_PATH)

                The current mediaservice plugins available are
                qtmultimedia/plugins/
                |-- mediaservice
                | |-- libgstaudiodecoder.so
                | |-- libgstcamerabin.so
                | |-- libgstmediacapture.so
                | -- libgstmediaplayer.so |-- playlistformats | -- libqtmultimedia_m3u.so
                -- video -- videonode
                `-- libeglvideonode.so

                My qt, and qtwebkit sources are qt-everywhere-opensource-src-5.8.0-rc, with qtwebkit-opensource-src-5.8.0-rc.

                K 1 Reply Last reply
                0
                • C chanyenping

                  Hi, Konstantin ,

                  Would you please advice all the GStreamer plugins required for QtWebKit ? I've tried cross-compiled GStreamer-1.0 and its plugins - base, good, bad, ugly. But still can't play youtube video via demo browser ( qtwebkit-examples/examples/webkitwidgets/browser/brower).

                  After GStreamer and its plugins are ready, what I did were

                  1. configure and build qt
                  2. build qtwebkit and examples
                  3. copy necessary files to target board, and set QT environment variables (QT_PLUGIN_PATH)

                  The current mediaservice plugins available are
                  qtmultimedia/plugins/
                  |-- mediaservice
                  | |-- libgstaudiodecoder.so
                  | |-- libgstcamerabin.so
                  | |-- libgstmediacapture.so
                  | -- libgstmediaplayer.so |-- playlistformats | -- libqtmultimedia_m3u.so
                  -- video -- videonode
                  `-- libeglvideonode.so

                  My qt, and qtwebkit sources are qt-everywhere-opensource-src-5.8.0-rc, with qtwebkit-opensource-src-5.8.0-rc.

                  K Offline
                  K Offline
                  Konstantin Tokarev
                  wrote on last edited by
                  #8

                  @chanyenping QtWebKit can use 2 different player implementations: GStreamer and QtMultimedia. If you are using GStreamer (on Linux you really should, because QtMultimedia acts just like an additional layer on top of GStreamer, and is not as integrated into WebKit as GStreamer player), you don't need any QtMultimedia stuff on device.

                  As for GStreamer plugins, you should look what codecs you need to support, for widest coverage you need all plugins. You may also need to adjust code to make use of hardware acceleration, if your device vendor provides gstreamer integration

                  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