v17 no passthrough audio (DD5.1)
#31
(2017-02-09, 22:50)FernetMenta Wrote:
(2017-02-09, 21:50)Goredon Wrote: PCM misses the dolby meta data. So Kodi 17 broke my setup permanently. Not usable any more for live TV.

What a statement of unknowledgeable bullshit. PCM does not need to carry ac3 metadata because it was already decoded and considered. Maybe even better than your crappy AVR would do. If your ears are at the same level than your brain, it does not matter anyway.

Out of interest - does the Kodi Dolby decoder fully observe metadata when it comes to Ro/Lo vs Rt/Lt mixdown flags when going to 2.0?
Reply
#32
(2017-02-09, 21:50)Goredon Wrote: PCM misses the dolby meta data. So Kodi 17 broke my setup permanently. Not usable any more for live TV.

What aspect of metadata does the Kodi decoder treat differently to your AVR decoder?
Reply
#33
(2017-02-09, 23:10)noggin Wrote:
(2017-02-09, 22:50)FernetMenta Wrote:
(2017-02-09, 21:50)Goredon Wrote: PCM misses the dolby meta data. So Kodi 17 broke my setup permanently. Not usable any more for live TV.

What a statement of unknowledgeable bullshit. PCM does not need to carry ac3 metadata because it was already decoded and considered. Maybe even better than your crappy AVR would do. If your ears are at the same level than your brain, it does not matter anyway.

Out of interest - does the Kodi Dolby decoder fully observe metadata when it comes to Ro/Lo vs Rt/Lt mixdown flags when going to 2.0?

https://www.ffmpeg.org/ffmpeg-codecs.htm...3-Metadata

In many regards ffmpeg is more matured than those crappy AVRs users are proud of.
Reply
#34
(2017-02-09, 23:38)FernetMenta Wrote:
(2017-02-09, 23:10)noggin Wrote:
(2017-02-09, 22:50)FernetMenta Wrote: What a statement of unknowledgeable bullshit. PCM does not need to carry ac3 metadata because it was already decoded and considered. Maybe even better than your crappy AVR would do. If your ears are at the same level than your brain, it does not matter anyway.

Out of interest - does the Kodi Dolby decoder fully observe metadata when it comes to Ro/Lo vs Rt/Lt mixdown flags when going to 2.0?

https://www.ffmpeg.org/ffmpeg-codecs.htm...3-Metadata

In many regards ffmpeg is more matured than those crappy AVRs users are proud of.

Thanks for this. I encountered a nasty bug in VLC with AAC 5.1 last year (horrible pumping on 2.0 mix down) - keep meaning to check on the progress of it. (Wonder if AAC metadata is as well implemented)
Reply
#35
I can understand the reasons why this has been disabled, but there are two main problems with this for me -

1. I receive French DVB-T channels which have E-AC3 audio. The audio track is 2.0 but has Dolby Pro Logic information to make some stuff go through the back speakers. This worked perfectly with DD+ passthrough but now I get stereo PCM (or transcoded stereo AC3) or nothing.

2. Again, on French DVB-T for some reason the E-AC3 audio often makes audible pops and squeaks when Kodi is transcoding it to PCM (I don't know why or what they do to the signal but it always does it, especially on certain programmes). E-AC3 Passthrough fixed this issue.

In the same way as point 1, as mentioned above by someone about Freeview HD having AAC audio; ITV HD is always 2.0 AAC but sometimes has Pro Logic and this has also never worked with the PCM transcode in Kodi. I've had Pro Logic via DVB-T2 ITV HD on a BT YouView receiver before so the data must be there with the AAC track.
Reply
#36
(2017-02-12, 20:40)mrwish Wrote: I can understand the reasons why this has been disabled, but there are two main problems with this for me -

1. I receive French DVB-T channels which have E-AC3 audio. The audio track is 2.0 but has Dolby Pro Logic information to make some stuff go through the back speakers. This worked perfectly with DD+ passthrough but now I get stereo PCM (or transcoded stereo AC3) or nothing.
OK - so you have 2.0 DD+ audio which has a flag enabled signalling the presence of Matrix Surround (which will give you rear surround if decoded using ProLogic or similar), and the Metadata triggers this.

From memory, I'm not sure the DD/DD+ decoding in Kodi supports this matrix-decode mode (it's popped up as a request in the past) so it will decode to 2.0 not 5.1 or similar internally, for your AVR to decode to 5.1 using ProLogic or similar. But because it is output as PCM you have to manually enable ProLogic decode.

I can see that this is more annoying than automatic switching to ProLogic decoding or similar that you would get with a bitstream decode. (I assume this still happens when you play back TV Headend recordings outside of the PVR environment, i.e. add the recording location as a Video->Files location)

