I am experimenting a bit with gstreamer. Because I want to learn something I use version 1.8.3 not 0.10 (not sure whether it would make a difference).
Now I wanted to play a old video snip I happened to have on my disk
$ gst-play-1.0 ex1.mp4
plays the sound but complains about
WARNING No decoder available for type 'video/x-h264, stream-format=(string)avc, alignment=(string)au, level=(string)3.1, profile=(string)high,
and shows no picture. Not too surpsing gst-inspect-1.0 does not list a H.264 decoder
I googled a bit and found the same question from years ago. The answer was that gstreamer uses ffmpeg codecs for H.264 decoding.
I don’t see an ffmpeg plugin but I have
i | gstreamer-plugins-libav | package | 1.8.3-2.6 | x86_64 | packman-essentials
I understand that libav is a fork of ffmpeg, so it should be rather similar.
If I use ffplay to play the above example video it reports
Video: h264 (High) (avc1 / 0x31637661)
for the video stream and it works.
My ffmpeg installation uses
libavcodec 57. 64.100 / 57. 64.100
according to its own output. And not surprising after it works it lists a
decoder
$ ffmpeg -decoders 2>/dev/null | grep 264
VFS..D h264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
V....D h264_vdpau H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (VDPAU acceleration) (codec h264)
If I check on packaging level both
$ rpm -qi --requires ffmpeg
$ rpm -qi --requires gstreamer-plugins-libav
require
libavcodec.so.57()(64bit)
libavcodec.so.57(LIBAVCODEC_57)(64bit)
but that I have installed
$ rpm -qi --whatprovides "libavcodec.so.57()(64bit)"
Name : libavcodec57
Version : 3.2
Release : 6.6
Architecture: x86_64
Install Date: Mon 06 Mar 2017 08:47:16 PM EET
Group : System/Libraries
Size : 11080472
License : LGPL-2.1+ and GPL-2.0+
Signature : RSA/SHA1, Sat 25 Feb 2017 05:25:52 AM EET, Key ID 45a1d0671abd1afb
Source RPM : ffmpeg-3.2-6.6.src.rpm
Build Date : Fri 24 Feb 2017 04:53:00 PM EET
Build Host : swkj12
Relocations : (not relocatable)
Packager : packman@links2linux.de
Vendor : http://packman.links2linux.de
URL : https://ffmpeg.org/
Summary : FFmpeg codec library
...
So how comes that H.264 decoding works in ffmpeg but not in gstreamer if they are supposed to use the same code in the end?