Bug 496599 - Video transcoding to mp4 does not work
Summary: Video transcoding to mp4 does not work
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Project Bin & Import (show other bugs)
Version: 24.08.3
Platform: Flatpak Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2024-11-23 02:15 UTC by VM
Modified: 2025-03-23 19:10 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 25.04.0
Sentry Crash Report:


Attachments
kdenlive error output when trying to recode mp4 video (126.66 KB, image/png)
2024-11-23 02:15 UTC, VM
Details
Log of bug of transcoding (876 bytes, text/plain)
2024-11-26 05:13 UTC, VM
Details
Recording log flatpak (1.23 KB, text/plain)
2024-11-26 17:44 UTC, VM
Details
Recording log appimage (1.35 KB, text/plain)
2024-11-26 17:45 UTC, VM
Details
AppImage transcoding log (566 bytes, text/plain)
2024-11-26 17:46 UTC, VM
Details
transoding profile (67.86 KB, image/png)
2024-11-28 09:32 UTC, Jean-Baptiste Mardelle
Details
Kdenlive Appimage daily build transcoding log (566 bytes, text/plain)
2024-11-28 19:31 UTC, VM
Details
ffmpeg -i log (4.03 KB, text/plain)
2025-03-02 20:33 UTC, VM
Details
A short video without copyrights with an example of a transcoding bug (3.81 MB, video/mp4)
2025-03-11 23:14 UTC, VM
Details

Note You need to log in before you can comment on or make changes to this bug.
Description VM 2024-11-23 02:15:01 UTC
Created attachment 176057 [details]
kdenlive error output when trying to recode mp4 video

Hello. I download videos from YouTube in mp4 format via parabolic (GUI for yt-dlp). Kdenlive offers to recode the video for subsequent work with it. But the transcoding leads to an error and is not performed. I checked the different ones with file names in English, numbers and emojis, this bug was still present. This does not work in the flatpack version and in the version from the fedora 41 repository. The problem in the flatpak version was noticed in fedora 41 and debian 12.

Operating System: Fedora Linux 41
KDE Plasma Version: 6.2.3
KDE Frameworks Version: 6.8.0
Qt Version: 6.8.0
Kernel Version: 6.11.8-300.fc41.x86_64 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6600 CPU @ 3.30GHz
Memory: 7.6 ГиБ of RAM
Graphics Processor: Mesa Intel® HD Graphics 530
Comment 1 VM 2024-11-26 05:13:24 UTC
Created attachment 176127 [details]
Log of bug of transcoding

Log of bug of transcoding of kdenlive
Comment 2 emohr 2024-11-26 10:02:57 UTC
Could you test with CPU recoding, to see if the hardware recoding has some issues.

