QtAV icon indicating copy to clipboard operation
QtAV copied to clipboard

银河麒麟V10 编译成功后播放视频奔溃,输出错误是Missing call to av_register_all()?

Open AdonLuo opened this issue 5 years ago • 3 comments

你好,在linux 环境下播放一播放视频就奔溃,请问下可能是什么原因

QtAV, Qt version and platform

QtAV-1.13.0 QT5.6.1 银河麒麟V10 - aarch64 or commit id if not using release version

Actual behavior

  1. simpleplayer 播放视频 (rtsp 、mp4)
  2. 一打开就发生错误,程序输出如下:[FFmpeg:?] No URL Protocols are registered. Missing call to av_register_all()?

Log file

调试开始
&"warning: GDB: Failed to set controlling terminal: \345\257\271\350\256\276\345\244\207\344\270\215\351\200\202\345\275\223\347\232\204 ioctl \346\223\215\344\275\234\n"
AudioResampler::Register(..., FFmpeg)
Singleton 0x453420 created...
AudioOutputBackend::Register(..., OpenAL)
Singleton 0x453530 created...
AudioOutputBackend::Register(..., Pulse)
VideoDecoder::Register(..., CUDA)
Singleton 0x4536c0 created...
VideoDecoder::Register(..., VAAPI)
VideoRenderer::Register(..., OpenGLWindow)
Singleton 0x453d00 created...
SubtitleProcessor::Register(..., LibASS)
Singleton 0x453e10 created...
SubtitleProcessor::Register(..., FFmpeg)
AudioDecoder::Register(..., FFmpeg)
Singleton 0x454400 created...
AudioEncoder::Register(..., FFmpeg)
Singleton 0x454490 created...
ImageConverter::Register(..., FFmpeg)
Singleton 0x4545a0 created...
MediaIO::Register(..., QIODevice)
Singleton 0x454b50 created...
MediaIO::Register(..., QFile)
AudioOutputBackend::Register(..., null)
VideoDecoder::Register(..., FFmpeg)
VideoDecoder::Register(..., MMAL)
VideoEncoder::Register(..., FFmpeg)
Singleton 0x454da0 created...
registerRenderers...........
VideoRenderer::Register(..., OpenGLWidget)
VideoRenderer::Register(..., QGLWidget2)
VideoRenderer::Register(..., Widget)
VideoRenderer::Register(..., XVideo)
VideoRenderer::Register(..., X11)
VideoRenderer::Register(..., GraphicsItem)
registerRenderers...........
QtAV 1.13.0(Nov  5 2020, 14:33:38)
Multimedia framework base on Qt and FFmpeg.
Distributed under the terms of LGPLv2.1 or later.
Shanghai, China Copyright (C) 2012-2019 Wang Bin (aka. Lucas Wang) [email protected]
Donate: http://qtav.org/donate.html
Source: https://github.com/wang-bin/QtAV
Home page: http://qtav.org
"Build with Qt-5.6.1"
"FFmpeg/Libav configuration: --prefix=/usr --extra-version=1kord0.16.04.20.3 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/aarch64-linux-gnu --incdir=/usr/include/aarch64-linux-gnu --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv"
"Build with avutil-56.60.100"
"Warning: avutil runtime version 54.31.100 mismatch!"
"Build with avcodec-58.112.100"
"Warning: avcodec runtime version 56.60.100 mismatch!"
"Build with avformat-58.64.100"
"Warning: avformat runtime version 56.40.101 mismatch!"
"Build with avfilter-7.88.100"
"Build with avdevice-58.11.102"
"Build with swresample-3.8.100"
"Warning: swresample runtime version 1.2.101 mismatch!"
"Build with swscale-5.8.100"
"Warning: swscale runtime version 3.1.101 mismatch!"
Registered audio backends:  ("OpenAL", "Pulse", "null")
AudioOutputBackend::id("OpenAL")
QtAV 1.13.0(Nov  5 2020, 14:33:38)
Multimedia framework base on Qt and FFmpeg.
Distributed under the terms of LGPLv2.1 or later.
Shanghai, China Copyright (C) 2012-2019 Wang Bin (aka. Lucas Wang) [email protected]
Donate: http://qtav.org/donate.html
Source: https://github.com/wang-bin/QtAV
Home page: http://qtav.org
QVector("ft-hda \xE7\xAB\x8B\xE4\xBD\x93\xE5\xA3\xB0")
"OpenAL opening default device: OpenAL Soft"
"AudioOutputOpenAL creating context..."
VideoRenderer::id("Widget")
Unknown id "next id: 1613206256, name: OpenGLWindow"
"next id: 1613206253, name: OpenGLWidget"
"VideoFilterContext 0x79d520 delete paint device in 0x79bd78"
"No gl context"
"OpenGL version: 3.1  hasGLSL: 1"
"GL_VERSION: OpenGL ES 3.1 Mesa 18.0.5"
"GL_VENDOR: X.Org"
"GL_RENDERER: AMD CAICOS (DRM 2.49.0 / 4.4.131-20200429.kylin.desktop-generic, LLVM 6.0.0)"
"GL_SHADING_LANGUAGE_VERSION: OpenGL ES GLSL ES 3.10"
"Is OpenGLES: 1"
"Is EGL: 1"
"GLSL version: 310"
"Has PBO: 1"
"using gl_param_es3rg8"
"Has 16bit texture: 0"
"check gl3 rg: 0x822B"
"Has RG texture: 1"
QSurfaceFormat(version 3.1, options QFlags(), depthBufferSize 0, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 0, samples 0, swapBehavior 0, swapInterval 1, profile  0)
Loading  QVariant(QString, "/home/evecom/projects/slow_traffic_small.mp4")  ...
"all closed and reseted"
"avformat_open_input: d->format_ctx:'0x7f700028f0', url:'/home/evecom/projects/slow_traffic_small.mp4'..."
[FFmpeg:?] No URL Protocols are registered. Missing call to av_register_all()?

