Qt
  1. Qt
  2. QTBUG-51692

QMediaPlayer fails to play some fomats (mp4/mkv)

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: P2: Important P2: Important
    • Resolution: Out of scope
    • Affects Version/s: 5.6.0 RC, 5.6.0
    • Fix Version/s: None
    • Component/s: Multimedia
    • Labels:
      None
    • Environment:
      • Windows 10 Pro Update 1511
      • Qt 5.6
      • msvc 2015 compiler (32 and 64 bit and WinRT), mingw
      • Nvidia GeForce GTX 960
      • OpenGL 4.4
      • DirectX 9.0c and 11.0

      Description

      Using the media-player example ("player"):

      The player compiles fine, but if I try to open different media files, some types will fail, all with the same error:

      DirectShowPlayerService::doRender: Unresolved error code 80040266
      

      I tested the following types:

      • .mp4
      • .mkv

      I tested .wmv too, but those worked. I tested all files using the Windows 10 Media-Player and VLC-mediaplayer - all worked fine.

      Update:
      I tested some more with 5.6 and got the following, interesting results:

      • Msvc 2015 x64: Shows the error code
      • Msvc 2015 and mingw x86: No error code, but will fail nonetheless
      • Msvc 2015 WinRT x64: No error and the video plays, but you can only hear sound, no display!

      I'm not shure what this means, but it may help.

        Issue Links

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

          Hide
          James Pettitt added a comment - - edited

          Are there any known workarounds other than installing codecs, recompiling, or using 5.5.1?

          Show
          James Pettitt added a comment - - edited Are there any known workarounds other than installing codecs, recompiling, or using 5.5.1?
          Hide
          Aakash Goyal added a comment - - edited

          I am having the same issues. Qt 5.4 with VS2012 plays mp4 just fine, Qt 5.7 with VS2015 does not and shows "DirectShowPlayerService::doRender: Unresolved error code" error. I cannot update my software to the new version due to this. Please fix the issue as I cant ask existing users to install extra codecs for my update.

          Show
          Aakash Goyal added a comment - - edited I am having the same issues. Qt 5.4 with VS2012 plays mp4 just fine, Qt 5.7 with VS2015 does not and shows "DirectShowPlayerService::doRender: Unresolved error code" error. I cannot update my software to the new version due to this. Please fix the issue as I cant ask existing users to install extra codecs for my update.
          Hide
          Yoann Lopes added a comment -

          As mentioned by Sergio, you can simply go back to using the WMF plugin by reconfiguring Qt with "-wmf-backend".

          To clarify, there is no bug in Qt. The only thing that changed between 5.5 and 5.6 is that DirectShow is now the default backend on all versions of Windows and with all compilers. It used to be more confusing, with WMF being used on Windows 7 and higher but only when using MSVC. DirectShow was used on XP with all compilers and on all other versions with MinGW... The reason being that MinGW doesn't include many WMF headers.

          The advantage of DirectShow is that it virtually supports any codec out there (as long as you install third-party codecs...), while WMF only supports a few common ones but has nearly no third-party codecs available.

          One way to make this easier to handle is to dynamically pick a backend depending on the media (QTBUG-32783), but that keeps the burden of having to maintain two plugins on Windows (and even three when counting WinRT).
          Another is to use a single backend on all platforms (like VLC, GStreamer or ffmpeg), in order to guarantee the same formats are supported everywhere. But this solution is a headache in terms of packaging and licensing...

          Show
          Yoann Lopes added a comment - As mentioned by Sergio, you can simply go back to using the WMF plugin by reconfiguring Qt with "-wmf-backend". To clarify, there is no bug in Qt. The only thing that changed between 5.5 and 5.6 is that DirectShow is now the default backend on all versions of Windows and with all compilers. It used to be more confusing, with WMF being used on Windows 7 and higher but only when using MSVC. DirectShow was used on XP with all compilers and on all other versions with MinGW... The reason being that MinGW doesn't include many WMF headers. The advantage of DirectShow is that it virtually supports any codec out there (as long as you install third-party codecs...), while WMF only supports a few common ones but has nearly no third-party codecs available. One way to make this easier to handle is to dynamically pick a backend depending on the media ( QTBUG-32783 ), but that keeps the burden of having to maintain two plugins on Windows (and even three when counting WinRT). Another is to use a single backend on all platforms (like VLC, GStreamer or ffmpeg), in order to guarantee the same formats are supported everywhere. But this solution is a headache in terms of packaging and licensing...
          Hide
          Krzysztof Kobus added a comment -

          Thank you Yoann for your comments. Could you please kindly shed more light on the subject by answering the following questions:

          1. Since Windows Media Player displays mp4 videos there must be appropriate codecs for this video format on the system. Cannot Qt DirectShow backend use them? Or Windows Media Player is not using DirectShow?

          2. > The advantage of DirectShow is that it virtually supports any codec out there (as long as you install third-party codecs...)
          Are there mp4 codecs that I could just inlude in my program's installer (and not forcing my customers to run another installer)? If you are aware of such could you please post a link to?

          Thank you!

          Show
          Krzysztof Kobus added a comment - Thank you Yoann for your comments. Could you please kindly shed more light on the subject by answering the following questions: 1. Since Windows Media Player displays mp4 videos there must be appropriate codecs for this video format on the system. Cannot Qt DirectShow backend use them? Or Windows Media Player is not using DirectShow? 2. > The advantage of DirectShow is that it virtually supports any codec out there (as long as you install third-party codecs...) Are there mp4 codecs that I could just inlude in my program's installer (and not forcing my customers to run another installer)? If you are aware of such could you please post a link to? Thank you!
          Hide
          Yoann Lopes added a comment -

          1. Windows Media Player dynamically selects DirectShow or WMF depending on the kind of media played.

          2. There's LAV Splitter (https://1f0.de/lav-splitter/), which is GPL and therefore can be problematic.
          There's also Haali Media Splitter (https://haali.su/mkv/), which doesn't seem to have any kind of restriction in terms of redistribution.
          Here's another one: http://www.gdcl.co.uk/mpeg4/ (BSD-style license)
          A commercial one: https://www.3ivx.com/technology/
          Yet another one: http://www.avideosoft.com/Default.aspx (seems to be free)

          As you can see there are plenty of options, and I only listed the main ones

          Show
          Yoann Lopes added a comment - 1. Windows Media Player dynamically selects DirectShow or WMF depending on the kind of media played. 2. There's LAV Splitter ( https://1f0.de/lav-splitter/ ), which is GPL and therefore can be problematic. There's also Haali Media Splitter ( https://haali.su/mkv/ ), which doesn't seem to have any kind of restriction in terms of redistribution. Here's another one: http://www.gdcl.co.uk/mpeg4/ (BSD-style license) A commercial one: https://www.3ivx.com/technology/ Yet another one: http://www.avideosoft.com/Default.aspx (seems to be free) As you can see there are plenty of options, and I only listed the main ones

            People

            • Assignee:
              Yoann Lopes
              Reporter:
              Felix Barz
            • Votes:
              13 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes