gpt4 book ai didi

qt - QWebView和嵌入式YouTube播放器-无法正常工作

转载 作者:行者123 更新时间:2023-12-03 06:19:45 32 4
gpt4 key购买 nike

我的系统:

操作系统: Debian Jessie 64位

GPU: ATI Mobility Radeon HD 5650(带有专有视频驱动程序)

我正在使用PyQt5,并希望将QWebView与YouTube教程视频一起嵌入QWizardPage中。但是,我得到的是以下事实真的很奇怪:

如果我为视频使用嵌入式链接(即-嵌入式YouTube播放器),则根本不加载

  • 视频,这基本上是我要使用的,而不是加载完整的YouTube网站
  • 如果我使用普通链接(未嵌入),则不会显示图像,但声音很响
  • 播放时间总是总是弄乱了-但是当播放器的播放轨迹栏和`
  • 出现时,我会收到 -Nan:Nan
  • 在终端(我从中启动PyQt5应用程序的终端)中,始终会出现以下错误:
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server request channel
    jack server is not running or cannot be started

  • 特别是最后一个错误确实让我感到困惑,因为是的,没有 JACK服务器正在运行,因为我不使用 JACK(我视情况使用 PulseAudioALSA)。在Linux系统上 QWebView是否需要 JACK吗?

    这是我的 QWizard和相应的 QWizardPage的屏幕截图:

    enter image description here

    我使用的代码如下(对于本文,URL只是一个示例(视频是我的)):
    class CalibrationPageWelcome(QWizardPage):
    '''
    Gives an overviewo of the calibration procedure including some external URLs to tutorials
    '''
    def __init__(self, parent):
    super(CalibrationPageWelcome, self).__init__(parent)
    self.setTitle('Calibration Wizard')
    self.setSubTitle('The wizard will guide you through the process of calibrating your camera device.')

    layout = QVBoxLayout()
    label = QLabel('''
    Before you continue make sure you are familiar with the process of calibration.
    The video below will give a brief explanation what the calibration process is for
    and how it will be done using this wizard
    ''')
    label.setWordWrap(True)
    layout.addWidget(label)

    view = QWebView()
    # TODO Add link to tutorial about calibrating a camera using patterns and OpenCV
    view.load(QUrl('https://www.youtube.com/embed/5sOiGJRyoBI'))
    layout.addWidget(view)

    self.setLayout(layout)

    知道这里发生了什么吗?

    最佳答案

    确保已安装适当的GStreamer依赖项-在Debian Jessie上,这应该是:
    apt-get install gstreamer1.0-plugins-{bad,base,good,ugly}

    关于qt - QWebView和嵌入式YouTube播放器-无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37651619/

    32 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com