Video.play returns DirectShowPlayerService::doSetUrlSource: Unresolved error code 800c000d

心已入冬 提交于 2021-02-05 12:12:25

问题


Using Qt Version 5.4.2

Error code returned : DirectShowPlayerService::doSetUrlSource: Unresolved error code 800c000d

A QML file has been written with the Video QML type as below. I have added the below in the project file (.pro)

Qt+= multimedia

Snippet of code as below in the QML file.

Video {
    id: video
    width : 800
    height : 600
    source : "Video.mp4"

    MouseArea {
        anchors.fill: parent
        onClicked: {
            video.play();
        }
    }

    focus: true
    Keys.onSpacePressed: video.playbackState == MediaPlayer.PlayingState ? video.pause() : video.play()
    Keys.onLeftPressed: video.seek(video.position - 5000)
    Keys.onRightPressed: video.seek(video.position + 5000)
}

Any pointers regarding this error would be helpful.


回答1:


I faced the same issue, fixed it by:

changing

source: "file://D:/Temp/video/ccc.wmv"

to

source: "file:///D:/Temp/video/ccc.wmv"

as the message mentioned doSetUrlSource indicates may using the wrong URL.




回答2:


Have you searched through the bug tracker? I found QTMOBILITY-1461, for example:

The default directshow filters on Windows7 are not enough for playback of the m4a file. It is not the AAC codec problem, but no filter to identify the m4a container.

The "K-Lite Codec Pack" provides "MPC - MP4 Splitter" filter which could be used to connect the m4a source to the Microsfot codec filter "Microsoft DTV-DVD Audio Decoder" to be able to play the file.

Windows Media Player 12 on Windows7 uses Media Foundation instead of DirectShow to play .m4a .m2ts, .mp4, and .mov formats (for other formats it uses DirectShow filters). This explains why we could not do it with the current directshow backend implementation for QMediaPlayer without a third-party filters.

We might consider adding Media Foundation support in the futrure, but for now you have to install third-party filter to have it work on Windows7.

So, installing the K-Lite Codec Pack might help.

You could also try the suggestions in this mailing list thread.



来源:https://stackoverflow.com/questions/32436138/video-play-returns-directshowplayerservicedoseturlsource-unresolved-error-cod

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!