Bug 489276 - Compressor/Expander: MLT: "[filter avfilter.compand ] Cannot set sink channel counts"
Summary: Compressor/Expander: MLT: "[filter avfilter.compand ] Cannot set sink channel...
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Effects & Transitions (show other bugs)
Version: 24.05.1
Platform: Arch Linux Linux
: HI normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-27 03:09 UTC by James North
Modified: 2024-09-29 11:11 UTC (History)
6 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James North 2024-06-27 03:09:21 UTC
SUMMARY
When I add the Compressor/Expander effect to a clip and try to play it, it tells me:

qml: Add effect:  avfilter.compand
XML parsing of  "avfilter.compand" . found 5 parameters
QLocale: Default value is QVariant(double, 0) parsed: "0"
QLocale: Default value is QVariant(double, 0.8) parsed: "0.8"
QLocale: Default value is QVariant(double, 0.01) parsed: "0.01"
QLocale: Default value is QVariant(double, 0) parsed: "0"
QLocale: Default value is QVariant(double, 0) parsed: "0"
END parsing of  "avfilter.compand" . Number of found parameters 5
// GOT CLIP STACK DATA CHANGE:  QList(308)
// GOT CLIP STACK DATA CHANGE DONE:  QModelIndex(1,0,0x19,TimelineItemModel(0x57141e96f320))  =  QList(308)
MUTEX LOCK!!!!!!!!!!!! loadEffects COUNT:  2
MUTEX UNLOCK!!!!!!!!!!!! loadEffects
deleting collapsibleeffectview
MLT: "[filter avfilter.compand ] Cannot set sink channel counts"
MLT: "[filter avfilter.compand ] Cannot set sink channel counts"

STEPS TO REPRODUCE
1. Add Compressor/Expander effect to a clip
2. Try to play the clip

OBSERVED RESULT
The effect has no effect.

EXPECTED RESULT
The effect works.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 6.9.6-arch1-1 (64-bit)/Wayland
(available in About System)
KDE Plasma Version: 6.1.0
KDE Frameworks Version: 6.3.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
Using: 
* mlt 7.24.0-3
Comment 1 James North 2024-06-27 03:12:04 UTC
Happens on the Flatpak too.
Comment 2 James North 2024-06-27 03:23:40 UTC
Downgraded to 1cb1ee7399bfe45491b57fc56df5999a2e1f93ba9fea76c664b87116d821f0c6 flatpak commit for now, which does not exhibit this bug.
Comment 3 harald 2024-06-28 08:28:14 UTC
Same issue. When adding Simple Compressor/Expander a popup shows:
Simple Compressor/Expander
[filter avfilter.contrast] Cannot set sink channel counts
Comment 4 Ivan 2024-07-04 16:25:30 UTC
In my case I found out when trying to use `Deeser` or `Crystalizer` effects on an audio track; so it is not only happening with `Compressor/Expander`; seems to happen to many audio effects.
Comment 5 Jean-Baptiste Mardelle 2024-07-06 05:43:10 UTC
This is probably an MLT issue, possibly fixed in git with this:
https://github.com/mltframework/mlt/commit/1493ced9dc9968c358c2bbb9edf8b8a6122b9216
I will update our build pipeline so we can have an AppImage to confirm it is fixed.
Comment 6 harald 2024-07-06 14:51:21 UTC
Thank you. Bug is fixed on experimental AppImage kdenlive-master-8472-linux-gcc-x86_64.AppImage. I use  KDE neon 6.0.
Comment 7 Jarno van der Kolk 2024-07-07 22:19:24 UTC
(In reply to Jean-Baptiste Mardelle from comment #5)
> This is probably an MLT issue, possibly fixed in git with this:
> https://github.com/mltframework/mlt/commit/
> 1493ced9dc9968c358c2bbb9edf8b8a6122b9216
> I will update our build pipeline so we can have an AppImage to confirm it is
> fixed.

It's possible I did it wrong, but I cherry-picked the commit you linked to and added it to the PKGBUILD for mlt (https://gitlab.archlinux.org/archlinux/packaging/packages/mlt) and rebuilt, but I'm still getting this error in Kdenlive.
Comment 8 harald 2024-07-10 12:07:11 UTC
I just got the Kdenlive version 24.05.02 from flatpak. Unfortunately bugs not fixed yet.

After adding Simple Compressor/Expander its config window shows:
Compressor/Expander
[filter avfilter.compand] Cannot set sink channel counts

After adding Simple Compressor/Expander its config window claims:
Simple Compressor/Expander
[filter avfilter.contrast] Cannot set sink channel counts

My system:
Platform: KDE neon 6.0
KDE-Plasma-Version: 6.1.2
KDE-Frameworks-Version: 6.3.0
QT-Version: 6.7.0
Comment 9 farid 2024-07-10 12:31:41 UTC
(In reply to Jarno van der Kolk from comment #7)
> (In reply to Jean-Baptiste Mardelle from comment #5)
> > This is probably an MLT issue, possibly fixed in git with this:
> > https://github.com/mltframework/mlt/commit/
> > 1493ced9dc9968c358c2bbb9edf8b8a6122b9216
> > I will update our build pipeline so we can have an AppImage to confirm it is
> > fixed.
> 
> It's possible I did it wrong, but I cherry-picked the commit you linked to
> and added it to the PKGBUILD for mlt
> (https://gitlab.archlinux.org/archlinux/packaging/packages/mlt) and rebuilt,
> but I'm still getting this error in Kdenlive.

You probably did it wrong, try to use the mlt masster aur package to test.
Comment 10 farid 2024-07-10 12:38:07 UTC
This is fixed in MLT master and latest Appimage and will be available in next version. As for the Flatpak there is a pull request open. (https://github.com/flathub/org.kde.kdenlive/pull/420)
Comment 11 Jarno van der Kolk 2024-07-13 23:44:37 UTC
(In reply to farid from comment #9)
> You probably did it wrong, try to use the mlt masster aur package to test.

Right, I shouldn't have cherry-picked that one commit but just take the whole current master. That indeed solves the problem. So, I'm just confirming!
Comment 12 timboxy 2024-09-09 09:43:46 UTC
whilst this was fixed in 24.05.2  there seems to be a regression in 24.08.0 as it has reappeared on the appimage.
Comment 13 timboxy 2024-09-24 11:08:00 UTC
Reappeared in 24.08.0
Comment 14 Jean-Baptiste Mardelle 2024-09-24 18:39:51 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 491073, bug 493463

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

https://invent.kde.org/packaging/craft-blueprints-kde/-/commit/8d86acd5d1de2bbc0d91cf4c554ca40b40f8984e
Comment 15 emohr 2024-09-29 11:11:39 UTC
With this commit I can confirm this bug is fixed. 
If it still appears in the latest version, please feel free to re-open it and update the affected version number.