#1029663 kodi: no audio when AAC to AC3 transcoding

Package:
kodi
Source:
kodi
Description:
Open Source Home Theatre (executable binaries)
Submitter:
Markus Koller
Date:
2023-01-26 09:54:02 UTC
Severity:
normal
#1029663#5
Date:
2021-09-06 18:19:36 UTC
From:
To:
Dear Maintainer,


   1. Installed libdvd-pkg and ran sudo dpkg-reconfigure libdvd-pkg.
   2. Mounted DVD in KDE and open DVD in kodi.
   3. Noticed no audio is playing.
   4. Press "o" during playback and see that Audio stream is unknown. (AC3 decoded)

#1029663#10
Date:
2021-09-06 18:28:43 UTC
From:
To:
Hi Aaron!

Can you please enable debugging of FFmpeg and capture Kodi log reproducing the issue?
I recall there was an issue described on Kodi forums, but I want to check once more against your log.
-- 
Vasyl Gello
==================================================
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.gello@gmail.com

Skype: vasek.gello
==================================================
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

#1029663#15
Date:
2021-09-06 18:28:43 UTC
From:
To:
Hi Aaron!

Can you please enable debugging of FFmpeg and capture Kodi log reproducing the issue?
I recall there was an issue described on Kodi forums, but I want to check once more against your log.
-- 
Vasyl Gello
==================================================
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.gello@gmail.com

Skype: vasek.gello
==================================================
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

#1029663#20
Date:
2021-09-06 19:13:31 UTC
From:
To:
I notice -DENABLE_INTERNAL_FFMPEG=OFF \ in rules.
Would switching to -DENABLE_INTERNAL_FFMPEG=ON fix this?

Arch has this flag on and has working audio for DVDs.

Aaron.

Sent with [ProtonMail](https://protonmail.com/) Secure Email.

#1029663#23
Date:
2021-09-06 19:18:42 UTC
From:
To:
Regardless of whether turning that switch on would fix the bug, that's
not considered as compliant in Debian, where we strive *very* hard to
avoid using internal copies of shared libraries.

#1029663#28
Date:
2021-09-08 13:30:46 UTC
From:
To:
This is probably related to the ffmpeg 4.4 update, which in my case
broke AC3 transcoding for AAC audio. Downgrading to 4.3 fixed it for
now.

Kodi master has some changes to fix this, but 19.1 doesn't include
them yet: https://github.com/xbmc/xbmc/pull/19558

Could this be added as a patch in Debian?

Some related discussions:
- https://forum.kodi.tv/showthread.php?tid=362843
- https://bugzilla.rpmfusion.org/show_bug.cgi?id=6000
- https://www.deb-multimedia.org/lurker/message/20210715.125358.efbe51b3.en.html

Thanks,
Markus

#1029663#33
Date:
2021-09-08 17:01:07 UTC
From:
To:
Hi Markus!

Yes, it is possible to add that patch for bookworm/sid.
-- 
Vasyl Gello
==================================================
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.gello@gmail.com

Skype: vasek.gello
==================================================
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

#1029663#38
Date:
2021-11-16 19:55:21 UTC
From:
To:
Hi there,

is this related to Kodi not finding *any* audio streams on DVDs (at
least not on the few I tried today after quite a long break), as
described here: https://forum.kodi.tv/showthread.php?tid=359403?

Any chance this gets added also in bullseye any time soon?

I daresay that DVD playback is a core function of any media player
software, and jessie's Kodi already had quite some issues in that
respect. I'd really appreciate not to be forced again to fall back to
some third-party repos to keep our Debian-based HTPC running -- family's
already breathing down my neck... ;)

Cheers --

	Torsten

#1029663#43
Date:
2021-11-16 21:00:24 UTC
From:
To:
Hi Thorsten!

If ffmpeg downgrade solves the issue for you, unlikely it is a Kodi problem.
But let me check with the team and get back to you soon.
-- 
Vasyl Gello
==================================================
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.gello@gmail.com

Skype: vasek.gello
==================================================
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

#1029663#48
Date:
2021-11-17 16:22:22 UTC
From:
To:
Hi Vasyl,

just realized that my ffmpeg is still at 4.3, as provided by bullseye --
so 4.4 seems not to be the issue here.

Perhaps I should open an entirely new bug report for the "Kodi not
detecting any audio streams on DVD playback" issue?

Cheers --

	Torsten

#1029663#53
Date:
2021-11-17 17:03:01 UTC
From:
To:
Hi Torsten!