In parallel can you test with the AppImage to see if there are any packaging issues with Flatpak. You'll find the AppImage here: https://kdenlive.org/en/download/
Comment 3 VM 2024-11-26 17:42:31 UTC
(In reply to emohr from comment #2)
> Could you test with CPU recoding, to see if the hardware recoding has some
> issues.
> 
> In parallel can you test with the AppImage to see if there are any packaging
> issues with Flatpak. You'll find the AppImage here:
> https://kdenlive.org/en/download/

Here is the log of the screen Recording in the flatpack version. Here is the log from the AppImage
Comment 4 VM 2024-11-26 17:44:57 UTC
Created attachment 176142 [details]
Recording log flatpak
Comment 5 VM 2024-11-26 17:45:39 UTC
Created attachment 176143 [details]
Recording log appimage
Comment 6 VM 2024-11-26 17:46:21 UTC
Created attachment 176144 [details]
AppImage transcoding log
Comment 7 emohr 2024-11-27 18:01:40 UTC
We fixed some transcoding issue with commit: https://invent.kde.org/multimedia/kdenlive/-/commit/385d9b7c4c85d2081a0937b3ba2eba7ba7acc9eb

Please try with latest daily build AppImage if the issue is solved: https://cdn.kde.org/ci-builds/multimedia/kdenlive/master/linux/
Comment 8 Jean-Baptiste Mardelle 2024-11-28 09:31:12 UTC
The problem probably comes from the selected transcoding profile (VAAPI). VAAPI support in our packages is currently not in the best shape. Please try encoding with the standard Lossy x264 profile (see attached screenshot).
Comment 9 Jean-Baptiste Mardelle 2024-11-28 09:32:21 UTC
Created attachment 176181 [details]
transoding profile
Comment 10 VM 2024-11-28 19:30:15 UTC
(In reply to emohr from comment #7)
> We fixed some transcoding issue with commit:
> https://invent.kde.org/multimedia/kdenlive/-/commit/
> 385d9b7c4c85d2081a0937b3ba2eba7ba7acc9eb
> 
> Please try with latest daily build AppImage if the issue is solved:
> https://cdn.kde.org/ci-builds/multimedia/kdenlive/master/linux/

Transcoding in this latest daily build AppImage doesn't work either. Here is the error log.
Comment 11 VM 2024-11-28 19:31:58 UTC
Created attachment 176195 [details]
Kdenlive Appimage daily build transcoding log
Comment 12 VM 2024-11-28 19:34:03 UTC
(In reply to Jean-Baptiste Mardelle from comment #8)
> The problem probably comes from the selected transcoding profile (VAAPI).
> VAAPI support in our packages is currently not in the best shape. Please try
> encoding with the standard Lossy x264 profile (see attached screenshot).

I checked on fedora 41, this profile also does not work either in the Flatpak version or in the latest AppImage build.
Comment 13 salvatore.cresce 2024-12-14 21:22:24 UTC
It has mysteriously stopped to work with me too, I don't know why or how. Everything was working, from kdenlive to simple browser vaapi acceleration. Any clean installation of a system doesn't solve too, so it might simply be Plasma 6.2.x.
GNOME is working instead.
Comment 14 emohr 2025-02-18 08:38:25 UTC
Please try with the latest AppImage version 24.12.2 to see if the issue still exists. https://kdenlive.org/en/download/
Comment 15 VM 2025-02-22 17:45:05 UTC
(In reply to emohr from comment #14)
> Please try with the latest AppImage version 24.12.2 to see if the issue
> still exists. https://kdenlive.org/en/download/

I tried AppImage version 24.12.2, the error still remains
Comment 16 Jean-Baptiste Mardelle 2025-02-23 06:52:44 UTC
If the standard (non accelerated accelerated profile)s still doesn'work it would be interesting to have the output of this command in a terminal: (replace your_video with the path to your source video you are trying to transcode)
ffmpeg -i your_video.mp4

This will give us detailed infos about the streams in your file
Comment 17 VM 2025-03-02 20:33:10 UTC
Created attachment 179048 [details]
ffmpeg -i log

Here is a log with an example of a video whose transcoding does not work in kdenlive. Downloaded via parabolic.
Comment 18 Jean-Baptiste Mardelle 2025-03-03 07:59:57 UTC
Ok, the file format is quite unusual, with a video stream, an audio stream and a thumbnail in another stream. 
The third stream with the image thumbnail is probably what causes the failure. Do you maybe have a very short non copyrighted sample video that you could share so I can try to fix the issue?
Comment 19 VM 2025-03-11 23:14:00 UTC
Created attachment 179321 [details]
A short video without copyrights with an example of a transcoding bug

Here is an example of a 28-second video without copyright that has a transcoding bug.
Comment 20 Jean-Baptiste Mardelle 2025-03-12 12:37:31 UTC
Git commit 49286f99e252dfc1fcc8378f99ac289a260d0784 by Jean-Baptiste Mardelle.
Committed on 12/03/2025 at 12:36.
Pushed by mardelle into branch 'release/25.04'.

Fix transcoding and proxying of clips with cover art
FIXED-IN: 25.04.0

M  +10   -1    src/jobs/proxytask.cpp
M  +4    -2    src/jobs/transcodetask.cpp
M  +2    -0    src/mltcontroller/clipcontroller.cpp

https://invent.kde.org/multimedia/kdenlive/-/commit/49286f99e252dfc1fcc8378f99ac289a260d0784
Comment 21 VM 2025-03-23 19:10:08 UTC
I checked the latest daily build kdenlive from comment 7, the mp4 transcoding worked fine.