AdonLuo avatar Nov 05 '20 09:11 AdonLuo

看你的log你编译时链接的ffmpeg库和运行时的版本不一样

"Build with avutil-56.60.100"
"Warning: avutil runtime version 54.31.100 mismatch!"
"Build with avcodec-58.112.100"
"Warning: avcodec runtime version 56.60.100 mismatch!"
"Build with avformat-58.64.100"
"Warning: avformat runtime version 56.40.101 mismatch!"
"Build with avfilter-7.88.100"
"Build with avdevice-58.11.102"
"Build with swresample-3.8.100"
"Warning: swresample runtime version 1.2.101 mismatch!"
"Build with swscale-5.8.100"
"Warning: swscale runtime version 3.1.101 mismatch!"

不清楚这是不是原因但是先尝试把这个问题解决一下吧

Bonnie080 avatar Nov 06 '20 08:11 Bonnie080

ffmpeg编译和运行版本不匹配。至少要主版本一致才行

wang-bin avatar Nov 06 '20 13:11 wang-bin

@Bonnie080 @wang-bin 你好,ffmepg 和 QTAV 都重新进行编译但是仍然存在问题,对于ffmpeg 版本问题一直没搞明白,还是链接到了不是我指定的地方。能否帮忙分析下:

  • 我编译的ffmpeg 路径、版本信息如下: 1

QTAV 编译后运行simpleplayer的调试的记录:(启动成功,但是播放的时候崩溃,记录中看到部分库版本不匹配2 qtav_simpleplayer.txt

  • 查看程序运行加载库路经为:(我已经把ffmpeg 编译后生成的lib 整个拷贝到程序当前路径下,运行时还是没从当前路径去找如果按照RUNPATH 加载的话是不是应该运行时先在当前路径下查找依赖库? 3

  • 通过ldd simpleplayer 结果:(这边有些疑问:为什么会加载到 libavutil-ffmpeg.so.54 ? 不明白怎么连过去的4

ldd_simpleplayer.txt

编译.Pro 没有改动,目前卡在播放奔溃这个地方,想请教下怎么解决这个ffmpeg编译和运行版本不匹配问题。感谢。

AdonLuo avatar Dec 02 '20 11:12 AdonLuo