Encoding to MP4 with Kdenlive (Tumbleweed)

I’m experiencing this problem here on Tumbleweed: https://forums.opensuse.org/t/kdenlive-error-mp4-h264-libx264-not-supported/174871. The old thread no longer accepts replies, so I’m opening this one.

Specifically, rendering a Kdenlive project to MP4 would be good. I know from past experience (and indeed the post linked above) that the problem is with the codecs.

On Leap (before migrating to Tumbleweed), I got this working with the Packman essentials. Installing these seems to be the usual advice - see also https://forums.opensuse.org/t/how-to-get-mp4-h-264-working-on-opensuse-tumbleweed/136521/6

But this solution may be outdated now (see https://forums.opensuse.org/t/changing-from-packman-to-vlc-repo-question/195946 and https://forums.opensuse.org/t/replacing-packman-without-flatpaks-is-a-nightmare/196359/92 among others). And, when I tried anyway, I got a warning about expired signatures on the Packman packages. So that doesn’t look like a good solution.

The VLC repo has been proposed as an alternative recently. I added the repo and installed the ffmpeg package as explained here: https://en.opensuse.org/SDB:Installing_ffmpeg_from_the_VLC_repository

But Kdenlive is still showing the MP4 and Matroska formats as unsupported, as shown in the screenshot in the first thread linked above.

I have no problem at all playing back MP4 videos. The VLC seems to be working perfectly. The issue seems to be encoding.

Also note that Kdenlive doesn’t show an error message about missing codecs or dependencies on startup. It starts normally, but doesn’t allow rendering in MP4 or Matroska because of unsupported libx264.

I’m not an expert with zypper, but here’s some output requested in the other threads on this topic:

Looking for the libx264 that Kdenlive reports as unsupported:

~> sudo zypper se -si *264*
[sudo] password for root: 
Loading repository data...
Reading installed packages...

S  | Name             | Type    | Version             | Arch   | Repository
---+------------------+---------+---------------------+--------+------------------
i  | libheif-openh264 | package | 1.23.5-2.2          | x86_64 | repo-oss
i  | libopenh264-7    | package | 2.3.1-2.sle150600.5 | x86_64 | (System Packages)
i  | libopenh264-8    | package | 2.6.0-2.suse1699.10 | x86_64 | repo-openh264
i+ | libplacebo264    | package | 5.264.1-5.5         | x86_64 | repo-oss
i+ | libx264-165      | package | 0.165-1.15          | x86_64 | VLC
i+ | libx264-devel    | package | 0.165-1.15          | x86_64 | VLC
i+ | mozilla-openh264 | package | 2.6.0-2.suse1699.10 | x86_64 | repo-openh264
i+ | x264             | package | 0.165-1.15          | x86_64 | VLC

Looking for aac:

sudo zypper se -si *aac*
[sudo] password for root: 
Loading repository data...
Reading installed packages...

S  | Name        | Type    | Version            | Arch   | Repository
---+-------------+---------+--------------------+--------+------------------
i+ | faac        | package | 1.50-150600.2.pm.1 | x86_64 | (System Packages)
i+ | libfaac0    | package | 1.50-150600.2.pm.1 | x86_64 | (System Packages)
i+ | libfdk-aac2 | package | 2.0.3.git.160-2.3  | x86_64 | VLC

And ffmpeg:

Loading repository data...
Reading installed packages...

S  | Name           | Type    | Version     | Arch   | Repository
---+----------------+---------+-------------+--------+-----------
i+ | ffmpeg-8       | package | 8.1.2-10.1  | x86_64 | VLC
i  | ffmpegthumbs   | package | 26.08.1-1.2 | x86_64 | repo-oss
i  | libheif-ffmpeg | package | 1.23.5-2.2  | x86_64 | repo-oss

Does anyone have experience with this?

4 Likes

I couldn’t tell you why the VLC packages don’t work well with Kdenlive, but they don’t. You’re not the only one.

Luckily, as @dza has already suggested, the official Flatpak works a treat.

1 Like

And if Packman works, it is still there till the end of the year…

We are running out of year, though.

Not sure if it’s worthwhile to invest work and brain capacity in a technology that will sadly go away in two and a half months.

1 Like

Agreed. I used Packman Essential up until the end of August and really appreciate the work they’ve done, but they’re moving on and so have I.

VideoLAN gives me most of what I want vis-a-vis codec support. For anything fancier (like hardware encoding), I’ve got Flatpak and Distrobox.

OK, so the problem isn’t with how I installed the codecs but with the VLC codecs not playing nicely with Kdenlive?

I’m happy to try the flatpak.

I think the issue is that the version of ffmpeg in VideoLAN repos is built to use the Cisco-provided libopenh264 for h264 encoding/decoding, but kdenlive wants libx264. Flatpak is definitely going to be the way to go.

I use Resolve for video editing, but playing around with the kdenlive Flatpak it seems to work really well.

I’m not sure that is the issue. The VLC repo has the libx264 package but not sure if it is the ffmpeg build with respect to encoding that causes the problem for kdenlive.

That’s what has me a bit confused about the entire thing. VideoLAN repo includes and installs libx264 but running ffmpeg -codecs | grep 264 gives:

 DEV.LS h264
 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10
 (decoders: h264 h264_v4l2m2m h264_qsv libopenh264 h264_amf h264_cuvid)
 (encoders: libopenh264 h264_amf h264_nvenc h264_qsv h264_v4l2m2m h264_vaapi h264_vulkan)

and ffmpeg -buildconf | grep 264 gives

    --enable-libopenh264

I would expect to see libx264 in the encoder list and --enable-libx264 in the build config, but neither is present.

Indeed that is a difference to the Packman version:

bruno@luna:~> ffmpeg -buildconf |grep 264
...
    --enable-libopenh264
    --enable-libx264
bruno@luna:~>

and the corresponding difference in ffmpeg -encoders |grep 264:
Videolan:

 V....D libopenh264          OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
 V....D h264_amf             AMD AMF H.264 Encoder (codec h264)
 V....D h264_nvenc           NVIDIA NVENC H.264 encoder (codec h264)
 V..... h264_qsv             H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)
 V..... h264_v4l2m2m         V4L2 mem2mem H.264 encoder wrapper (codec h264)
 V....D h264_vaapi           H.264/AVC (VAAPI) (codec h264)
 V....D h264_vulkan          H.264/AVC (Vulkan) (codec h264)

Packman:

 V....D libx264              libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
 V....D libx264rgb           libx264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 RGB (codec h264)
 V....D libopenh264          OpenH264 H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (codec h264)
 V....D h264_nvenc           NVIDIA NVENC H.264 encoder (codec h264)
 V..... h264_qsv             H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 (Intel Quick Sync Video acceleration) (codec h264)
 V..... h264_v4l2m2m         V4L2 mem2mem H.264 encoder wrapper (codec h264)
 V....D h264_vaapi           H.264/AVC (VAAPI) (codec h264)
 V....D h264_vulkan          H.264/AVC (Vulkan) (codec h264)

(please note the first two rows).

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.