8

変更を加えずに qt サンプル アプリの 1 つを実行しようとしています。というplayerマルチメディアウィジェットのデモです。私のシステムは Ubuntu 16.04 64 ビットです。ビデオを再生しようとすると、コンソールに次のエラーが表示されます。

No decoder available for type 'video/x-h264

2 つの異なるビデオを試した後の完全なエラーは次のとおりです。

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'."

リモートで gstreamer に関連するほぼすべてのパッケージがインストールされています。実行するgst-inspect-1.0と、多くの出力が得られ、最後の行は次のとおりです。

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

したがって、すべてが適切にインストールされているように見えます。Qt マルチメディアの例がそのままでは機能しないのはなぜですか?

4

2 に答える 2

1

コマンドライン インターフェイスで、次を実行します。

ldd /home/aras/Qt5.7.0_Sept2016/Examples/Qt-5.7/multimediawidgets/build-player-Sept2016-Debug/player
ldd echo $(which gst-inspect-1.0)

GStreamer を参照している行を探します。次に例を示します。

libgstreamer-1.0.so.0 => /usr/lib/x86_64-linux-gnu/libgstreamer-1.0.so.0

GStreamer を参照する行が両方のコマンド結果で同じでない場合は、複数の GStreamer がインストールされている可能性があります。次に、GStreamer の 2 番目の結果 (によって与えられた)のおかげで、 が配置されているディレクトリのみを指す新しいLD_LIBRARY_PATH環境変数 ( OS-X を実行している場合) を指定してみてください。DYLD_LIBRARY_PATHlibgstreamer-1.0.so.0lddldd echo $(which gst-inspect-1.0)

たとえば、次を実行します。

export LD_LIBRARY_PATH="/usr/local/lib:/usr/lib"
于 2016-09-22T16:32:58.927 に答える