Out of interest - if you enable Dolby Transcode on your setup - does the metadata get preserved ? (i.e. do you then get ProLogic triggered automatically) or does Kodi use static metadata for the transcoded output?

Quote:2. Again, on French DVB-T for some reason the E-AC3 audio often makes audible pops and squeaks when Kodi is transcoding it to PCM (I don't know why or what they do to the signal but it always does it, especially on certain programmes). E-AC3 Passthrough fixed this issue.

In the same way as point 1, as mentioned above by someone about Freeview HD having AAC audio; ITV HD is always 2.0 AAC but sometimes has Pro Logic and this has also never worked with the PCM transcode in Kodi. I've had Pro Logic via DVB-T2 ITV HD on a BT YouView receiver before so the data must be there with the AAC track.

Yes - I remember this as a bone of contention from people who have switched to Kodi for Live TV in the past. The handling of 2.0 audio with surround was a bugbear.

Again - I wonder if this is a metadata issue. AAC can presumably contain the same 'Matrix Surround in Stereo' flag in its metadata, which I imagine YouView boxes will preserve on their transcode to Dolby Digital. I imagine, like Dolby 2.0, it appears Kodi doesn't use that flag for internal ProLogic decoding to 5.1 (though I think MythTV might?), nor does it convert the AAC metadata to Dolby Metadata on the transcode as set top boxes do?

I suspect someone who wants this functionality will :

a) Have to implement the metadata preservation for Dolby transcode (including dynamic flagging as we switch between shows)
b) Have to implement a Pro-Logic-style 2.0 to 5.1 decode algorithm in ffmpeg ? (*)

(*) ProLogic is only a decoding system, not an encoding system. Dolby Surround is encoded with phase reversed matrix surround content in the left and right channels, with some Dolby noise reduction. ProLogic is purely one version of a decoding system for this (one that uses gain steering to deliver more than just the stereo + mono rear surround that the original encode effectively includes - and delivers centre and steered rear surrounds)

TL;DR

PCM decode on Live TV doesn't work as well as bitstream for 2.0 soundtracks with matrix surround that have properly flagged 'I'm 2.0 with matrix surround, switch to ProLogic or similar to listen to me' metadata.


** EDIT - thinking about it - when playing back DD 2.0 audio doesn't Kodi output PCM 2.0 not Dolby 2.0 even when transcode is enabled? Therefore it can't flag the 'I'm Dolby Surround encoded' metadata - as PCM doesn't carry this in the way Dolby does? **
Reply
#37
Looking at the ffmpeg documentation it IS possible to flag the presence of matrixed surround in a Dolby Digital bitstream produced by ffmpeg - so a) above might be possible?

Quote:-dsur_mode mode
Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround (Pro Logic). This field will only be written to the bitstream if the audio stream is stereo. Using this option does NOT mean the encoder will actually apply Dolby Surround processing.

0
notindicated
Not Indicated (default)

1
off
Not Dolby Surround Encoded

2
on
Dolby Surround Encoded

So I guess in an ideal situation - IF you have transcode to Dolby Digital enabled, AND there is Matrix Surround content flagged on the source 2.0 audio (either in AC3 or AAC metadata) then this flag should be enabled on the Dolby Digital encode process used in Kodi?
Reply
#38
(2017-02-13, 12:44)noggin Wrote:
(2017-02-12, 20:40)mrwish Wrote: I can understand the reasons why this has been disabled, but there are two main problems with this for me -

1. I receive French DVB-T channels which have E-AC3 audio. The audio track is 2.0 but has Dolby Pro Logic information to make some stuff go through the back speakers. This worked perfectly with DD+ passthrough but now I get stereo PCM (or transcoded stereo AC3) or nothing.
OK - so you have 2.0 DD+ audio which has a flag enabled signalling the presence of Matrix Surround (which will give you rear surround if decoded using ProLogic or similar), and the Metadata triggers this.

From memory, I'm not sure the DD/DD+ decoding in Kodi supports this matrix-decode mode (it's popped up as a request in the past) so it will decode to 2.0 not 5.1 or similar internally, for your AVR to decode to 5.1 using ProLogic or similar. But because it is output as PCM you have to manually enable ProLogic decode.

I can see that this is more annoying than automatic switching to ProLogic decoding or similar that you would get with a bitstream decode. (I assume this still happens when you play back TV Headend recordings outside of the PVR environment, i.e. add the recording location as a Video->Files location)

Out of interest - if you enable Dolby Transcode on your setup - does the metadata get preserved ? (i.e. do you then get ProLogic triggered automatically) or does Kodi use static metadata for the transcoded output?

