没有适用于'video/x-h264类型的解码器 [英] No decoder available for type 'video/x-h264

查看:368
本文介绍了没有适用于'video/x-h264类型的解码器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行qt示例应用程序之一,而没有进行任何修改.它被称为 player ,它是一个多媒体小部件演示.我的系统是Ubuntu 16.04 64位.当我尝试播放视频时,在控制台中看到以下错误:

没有适用于'video/x-h264

类型的解码器

尝试两个不同的视频后,出现完整错误:

 开始/home/aras/Qt5.7.0_Sept2016/Examples/Qt-5.7/multimediawidgets/build-player-Sept2016-Debug/player ...警告:没有适用于'video/x-h264类型的解码器,流格式=(string)avc,alignment =(string)au,level =(string)3,profile =(string)受约束的基线,codec_data =(缓冲区)0142e01eff0100192742e01ea9101405ff2e00d418041adb7a00f480f55ef7c04001000428de09c8,宽度=(整数)640,高度=(整数)360,帧率=(分数)2997/125,像素长宽比=(分数)1/1'."警告:没有适用于'video/x-h264类型的解码器,流格式=(string)avc,alignment =(string)au,level =(string)3,profile =(string)受约束的基线,codec_data =(缓冲区)0142e01eff0100192742e01ea9101405ff2e00d418041adb7a00f480f55ef7c04001000428de09c8,宽度=(整数)640,高度=(整数)360,帧率=(分数)2997/125,像素长宽比=(分数)1/1'."警告:没有适用于'video/x-h264类型的解码器,流格式=(字符串)avc,像素长宽比=(分数)1/1,宽度=(int)1280,高度=(int)720,framerate =(分数)601600/10033'." 

我几乎安装了与gstreamer远程相关的每个软件包.当我运行 gst-inspect-1.0 时,我得到很多输出,最后一行是:

总数:241个插件(未显示1个黑名单条目),具有1388个功能

 〜$ gst-inspect-1.0 | grep x-h264类型查找功能:视频/x-h264:h264,x264、264:〜$ gst-inspect-1.0 avdec_h264工厂详细信息:小学排名(256)长名称libav H.264/AVC/MPEG-4 AVC/MPEG-4第10部分解码器Klass编解码器/解码器/视频说明libav H264解码器 

所以对我来说,一切都已正确安装.Qt多媒体示例为何无法立即使用?

解决方案

我已通过在构建系统上安装 GStreamer多媒体框架ffmpeg 插件来修复它:/p>

Arch :

  sudo pacman -S gst-libav 

Debian :

  sudo apt install gstreamer1.0-libav ubuntu-restricted-extras 

I am trying to run one of qt sample apps without any modification. It is called player and it is a multimedia widget demonstration. My system is Ubuntu 16.04 64bit. When I try to play a video, I see the following error in the console:

No decoder available for type 'video/x-h264

Here is the full error after trying two different videos:

Starting /home/aras/Qt5.7.0_Sept2016/Examples/Qt-5.7/multimediawidgets/build-player-Sept2016-Debug/player...
Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)constrained-baseline, codec_data=(buffer)0142e01eff0100192742e01ea9101405ff2e00d418041adb7a00f480f55ef7c04001000428de09c8, width=(int)640, height=(int)360, framerate=(fraction)2997/125, pixel-aspect-ratio=(fraction)1/1'."
Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3, profile=(string)constrained-baseline, codec_data=(buffer)0142e01eff0100192742e01ea9101405ff2e00d418041adb7a00f480f55ef7c04001000428de09c8, width=(int)640, height=(int)360, framerate=(fraction)2997/125, pixel-aspect-ratio=(fraction)1/1'."
Warning: "No decoder available for type 'video/x-h264, stream-format=(string)avc, pixel-aspect-ratio=(fraction)1/1, width=(int)1280, height=(int)720, framerate=(fraction)601600/10033'."

I have pretty much every package remotely related to gstreamer installed. When I run gst-inspect-1.0 I get a lot of output and the last line is:

Total count: 241 plugins (1 blacklist entry not shown), 1388 features

~$ gst-inspect-1.0 |grep x-h264
typefindfunctions: video/x-h264: h264, x264, 264

:~$ gst-inspect-1.0 avdec_h264
Factory Details:
  Rank                     primary (256)
  Long-name                libav H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 decoder
  Klass                    Codec/Decoder/Video
  Description              libav h264 decoder

So it looks like to me that everything is installed properly. How come the Qt multimedia example does not work out of the box?

解决方案

I've fixed it by installing the GStreamer Multimedia Framework ffmpeg Plugin on my build system:

Arch:

sudo pacman -S gst-libav

Debian:

sudo apt install gstreamer1.0-libav ubuntu-restricted-extras

这篇关于没有适用于'video/x-h264类型的解码器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