Can you please file an issue on https://github.com/xbmc/xbmc/issues and attach Kodi debug log with FFmpeg debug category enabled?
Our members will check it and try providing a fix.
-- 
Vasyl Gello
==================================================
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.gello@gmail.com

Skype: vasek.gello
==================================================
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

#1029663#58
Date:
2021-11-17 17:51:23 UTC
From:
To:
Hi Vasyl,

done: https://github.com/xbmc/xbmc/issues/20537

Thanks for all your efforts!

Cheers --

	Torsten

#1029663#63
Date:
2022-01-02 08:48:32 UTC
From:
To:
Happy new year, everyone!

I was just wondering if there's any progress regarding DVD audio
playback on Debian's Kodi version?

Cheers --

    Torsten

#1029663#68
Date:
2022-01-02 09:27:54 UTC
From:
To:
Hi Torsten!

Happy New Year to you as well!
I have nearly completed the recovery from COVID and will try solving the DVD issue among the others.

#1029663#73
Date:
2022-01-05 19:21:27 UTC
From:
To:
Oh my goodness! All the best for your recovery! Sincerely hope you won't
experience long COVID syndrome! So...

...take it slowly, will you?

Cheers --

	Torsten

#1029663#78
Date:
2022-09-26 20:01:25 UTC
From:
To:
How did you do AC3 to AAC transcoding (playing DVD with kodi 19?).

Sadly you did not provide the ffmpeg debian version you reverted to.
Because I with current bullseye ffmpeg 7:4.3.4-0+deb11u1 dvd playback
does not work in debian kodi 19 2:19.4+dfsg2-2~bpo11+1.

From https://forum.kodi.tv/showthread.php?tid=359403 it seems DVD audio
debian/ubuntu in kodi has been borken since 18 Leia (or maybe it was an
ffmpeg upgrade at around that time).

Mind that upstream kodi ships ffmpeg 4.3.2 so maybe ffmpeg version
above that one has a regression (since fixed in ffmpeg 5.1 because
debian kodi 20 with debian ffmpeg 5.1 has DVD audio working).
So maybe it was this debian ffmpeg 4.3.2 that you reverted to back
then, hard to tell.

What would help is knowing if buster with kodi 19 from buster-backports
also suffers the missing audio streams in DVD playback.
Because the streams are not only not playbacked but even not detected
(the audio settings when a dvd is playing back has no stream).

I made a quick port of this patchset but saw no improvement. But as I
do not know your use case maybe it would help with yours.
I will not send the patchset without an even very rough test case to
show it has an effect (this is ment for stable as testing already ships
kodi 20 with ffmpeg 5.1 which already has this patchset).
Maybe from https://forum.kodi.tv/showthread.php?tid=362843 it means
playing a file with AC3 (E-AC3 track ?) in it with kodi setting "AC3 /
DTS passthrough enabled" with pulseaudio as a backend (maybe pipewire
supports passwthrough nowadays, hard to tell).
I only have a stereo setup, I do not know yet if I am able to test.

I even doubt this patchset could get into stable as it is not a
security issue, merely a regression bug.


Mind that ffmpeg 4.4 is not available in a debian release anymore.
Testing ships ffmpeg 5.1.
https://www.deb-multimedia.org/lurker/message/20210715.125358.efbe51b3.en.html

So thre may be two bugs, the bug the initial report reported here (that
kodi 19 has no audio stream, and the one that on a plain file with AC3
audio the playback is broken. We might need both fixed to have DVD
audio playback.
But this bug report one is firstly about the dvd audio no stream.



Kind regards,
Alban

#1029663#83
Date:
2022-09-26 20:48:36 UTC
From:
To:
Hey Alban,

I ended up switching to the Flatpak version of Kodi to avoid these issues,
so unfortunately I can't easily test (especially since I'm also using sid,
which I see is on an alpha version of Kodi 20 now).

It was the other way around, transcoding from AAC to AC3.
You can achieve that by disabling AAC passthrough for Pulseaudio via
pavucontrol, and enabling the AC3 transcoding setting in Kodi.

IIRC it only affected source files with AAC tracks, normal AC3 passthrough
still worked.

I checked my dpkg logs but they don't go back far enough :(
FWIW the Flatpak version of Kodi 19.4-Matrix seems to ship with ffmpeg
4.3.4.

It actually does! But I found it to be buggy (especially with E-AC3 and
DTS), so I'm staying on Pulseaudio for now.

Greetings,
Markus

#1029663#88
Date:
2022-10-04 13:17:20 UTC
From:
To:
Dear colleagues,

