Bug 491073 - Audio Avfilters don’t work [Cannot set sink channel counts]
Summary: Audio Avfilters don’t work [Cannot set sink channel counts]
Status: REOPENED
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Effects & Transitions (show other bugs)
Version: 24.08.1
Platform: Other All
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2024-07-31 17:07 UTC by diekuhrannte@web.de
Modified: 2025-01-30 07:41 UTC (History)
4 users (show)

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


Attachments
Audio-AVFilter_Cannot set sink channel counts (4.62 KB, image/png)
2024-09-22 08:26 UTC, emohr
Details
attachment-887416-0.html (deleted)
2024-11-18 18:32 UTC, diekuhrannte@web.de
Details

Note You need to log in before you can comment on or make changes to this bug.
Description diekuhrannte@web.de 2024-07-31 17:07:15 UTC
SUMMARY


STEPS TO REPRODUCE
1. Avfilters don’t work 
2. [Cannot set sink channel counts]

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Linux/Xfce 
Qt Version: 6 

ADDITIONAL INFORMATION
The same bug exist in Shotcut. The bug seems to have been recognized here:
https://forum.shotcut.org/t/crash-bug-with-declick-audio-filter-cannot-set-sink-channel-counts/44950
Comment 1 diekuhrannte@web.de 2024-08-01 16:05:24 UTC
no Avfilter problems with AppImage and Flatpak.
Comment 2 Jean-Baptiste Mardelle 2024-08-02 06:35:52 UTC
This is caused by an issue in MLT, that was fixed with this commit:
https://github.com/mltframework/mlt/commit/1493ced9dc9968c358c2bbb9edf8b8a6122b9216