Quote:2. Again, on French DVB-T for some reason the E-AC3 audio often makes audible pops and squeaks when Kodi is transcoding it to PCM (I don't know why or what they do to the signal but it always does it, especially on certain programmes). E-AC3 Passthrough fixed this issue.

In the same way as point 1, as mentioned above by someone about Freeview HD having AAC audio; ITV HD is always 2.0 AAC but sometimes has Pro Logic and this has also never worked with the PCM transcode in Kodi. I've had Pro Logic via DVB-T2 ITV HD on a BT YouView receiver before so the data must be there with the AAC track.

Yes - I remember this as a bone of contention from people who have switched to Kodi for Live TV in the past. The handling of 2.0 audio with surround was a bugbear.

Again - I wonder if this is a metadata issue. AAC can presumably contain the same 'Matrix Surround in Stereo' flag in its metadata, which I imagine YouView boxes will preserve on their transcode to Dolby Digital. I imagine, like Dolby 2.0, it appears Kodi doesn't use that flag for internal ProLogic decoding to 5.1 (though I think MythTV might?), nor does it convert the AAC metadata to Dolby Metadata on the transcode as set top boxes do?

I suspect someone who wants this functionality will :

a) Have to implement the metadata preservation for Dolby transcode (including dynamic flagging as we switch between shows)
b) Have to implement a Pro-Logic-style 2.0 to 5.1 decode algorithm in ffmpeg ? (*)

(*) ProLogic is only a decoding system, not an encoding system. Dolby Matrix surround is encoded with phase reversed surround content in the left and right channels, with some Dolby noise reduction. ProLogic is purely one version of a decoding system for this (one that uses gain steering to deliver more than just the stereo + mono rear surround that the original encode effectively includes - and delivers centre and steered rear surrounds)

TL;DR

PCM decode on Live TV doesn't work as well as bitstream for 2.0 soundtracks with matrix surround that have properly flagged 'I'm 2.0 with matrix surround, switch to ProLogic or similar to listen to me' metadata.


Thanks for this -

When I have AC3 transcode turned on, the E-AC3 2.0 matrix tagging is not preserved (and the same for Freeview HD AAC). The output is just simple stereo on the amp rather than Pro Logic.

Recordings played through the device itself in file mode still pass through the intact E-AC3 to the amp as before with Pro Logic.
Reply
#39
And yes, that's how I understood it as well that when it's 2.0 it is output as PCM rather than Dolby even with transcode enabled.

My amp shows just 'stereo' rather than Dolby for this.
Reply
#40
(2017-02-13, 12:51)noggin Wrote: Looking at the ffmpeg documentation it IS possible to flag the presence of matrixed surround in a Dolby Digital bitstream produced by ffmpeg - so a) above might be possible?

Quote:-dsur_mode mode
Dolby Surround Mode. Specifies whether the stereo signal uses Dolby Surround (Pro Logic). This field will only be written to the bitstream if the audio stream is stereo. Using this option does NOT mean the encoder will actually apply Dolby Surround processing.

0
notindicated
Not Indicated (default)

1
off
Not Dolby Surround Encoded

2
on
Dolby Surround Encoded

So I guess in an ideal situation - IF you have transcode to Dolby Digital enabled, AND there is Matrix Surround content flagged on the source 2.0 audio (either in AC3 or AAC metadata) then this flag should be enabled on the Dolby Digital encode process used in Kodi?

Actually it needs to do more than this. By default DD and AAC 2.0 audio will be decoded to PCM 2.0 (as in theory that is the best quality solution for a SPDIF connection, as a secondary encode to DD will introduce new artefacts for no obvious reason) HOWEVER - if the 2.0 audio is matrix surround encoded - then transcoding to Dolby Digital (if you can't preserve the bitstream) and preserving the d_surr type metadata DOES have a purpose.

For quite a while broadcasters weren't correctly flagging Dolby Surround content (i.e. movies and TV shows that were either made before Dolby Digital was widespread, or that have had a mix-down from Dolby Digital 5.1 to a stereo 2.0 signal with matrix surround encoding rather than mono compatibility encoding) or were using audio codecs that didn't really preserve the phase information required for a decent ProLogic decode (low bitrate MP2 probably didn't do much for it...)

However if broadcasters ARE now correctly flagging 2.0 Dolby/Matrix Surround content in their AAC or AC3 streams it would be great if Kodi could cope with this use case in both transcode and decode terms.

I guess and ideal world would be :

If AAC or AC3 source audio is flagged as 2.0 Dolby/Matrix Surround encoded, not just plain stereo 2.0, then :
a) If Dolby Transcode is enabled, then don't output as PCM 2,0, instead re-encode to Dolby BUT preserve the D_Surr Metadata (ideally preserve all metadata from Dolby and all that can be remapped from AAC?) and pass that to the Dolby encoder? (This would then output DD 2.0 with the correct metadata for off-board decoding)
b) If Channels > 2.0 then PCM decode the Matrix Surround to a suitable surround format (Stereo + single rear, Stereo + 2 rears, Stereo + centre + 2 rears etc.)

