libx264 problem. Encoder or codec?

Terry Neve terryn94 at
Wed Jul 1 10:48:54 BST 2020


Firstly thanks for a great piece of software and I hope you can help
with a problem I have encountered.

When selecting Render and choosing the format "MP4 - the dominating
format (H264/AAC)" the render option is disabled with the error
Unsupported video codec: libx264 (attached screenshot)

Looking at the code in renderwidget.cpp it checks the codec defined in
the project profile against a list of video codecs obtained from MLT and
sure enough libx264 is not in that list.  I've been told that this is
because "libx264 is not a codec, it's an encoder implementation of a
codec".  I confess I'm not sure I understand the distinction but doing
some tests:

[terry at localhost ~]$ melt -query video_codecs | grep 264
  - h264_nvenc
  - h264_v4l2m2m
  - h264_vaapi
  - nvenc_h264
  - h264
  - h264_cuvid

I believe that is the command equivalent of how renderwidget populates
vcodecsList and libx264 is not there.  However I can run a command like:

melt avformat:DarkStar.webm -consumer avformat:output.mp4 acodec=aac

and it works just fine.
Looking at how ffmpeg sees things seems to confirm what I was told.

[terry at localhost ~]$ ffmpeg -codecs | grep 264
ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
  built with gcc 9.3.0 (PCLinuxOS 9.3.0-1pclos2020)
  configuration: --prefix=/usr --enable-shared --enable-pic
--libdir=/usr/lib64 --shlibdir=/usr/lib64 --incdir=/usr/include
--extra-cflags=-I/usr/include/nvenc --disable-stripping
--enable-postproc --enable-gpl --enable-pthreads --enable-libtheora
--enable-libvorbis --disable-encoder=vorbis --enable-libvpx
--enable-runtime-cpudetect --enable-libdc1394 --enable-librtmp
--enable-libspeex --enable-libfreetype --enable-libgsm --enable-libcelt
--enable-libopus --enable-libopencv --enable-libopenjpeg
--enable-libtwolame --enable-libxavs --enable-frei0r --enable-libmodplug
--enable-libass --enable-gnutls --enable-libcdio --enable-libpulse
--enable-libv4l2 --enable-avresample --enable-opencl --enable-libmp3lame
--enable-libaom --enable-sndio --enable-libdav1d
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3
--enable-libx264 --enable-libx265 --enable-libvo-amrwbenc
--enable-libxvid --enable-decoder=atrac3 --enable-decoder=atrac3p
--enable-libwebp --enable-libfdk-aac --enable-nonfree --enable-cuda
--enable-cuvid --enable-nvenc --extra-cflags=-I/usr/local/cuda/include
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
 DEV.LS h264                 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
(decoders: h264 h264_v4l2m2m h264_cuvid ) (encoders: libx264 libx264rgb
h264_nvenc h264_v4l2m2m h264_vaapi nvenc nvenc_h264 )

I was told instead to do:

[terry at localhost ~]$ ffmpeg -encoders | grep 264
V..... libx264              libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4
part 10 (codec h264)
 V..... libx264rgb           libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4
part 10 RGB (codec h264)
 V..... h264_nvenc           NVIDIA NVENC H.264 encoder (codec h264)
 V..... h264_v4l2m2m         V4L2 mem2mem H.264 encoder wrapper (codec h264)
 V..... h264_vaapi           H.264/AVC (VAAPI) (codec h264)
 V..... nvenc                NVIDIA NVENC H.264 encoder (codec h264)
 V..... nvenc_h264           NVIDIA NVENC H.264 encoder (codec h264)

I don't know what the equivalent MLT query would be for that.
I must confess I don't really know whether the problem lies in MLT or
kdenlive.  I'm hoping maybe someone here can shed some light on this for me.

Software versions in use:

Thanks in advance,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot-20200618-151118.png
Type: image/png
Size: 83108 bytes
Desc: not available
URL: <>

More information about the kdenlive mailing list