In our AppImage, we include this commit, which will be part of MLT 7.26.
Comment 3 diekuhrannte@web.de 2024-08-02 09:17:10 UTC
I have to correct this: The current flatpak version 24.05.2 has the same problems as the normal installed version with avfilter and with the mono wav files. Only the older flatpak version 24.02.2 is free of these errors.
Comment 4 diekuhrannte@web.de 2024-08-02 09:18:21 UTC
Sorry, ich meinte, ich muss meine Aussage korrigieren, nicht Deine, Jean-Bptiste.
Comment 5 diekuhrannte@web.de 2024-08-02 09:19:07 UTC
Sorry, I meant I had to correct my statement, not yours, Jean-Bptiste.
Comment 6 diekuhrannte@web.de 2024-08-26 20:11:23 UTC
Unfortunately, this error still exists, even in the versions: 24.11.70 and in the Flatpak version 24.08 (However, another error has now been fixed: Mono wav files are now played back correctly on both channels, as before).
Comment 7 diekuhrannte@web.de 2024-08-30 18:46:09 UTC
(In reply to diekuhrannte@web.de from comment #6)
> Unfortunately, this error still exists, even in the versions: 24.11.70 and
> in the Flatpak version 24.08 (However, another error has now been fixed:
> Mono wav files are now played back correctly on both channels, as before).
Comment 8 diekuhrannte@web.de 2024-08-30 19:05:27 UTC
(In reply to diekuhrannte@web.de from comment #1)
> no Avfilter problems with AppImage and Flatpak.
Comment 9 diekuhrannte@web.de 2024-09-03 19:43:32 UTC
Sorry, my last post was unfortunately incorrect: It should read:
The error is still present in the current AppImage and Flatpak version 24.08:
z.B:
Comment 10 Méven Car 2024-09-04 08:19:42 UTC
(In reply to diekuhrannte@web.de from comment #9)
> Sorry, my last post was unfortunately incorrect: It should read:
> The error is still present in the current AppImage and Flatpak version 24.08:
> z.B:

This should be fixed upstreamed with https://github.com/mltframework/mlt/releases/tag/v7.26.0

According to https://bugs.kde.org/show_bug.cgi?id=491073#c2

This is a packaging/distro issue at this point, that need to update the mlt framework dependency to 7.26.0+.
Comment 11 diekuhrannte@web.de 2024-09-04 09:45:23 UTC
I have updated MLT to 7.26.0-1 - unfortunately there are still the same problems with the AVFilters.
[filter avfilter.haas filter8] Cannot set sink channel counts.
Comment 12 emohr 2024-09-22 08:26:04 UTC
Created attachment 173955 [details]
Audio-AVFilter_Cannot set sink channel counts

I have to re-open the issue. I tested with Windows version 24.08.1 and with the master from 21-Sep-24. It seems all Audio-AVFilter have this issue with “cannot set sink channel counts”.

BTW: JBM, it’s the same error which you saw at Akademy as I opened my test project.
Comment 13 emohr 2024-09-22 08:44:46 UTC
AppImage: Same issue with 24.08.1.

With GDB:
When such effect is applied and moving the play-head, I get:

    warning: ===============0
    KFRWIDGET REFRESH!!!!!!!!!!!!!!!!

Is this a KF6 issue?
Comment 14 Jean-Baptiste Mardelle 2024-09-24 07:02:45 UTC
Thanks for your report. Indeed another fix was required to make this work. I just opened a MR in MLT [1] and am awaiting for MLT maintainers feedback.
[1] https://github.com/mltframework/mlt/pull/1030
Comment 15 Jean-Baptiste Mardelle 2024-09-24 18:39:43 UTC
Git commit 8d86acd5d1de2bbc0d91cf4c554ca40b40f8984e by Jean-Baptiste Mardelle.
Committed on 24/09/2024 at 18:39.
Pushed by mardelle into branch 'master'.

Include latest fix for avfilter audio channel issue
Related: bug 489276, bug 493463

M  +3    -3    libs/mlt/mlt.py

https://invent.kde.org/packaging/craft-blueprints-kde/-/commit/8d86acd5d1de2bbc0d91cf4c554ca40b40f8984e
Comment 16 diekuhrannte@web.de 2024-09-25 18:38:14 UTC
Super! It looks like the bug has been fixed with the version kdenlive-master-8892-linux-gcc-x86_64.AppImage. First tests show that the AVFilters are working again. 
Many thanks to JBM
Comment 17 emohr 2024-09-29 11:09:17 UTC
I can confirm this bug is fixed on Wndows too.
Comment 18 diekuhrannte@web.de 2024-10-23 09:59:36 UTC
Kdenlive 24.08.2 still has the bug in the installed version and in flatpak. 
Interestingly, it is not present in kdenlive-24.08.2-x86_64.AppImage.
Comment 19 emohr 2024-10-23 14:48:11 UTC
It looks like flatpak doesn't have the latest MLT version.

@diekuhtannte From where do you have the install version? I think you have to ask the maintainer that they pull in the latest MLT version too.
Comment 20 diekuhrannte@web.de 2024-10-23 15:10:21 UTC
Hello @emohr,
I have this Kdenlive from Manjaro Linux, I'll see if I can give them a tip. 

I like using AppImages, but I'm missing some plugins. 
It would be great if I could find a way to integrate these three plugins: 
Steve Harris' SWH plugins, 
TAP plugins and 
CAPS plugins. 
Do you know how to do that?
Comment 21 diekuhrannte@web.de 2024-11-10 11:49:12 UTC
The new versions still have the bug with the AVFilter: Both the 24.08.3 in Fedora Linux, as well as the version 24.8.1 on Manjaro Linux. 
As soon as you apply an AVFilter, the error message appears: [filter avfilter.deesser] Cannot set sink channels counts. 
Only the AppImages are free of this bug.
Comment 22 swensonm 2024-11-13 22:28:34 UTC
Any updates on flatpak?  I am using Alma 9, and I can't use the AppImage due to issues with the g++ linked libraries.  Version in official Alma repos is ancient.

I'm going to try to downgrade the flatpak for now so I can get this project out the door.
Comment 23 diekuhrannte@web.de 2024-11-15 16:14:24 UTC
swensonm@cassens.com
falls Du, wissen möchtest, wie man flatpak downgraded:
Comment 24 diekuhrannte@web.de 2024-11-15 16:15:37 UTC
Hello swensonm@cassens.com
if you want to know how to downgrade flatpak:
https://discuss.kde.org/t/flatpak-downgrade/25568
Comment 25 swensonm 2024-11-15 16:31:50 UTC
(In reply to diekuhrannte@web.de from comment #24)
> Hello swensonm@cassens.com
> if you want to know how to downgrade flatpak:
> https://discuss.kde.org/t/flatpak-downgrade/25568

Thank you, I was able to downgrade the flatpak to a useable version.
Comment 26 diekuhrannte@web.de 2024-11-18 18:32:14 UTC
Created attachment 175928 [details]
attachment-887416-0.html

[Removed as requested]
Comment 27 Ben Cooksley 2024-11-19 18:01:37 UTC
The content of attachment 175928 [details] has been deleted for the following reason:

Removed as requested
Comment 28 kisegor 2024-12-15 20:03:32 UTC
>// GET TIMELINE PROD FOR STREAM:  1
>==== BUILT CLIP STREAM:  1
>REGISTRATION  11 ptr count 5
>qml: loaded clip:  0 , ID:  11 , index:  3 , TYPE: 3
>qml: loaded clip with Astream:  1
>::: REQUESTING SELECTION CLEAR!!!!!!
>::::: ASSET IS AUDIO!!!
>qml: Add effect:  avfilter.acontrast
>XML parsing of  "avfilter.acontrast" . found 1 parameters
>QLocale: Default value is QVariant(double, 33) parsed: "33"
>END parsing of  "avfilter.acontrast" . Number of found parameters 1
>// GOT CLIP STACK DATA CHANGE:  QList(310, 311)
>// GOT CLIP STACK DATA CHANGE DONE:  QModelIndex(0,0,0xb,TimelineItemModel(0x596c5ecc96c0))  =  QList(310, 311)
>pos:  0 out:  177
>MLT: "[filter avfilter.acontrast ] Cannot set sink channel counts"

xxxx
Comment 29 kisegor 2024-12-15 20:56:05 UTC
(In reply to kisegor from comment #28)
>I don't know how to delete the other comment
I upgraded to the latest version but still have this bug
Here's my system:
>Kdenlive: 24.12.0
>MLT: 7.28.0
>FFmpeg
>KDE Frameworks: 6.9.0
>Qt: Using 6.8.1 and built against 6.8.1
>EndeavourOS (Wayland)
>Build ABI: x86_64-little_endian-lp64
>Kernel: linux 6.12.4-arch1-1
Also, I don't have that problem with daily appimage releases that i used while waiting for an update.  I also used shotcut and didn't see a problem with audio filters there, but there weren't a lot of them:
>[Debug  ] <FilterController::loadFilterMetadata> reading filter metadata "audio_compressor" "meta.qml" 
>[Debug  ] <FilterController::loadFilterMetadata> reading filter metadata "audio_delay" "meta.qml" 
>[Debug  ] <FilterController::loadFilterMetadata> reading filter metadata "audio_eq15band" "meta.qml" 
>[Debug  ] <FilterController::loadFilterMetadata> reading filter metadata "audio_eq3band" "meta.qml" 
>[Debug  ] <FilterController::loadFilterMetadata> reading filter metadata "audio_eqparametric" "meta.qml" 
>[Debug  ] <FilterController::loadFilterMetadata> reading filter metadata "audio_expander" "meta.qml" 
>[Debug  ] <FilterController::loadFilterMetadata> reading filter metadata "audio_fadein" "meta.qml" 
>[Debug  ] <FilterController::loadFilterMetadata> added filter "Fade In Audio" 
It reads them and then doesn't add in the filters. Is it a distro/user config problem where i somehow corrupted my MLT installation?
Comment 30 emohr 2024-12-16 16:05:43 UTC
Please try with the current Kdenlive AppImage version 24.12.0 to see if there are any packaging issues: https://download.kde.org/stable/kdenlive/24.12/linux/
Comment 31 kisegor 2024-12-16 17:12:55 UTC
(In reply to emohr from comment #30)
> Please try with the current Kdenlive AppImage version 24.12.0 to see if
> there are any packaging issues:
> https://download.kde.org/stable/kdenlive/24.12/linux/
I don't have that bug with appimage. I've tried to change environment paths in the settings for my kdenlive to the binaries from the appimage:
>profilePath from KdenliveSetting::mltPath:  "/tmp/.mount_kdenlidrG7fM/usr/share/mlt-7/profiles/"
>meltPath from KdenliveSetting::meltPath:  "/tmp/.mount_kdenlidrG7fM/usr/bin/melt"
I ended up with that bug again:
>MLT: "[filter avfilter.acontrast ] Cannot set sink channel counts"
appimage info:
>Kdenlive: 24.12.0
>Package Type: AppImage
>MLT: 7.28.0
>Qt: 6.8.0 (built against 6.8.0 x86_64-little_endian-lp64)
>Frameworks: 6.8.0
>System: EndeavourOS
>Kernel: linux 6.12.4-arch1-1
>CPU: x86_64
>Windowing System: xcb
>GPU: AMD/AMD Radeon Graphics (radeonsi, renoir, LLVM 18.1.8, DRM 3.59, 6.12.4-arch1-1)
>Movit (GPU): disabled
>Track Compositing: qtblend
Comment 32 diekuhrannte@web.de 2025-01-21 16:22:49 UTC
The problem with the AVFilter has been solved by updating MLT to version 7.30.0
Comment 33 nonobio 2025-01-28 16:52:32 UTC
Hello,

I am encountering an issue with mono microphone recording. Even though Kdenlive is correctly set to mono for audio input, the sound is only being recorded on the left channel.

I found this page: https://forum.manjaro.org/t/problems-with-update-1-channel-audio-in-kdenlive-only-on-left-channel/165655/29, which led me here, where I read that this issue should be resolved in Kdenlive 24.12.1. I also saw the latest comment mentioning that the problem with the AVFilter was fixed by updating MLT to version 7.30.0.

I have installed Kdenlive 24.12.1, but the issue persists. In the "About Kdenlive" section, under the "Components" tab, I can see that MLT is still at version 7.28.0. I am using Windows 10.

Is there anything specific I need to do to resolve this issue?

Thank you :)
Comment 34 diekuhrannte@web.de 2025-01-28 17:28:35 UTC
I think we have to wait until the update from MLT comes, or you have to install it yourself. I don't know how this works on Windows. I think it's worth waiting.
Comment 35 nonobio 2025-01-30 07:41:58 UTC
Thanks for the answer, I'll wait. In the meantime, I will use the channel effect: Stereo to Mono...