a) requires that there is a way of passing metadata from decoder to encoder (which you'd hope would be there for 5.1 use cases - where DTS, DTS HD, E-AC3, 5.1 AAC etc. are decoded and re-encoded to Dolby 5.1?)

b) requires that there is a decent implementation of a 2.0 Dolby Surround to multichannel PCM decoder, presumably within ffmpeg. I don't know if this is the case. I had a quick look through MythTVs documentation - as in the past there have been reports that it has had better handling of Matrix Surround 2.0 content (as there is a LOT of it around in Live TV - particularly on stations that don't do DD/AAC 5.1 and only send 2.0) but couldn't see anything other than an 'upmix to 5.1' option (which may be it)
Reply
#41
Looks like this is the mythtv code that handles 2.0 to 5.1 'ProLogic-style' decoding and upmixing (which is the functionality required in ffmpeg or similar for b) above) - it looks to have the gain-steering approach to decoding, not just a basic matrix decode.

https://github.com/MythTV/mythtv/blob/ma...cessor.cpp (Though I believe this isn't released under the same licence as ffmpeg or Kodi so can't be lifted)

Quite a lot more sophisticated than a basic :

Centre = Left + Right at -3dB (i.e. a mono sum)
Rear Surround = Left-Right or Right-Left with some filtering and noise reduction and a little bit of delay
or
Rear Left = Right-Left (with some level reduction) (plus possibly a bit of delay)
Rear Right = Left-Right (with some level reduction) (plus possibly a bit of delay)

This is an interesting read : https://uk.mathworks.com/help/audio/exam...n_loc_drop but is only for Dolby Surround decoding - not ProLogic.

However I guess this would only appear in Kodi if it were implemented in ffmpeg?
Reply
#42
Have put some feelers out in alternative posts. I think that decoding 2.0 Matrix Surround to 3.0/4.0/5.0/5.1 etc. is a wider issue - and won't be a quick fix. Preserving metadata on re-encode (and re-encoding DD/AAC 2.0 rather than outputting as PCM) may be more achievable - but I'm not really across the Kodi architecture anywhere near enough to be qualified to make a proper comment on this.
Reply
#43
(2017-02-13, 15:29)noggin Wrote: Have put some feelers out in alternative posts. I think that decoding 2.0 Matrix Surround to 3.0/4.0/5.0/5.1 etc. is a wider issue - and won't be a quick fix. Preserving metadata on re-encode (and re-encoding DD/AAC 2.0 rather than outputting as PCM) may be more achievable - but I'm not really across the Kodi architecture anywhere near enough to be qualified to make a proper comment on this.


Your thoughts all make sense to me! Thanks for this.

Hopefully something can be done to preserve the metadata for the re-encode.

If so I'm happy to be involved in testing it out - My set-up gets a wide range of European satellite and terrestrial channels with this audio configuration in E-AC3 (mainly France/Spain), AC3 (Germany/Italy) and AAC (UK).
Reply
#44
(2017-02-12, 20:40)mrwish Wrote: 2. Again, on French DVB-T for some reason the E-AC3 audio often makes audible pops and squeaks when Kodi is transcoding it to PCM (I don't know why or what they do to the signal but it always does it, especially on certain programmes). E-AC3 Passthrough fixed this issue.

Hi,

I have the same issue on French DVB-T. I can't watch TV using Kodi anymore.

This is linked to this ffmpeg bug opened 17 months ago:
https://trac.ffmpeg.org/ticket/4861

Another bug report on the same issue:
https://bugzilla.libav.org/show_bug.cgi?id=868

Hope someone can fix this issue or re-enable passthrough on live TV.
Reply
#45
(2017-02-14, 22:15)maskim Wrote:
(2017-02-12, 20:40)mrwish Wrote: 2. Again, on French DVB-T for some reason the E-AC3 audio often makes audible pops and squeaks when Kodi is transcoding it to PCM (I don't know why or what they do to the signal but it always does it, especially on certain programmes). E-AC3 Passthrough fixed this issue.

Hi,

I have the same issue on French DVB-T. I can't watch TV using Kodi anymore.

This is linked to this ffmpeg bug opened 17 months ago:
https://trac.ffmpeg.org/ticket/4861

Another bug report on the same issue:
https://bugzilla.libav.org/show_bug.cgi?id=868

Hope someone can fix this issue or re-enable passthrough on live TV.


I'm glad it isn't just me! I find the worst programme to be Météo on TF1. Lots of pops and squeaks in the audio. On passthrough the sound was perfect Sad
Reply

Logout Mark Read Team Forum Stats Members Help
no passthrough audio (DD5.1)0