由qtwenengine simplebrowser播放的html5视频在树莓派2

时间:2016-08-03 14:48:49

标签: audio html5-video raspberry-pi2 hardware-acceleration qtwebengine

我跟随https://wiki.qt.io/RaspberryPi2EGLFS在raspberry pi2(raspbian-jessie)上交叉编译qt5.7 qtwebengine,并尝试使用qtwebengine / examples / webenginewidgets / demobrowser和simplebrowser来播放html5 video tag

但是,有两个主要问题:

首先,视频没有声音,你可以看到类似的问题qtwebengine no sound in embedded linux,视频播放但没有声音输出。

其次,视频是滞后的,我认为它不是硬件加速,因为一旦我执行程序,它会输出以下信息:

/simplebrowser
ble to query physical screen size, defaulting to 100 dpi.
To override, set QT_QPA_EGLFS_PHYSICAL_WIDTH and QT_QPA_EGLFS_PHYSICAL_HEIGHT (in millimeters).
[0803/134150:ERROR:browser_main_loop.cc(217)] Running without the SUID sandbox! See ttps://chromium.googlesource.com/chromium/src/+/master/docs/linux_suid_sandbox_development.md for more information on developing with the sandbox on.
[0803/134150:ERROR:surface_factory_qt.cpp(68)] Failed to load /opt/vc/lib/libGLESv2.so.2: /opt/vc/lib/libGLESv2.so.2: cannot open shared object file: No such file or directory
[0803/134150:ERROR:gl_surface_qt.cpp(414)] Trying to create surface with invalid display.
[0803/134150:ERROR:command_buffer_proxy_impl.cc(201)] Failed to initialize command buffer service.
[0803/134150:ERROR:webgraphicscontext3d_command_buffer_impl.cc(210)] CommandBufferProxy::Initialize failed.
[0803/134150:ERROR:webgraphicscontext3d_command_buffer_impl.cc(229)] Failed to initialize command buffer.
[0803/134150:ERROR:gl_surface_qt.cpp(414)] Trying to create surface with invalid display.
[0803/134150:ERROR:command_buffer_proxy_impl.cc(201)] Failed to initialize command buffer service.
[0803/134150:ERROR:webgraphicscontext3d_command_buffer_impl.cc(210)] CommandBufferProxy::Initialize failed.
[0803/134150:ERROR:webgraphicscontext3d_command_buffer_impl.cc(229)] Failed to initialize command buffer.
[0803/134150:ERROR:gl_surface_qt.cpp(414)] Trying to create surface with invalid display.
[0803/134150:ERROR:command_buffer_proxy_impl.cc(201)] Failed to initialize command buffer service.
[0803/134150:ERROR:webgraphicscontext3d_command_buffer_impl.cc(210)] CommandBufferProxy::Initialize failed.
[0803/134150:ERROR:webgraphicscontext3d_command_buffer_impl.cc(229)] Failed to initialize command buffer.
[0803/134150:ERROR:gl_surface_qt.cpp(414)] Trying to create surface with invalid display.
[0803/134150:ERROR:command_buffer_proxy_impl.cc(201)] Failed to initialize command buffer service.
[0803/134150:ERROR:webgraphicscontext3d_command_buffer_impl.cc(210)] CommandBufferProxy::Initialize failed.
[0803/134150:ERROR:webgraphicscontext3d_command_buffer_impl.cc(229)] Failed to initialize command buffer.
[0803/134153:ERROR:gl_surface_qt.cpp(414)] Trying to create surface with invalid display.
[0803/134153:ERROR:command_buffer_proxy_impl.cc(201)] Failed to initialize command buffer service.
[0803/134153:ERROR:webgraphicscontext3d_command_buffer_impl.cc(210)] CommandBufferProxy::Initialize failed.
[0803/134153:ERROR:webgraphicscontext3d_command_buffer_impl.cc(229)] Failed to initialize command buffer.
[0803/134153:ERROR:gl_surface_qt.cpp(414)] Trying to create surface with invalid display.
[0803/134153:ERROR:command_buffer_proxy_impl.cc(201)] Failed to initialize command buffer service.
[0803/134153:ERROR:webgraphicscontext3d_command_buffer_impl.cc(210)] CommandBufferProxy::Initialize failed.
[0803/134153:ERROR:webgraphicscontext3d_command_buffer_impl.cc(229)] Failed to initialize command buffer.
[0803/134153:ERROR:gl_surface_qt.cpp(414)] Trying to create surface with invalid display.
[0803/134153:ERROR:command_buffer_proxy_impl.cc(201)] Failed to initialize command buffer service.
[0803/134153:ERROR:webgraphicscontext3d_command_buffer_impl.cc(210)] CommandBufferProxy::Initialize failed.
[0803/134153:ERROR:webgraphicscontext3d_command_buffer_impl.cc(229)] Failed to initialize command buffer.
[0803/134153:ERROR:gl_surface_qt.cpp(414)] Trying to create surface with invalid display.
[0803/134153:ERROR:command_buffer_proxy_impl.cc(201)] Failed to initialize command buffer service.
[0803/134153:ERROR:webgraphicscontext3d_command_buffer_impl.cc(210)] CommandBufferProxy::Initialize failed.
[0803/134153:ERROR:webgraphicscontext3d_command_buffer_impl.cc(229)] Failed to initialize command buffer.
[0803/134153:ERROR:gl_surface_qt.cpp(414)] Trying to create surface with invalid display.
[0803/134153:ERROR:command_buffer_proxy_impl.cc(201)] Failed to initialize command buffer service.
[0803/134153:ERROR:webgraphicscontext3d_command_buffer_impl.cc(210)] CommandBufferProxy::Initialize failed.
[0803/134153:ERROR:webgraphicscontext3d_command_buffer_impl.cc(229)] Failed to initialize command buffer.
[0803/134153:ERROR:gl_surface_qt.cpp(414)] Trying to create surface with invalid display.
[0803/134153:ERROR:command_buffer_proxy_impl.cc(201)] Failed to initialize command buffer service.
[0803/134153:ERROR:webgraphicscontext3d_command_buffer_impl.cc(210)] CommandBufferProxy::Initialize failed.
[0803/134153:ERROR:webgraphicscontext3d_command_buffer_impl.cc(229)] Failed to initialize command buffer.
js: Refused to set unsafe header "User-Agent"
js: Refused to set unsafe header "User-Agent"
js: Refused to set unsafe header "User-Agent"

我认为加载libGLESv2.so.2失败,因此硬件加速已关闭。

有没有人对此有任何想法或经验?

非常感谢。

1 个答案:

答案 0 :(得分:0)

关于音频,我在你提到的链接(QtWebEngine Quicknano has no Sound in Embedded Linux)中回答。

关于视频,您是否启用了属性编解码器支持?我不知道它是如何与broadcome cpu一起工作的,但在我的freescale板上有属性编解码器和一个chrome补丁我有音频和视频流畅。

注意: 没有X11,只有eglfs和alsa音频。