I have a monthly break in the travels and I am going to package Alpha3/4 and sort the issues spotted by all of you.
Please prepare your 19.4 profile backups before testing 20. There will be probably several rounds of unofficial builds
signed with my GPG key that will be replaced by official upload once the bugs are fixed.
-- 
Vasyl Gello
==================================================
Certified SolidWorks Expert

Mob.:+380 (98) 465 66 77

E-Mail: vasek.gello@gmail.com
==================================================
호랑이는 죽어서 가죽을 남기고 사람은 죽어서 이름을 남긴다

#1029663#93
Date:
2023-01-26 04:44:12 UTC
From:
To:
package kodi
clone 993806 -1
submitter -1 Markus Koller <markus-koller@gmx.ch>
retitle -1 kodi: no audio when AAC to AC3 transcoding
thanks

I clone the bug report to account for the fact the AAC to AC3
transcoding is a recent issue while the DVD audio missing is an older
one on Debian. So different bugs.
issues,
sid,
passthrough
ffmpeg
and

#1029663#104
Date:
2023-01-26 05:10:53 UTC
From:
To:
Summarizing the AAC to AC3 issue with stable Debian.


https://bugzilla.rpmfusion.org/show_bug.cgi?id=6000
tells that inital ffmpeg 4.4 support has to be added but is not enough.

Ine has to also add https://github.com/xbmc/xbmc/pull/20678  ffmpeg:
Set audio channel count on AVFrame #20678, kodi patch for to fix AAC to
AC3 transcoding.

I admit I am not sure I can reproduce with my setup (pipewire and only
stereo devices) to try if it is enough (or even not already fixed in
bullseye-backports).


I tried but am unable to find how to "disabling AAC passthrough for
Pulseaudio via pavucontrol" and "enabling the AC3 transcoding setting
in Kodi". Could you be more specific about the steps?

Cheers,
Alban
issues,
sid,
passthrough
ffmpeg
and

#1029663#109
Date:
2023-01-26 05:11:56 UTC
From:
To:
Summarizing the AAC to AC3 issue with stable Debian.


https://bugzilla.rpmfusion.org/show_bug.cgi?id=6000
tells that inital ffmpeg 4.4 support has to be added but is not enough.

Ine has to also add https://github.com/xbmc/xbmc/pull/20678  ffmpeg:
Set audio channel count on AVFrame #20678, kodi patch for to fix AAC to
AC3 transcoding.

I admit I am not sure I can reproduce with my setup (pipewire and only
stereo devices) to try if it is enough (or even not already fixed in
bullseye-backports).


I tried but am unable to find how to "disabling AAC passthrough for
Pulseaudio via pavucontrol" and "enabling the AC3 transcoding setting
in Kodi". Could you be more specific about the steps?

Cheers,
Alban
issues,
sid,
passthrough
ffmpeg
and

#1029663#114
Date:
2023-01-26 09:29:28 UTC
From:
To:
The upstream bug report log (before it was fixed with previously
mentionned pull request) https://github.com/xbmc/xbmc/issues/20398 AC3
transcoding fails on Kodi 20


Cheers,
Alban

#1029663#119
Date:
2023-01-26 09:38:29 UTC
From:
To:
package kodi
fixed 1029663 2:20.0+dfsg-1
thanks

Please close this bug report per ffmpeg 4.4 is not in any Debian
release and kodi 19 which is in bullseye does not have this bug with
buslleye ffmpeg 4.3.

I mark this bug as fixed in kodi 20 as the commits to fix this bug with
ffmpeg 4.4 are in kodi 20. But even kodi 19.1 and kodi 19.4 are not
affected anymore since ffmpeg 5 has different packages then ffmpeg 4 in
Debian.

Cheers,
Alban

#1029663#126
Date:
2023-01-26 09:51:28 UTC
From:
To:
Summarizing the AAC to AC3 issue with stable Debian.


https://bugzilla.rpmfusion.org/show_bug.cgi?id=6000
tells that inital ffmpeg 4.4 support has to be added but is not enough.

Ine has to also add https://github.com/xbmc/xbmc/pull/20678  ffmpeg:
Set audio channel count on AVFrame #20678, kodi patch for to fix AAC to
AC3 transcoding.

I admit I am not sure I can reproduce with my setup (pipewire and only
stereo devices) to try if it is enough (or even not already fixed in
bullseye-backports).


I tried but am unable to find how to "disabling AAC passthrough for
Pulseaudio via pavucontrol" and "enabling the AC3 transcoding setting
in Kodi". Could you be more specific about the steps?

Cheers,
Alban
issues,
sid,
passthrough
ffmpeg
and