NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Kodi / XBMC v
1 2 3 4 5 … 42 Next »
Kodi AC-4 (GitHub) for Windows (for ATSC 3.0 TV)

 
  • 0 Vote(s) - 0 Average
Kodi AC-4 (GitHub) for Windows (for ATSC 3.0 TV)
mvallevand
Offline

Posting Freak

Ontario Canada
Posts: 56,971
Threads: 1,003
Joined: May 2006
#11
2022-01-11, 01:13 AM
I am glad it works for you but the @ferrels Kodi branch I read about apparently was based on an older version of Nexus that spams the server. Version 20.2.1 of pvr.nextpvr is highly recommended and earlier versions for Nexus are not supported.

When producing Kodi builds I suggest it would be wise to target Matrix or if possible create nightly for Nexus. There are exciting things coming often now.

Martin
DSperber
Offline

Member

Posts: 144
Threads: 15
Joined: Jan 2020
#12
2022-01-11, 06:52 AM (This post was last modified: 2022-01-11, 07:03 AM by DSperber.)
In passing, I believe I've discovered a problem with Kodi AC-4 as far as the sequence of channels in the AC-4 FFMPEG-decoded output. I was doing a complete matrix of tests tonight, using all available client apps on all available platforms (that I have available to me), documenting the type audio output (if any) and whether it was 2.0, 5.1, or faux-5.1 (i.e. the SD version).

There is a thread on the SD forum discussing copying ATSC 3.0 MPG/TS recordings containing imbedded AC-4 5.1 and replacing it in the output with transcoded AC-3 5.1. In that discussion there was the topic of the ChannelMap operand for FFMPEG. The correct sequence of channels expected by all external hardware and AVR's is 5.1 is L, R, C, LFE (SW), LS and RS. And in order to produce that channel sequence you must specify : "channelmap=0|1|4|5|2|3:5.1(side)".

I think Kodi AC-4 is incorrectly invoking FFMPEG with "channelmap=0|1|2|3|4|5:5.1(side)", which swaps the final two pairs of channels to be incorrectly ordered from what is expected. 0,1,2,3,4,5 may be the natural order, but the external world expects it to be 0,1,4,5,2,3.

It can easily be seen visually. When Kodi is set to "pass-through" to send its decoded output to the external audio system via HDMI, here is what is shown for the AC-3 version of 5.1 out of Kodi AC-4 (on the left) and AC-4 version out of Kodi AC-4 (on the right):

[Image: gIKqVC.png]      [Image: Mlxoye.png]


Looking at it from the perspective of the Windows PC itself (on which Kodi AC-4 is running), when the audio output is instead directed through DirectSound to the 5.1 speakers attached to the PC it looks like this. Again, AC-3 on the left and AC-4 on the right.

[Image: MEUY44.jpg]      [Image: A8UIe4.jpg]

NOTE: there is an accidental unintended attachment to this post. I've tried to delete it but the forum software refuses to delete is when I push"update post". It's just stuck. Please disregard that attachment (or, if a Moderator could remove it I'd appreciate it). Sorry for the distraction.


Attached Files Thumbnail(s)
   
ferrels
Offline

Junior Member

Posts: 30
Threads: 2
Joined: Mar 2010
#13
2022-01-11, 07:03 AM
(2022-01-11, 06:52 AM)DSperber Wrote: In passing, I believe I've discovered a problem with Kodi AC-4 as far as the sequence of channels in the AC-4 FFMPEG-decoded output. I was doing a complete matrix of tests tonight, using all available client apps on all available platforms (that I have available to me), documenting the type audio output (if any) and whether it was 2.0, 5.1, or faux-5.1 (i.e. the SD version).

There is a thread on the SD forum discussing copying ATSC 3.0 MPG/TS recordings containing imbedded AC-4 5.1 and replacing it in the output with transcoded AC-3 5.1. In that discussion there was the topic of the ChannelMap operand for FFMPEG. The correct sequence of channels expected by all external hardware and AVR's is 5.1 is L, R, C, LFE (SW), LS and RS. And in order to produce that channel sequence you must specify : "channelmap=0|1|4|5|2|3:5.1(side)".

I think Kodi AC-4 is incorrectly invoking FFMPEG with "channelmap=0|1|2|3|4|5:5.1(side)", which swaps the final two pairs of channels.

It can easily be seen visually. When Kodi is set to "pass-through" to send its decoded output to the external audio system via HDMI, here is what is shown for the AC-3 version of 5.1 out of Kodi AC-4 (on the left) and AC-4 version out of Kodi AC-4 (on the right):

[Image: gIKqVC.png]      [Image: Mlxoye.png]


Looking at it from the perspective of the Windows PC itself (on which Kodi AC-4 is running), when the audio output is instead directed through DirectSound to the 5.1 speakers attached to the PC it looks like this. Again, AC-3 on the left and AC-4 on the right.

[Image: MEUY44.jpg]      [Image: A8UIe4.jpg]

NOTE: there is an accidental unintended attachment to this post. I've tried to delete it but the forum software refuses to delete is when I push"update post". It's just stuck. Please disregard that attachment (or, if a Moderator could remove it I'd appreciate it). Sorry for the distraction.

The version of ffmpeg that I used has the same channel mapping for AC-4 as is being used by AC-3 so I believe there's either a mapping issue within Kodi or your local broadcaster(s) have some channels out of sequence which is also highly probable.  Just getting the video in sync with the audio in the Phoenix area took months to resolve because the local broadcasters were using incorrect timestamps on their video streams.  I don't have the time to address any issues with Kodi for a while as I have a day job that keeps me busy.
ferrels
Offline

Junior Member

Posts: 30
Threads: 2
Joined: Mar 2010
#14
2022-01-13, 04:05 AM
(2022-01-11, 01:13 AM)mvallevand Wrote: I am glad it works for you but the @ferrels Kodi branch I read about apparently was based on an older version of Nexus that spams the server.  Version 20.2.1 of  pvr.nextpvr is highly recommended and earlier versions for Nexus are not supported.

When producing Kodi builds I suggest it would be wise to target Matrix or if possible create nightly for Nexus.  There are exciting things coming often now.

Martin
I took your advice and created a Matrix build (ver. 19.3) from github.  It seems to be working just fine and has none of the problems with missing add-ons repositories.

HEVC/AC-4 programming seems to work just fine but I only have a Dolby 2.1 surround sound system so I can't test the other surround sound configurations.

Here's a download link to the installer for folks who want to try it:  Kodi-Matrix-AC4-setup.exe
ferrels
Offline

Junior Member

Posts: 30
Threads: 2
Joined: Mar 2010
#15
2022-01-14, 01:57 PM (This post was last modified: 2022-01-14, 02:02 PM by ferrels.)
(2022-01-11, 07:03 AM)ferrels Wrote:
(2022-01-11, 06:52 AM)DSperber Wrote: In passing, I believe I've discovered a problem with Kodi AC-4 as far as the sequence of channels in the AC-4 FFMPEG-decoded output. I was doing a complete matrix of tests tonight, using all available client apps on all available platforms (that I have available to me), documenting the type audio output (if any) and whether it was 2.0, 5.1, or faux-5.1 (i.e. the SD version).

There is a thread on the SD forum discussing copying ATSC 3.0 MPG/TS recordings containing imbedded AC-4 5.1 and replacing it in the output with transcoded AC-3 5.1. In that discussion there was the topic of the ChannelMap operand for FFMPEG. The correct sequence of channels expected by all external hardware and AVR's is 5.1 is L, R, C, LFE (SW), LS and RS. And in order to produce that channel sequence you must specify : "channelmap=0|1|4|5|2|3:5.1(side)".

I think Kodi AC-4 is incorrectly invoking FFMPEG with "channelmap=0|1|2|3|4|5:5.1(side)", which swaps the final two pairs of channels.

It can easily be seen visually. When Kodi is set to "pass-through" to send its decoded output to the external audio system via HDMI, here is what is shown for the AC-3 version of 5.1 out of Kodi AC-4 (on the left) and AC-4 version out of Kodi AC-4 (on the right):

[Image: gIKqVC.png]      [Image: Mlxoye.png]


Looking at it from the perspective of the Windows PC itself (on which Kodi AC-4 is running), when the audio output is instead directed through DirectSound to the 5.1 speakers attached to the PC it looks like this. Again, AC-3 on the left and AC-4 on the right.

[Image: MEUY44.jpg]      [Image: A8UIe4.jpg]

NOTE: there is an accidental unintended attachment to this post. I've tried to delete it but the forum software refuses to delete is when I push"update post". It's just stuck. Please disregard that attachment (or, if a Moderator could remove it I'd appreciate it). Sorry for the distraction.

The version of ffmpeg that I used has the same channel mapping for AC-4 as is being used by AC-3 so I believe there's either a mapping issue within Kodi or your local broadcaster(s) have some channels out of sequence which is also highly probable.  Just getting the video in sync with the audio in the Phoenix area took months to resolve because the local broadcasters were using incorrect timestamps on their video streams.  

Ffmpeg officially only supports Dolby AC-3 audio which specifies up to 6 channels.  So anything beyond Dolby 5.1 gets treated as if it's 5.1 audio.  A look at channel_layout.h in the lavutil portion of the ffmeg library confirms this with the following channel mapping:


#define AV_CH_LAYOUT_7POINT0                     (AV_CH_LAYOUT_5POINT0|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
#define AV_CH_LAYOUT_7POINT0_FRONT         (AV_CH_LAYOUT_5POINT0|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
#define AV_CH_LAYOUT_7POINT1                     (AV_CH_LAYOUT_5POINT1|AV_CH_BACK_LEFT|AV_CH_BACK_RIGHT)
#define AV_CH_LAYOUT_7POINT1_WIDE           (AV_CH_LAYOUT_5POINT1|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
#define AV_CH_LAYOUT_7POINT1_WIDE_BACK  (AV_CH_LAYOUT_5POINT1_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)


Also see: https://trac.ffmpeg.org/ticket/3595
and
https://ffmpeg-user.ffmpeg.narkive.com/j...io-support
and
https://forum.videohelp.com/threads/4001...ing-FFmpeg
ferrels
Offline

Junior Member

Posts: 30
Threads: 2
Joined: Mar 2010
#16
2026-10-15, 10:09 PM
(2022-01-10, 05:01 AM)DSperber Wrote: If it isn't already known, I have been given clearance by the GitHub project developer to share the availabllity of his own personally modified version of Kodi for Windows. It contains built-in native support for OTA broadcast ATSC 3.0 channels now rolling out across the country, and its new AC-4 audio along with HEVC video.

I have bought a Silicon Dust HDHomeRun Flex-4K network tuner box to specifically get me going in the new "NextGen" ATSC 3.0 world. This new standard will support video of not only 720p and 1080i supported by MPEG-2, but also 1080p and potentially 2160p supported by HEVC. And audio is improved as well over the AC-3 5.1 supported by ATSC 1.0, with AC-4 audio potentially also supporting 7.1 and even 7.1.4 Dolby Atmos.

While HEVC is freely available from the MS Store for Win10/11, the LAV Filters work for HEVC in Win7.

However support for AC-4 is essentially totally absent in widely available software today. Dolby has licensed the AC-4 codec to TV manufacturers for use in their built-in tuners supporting both ATSC 1.0 and ATSC 3.0, typically for TV models 2021 and newer. Certainly Sony, LG, etc., have taken this path. So if you buy a new TV you can automatically get support of OTA ATSC 3.0 channels (assuming you use a roof antenna or rabbit ears, of course, to receive them).

As of right now no AVRs have yet been produced by any manufacturer that support decoding AC-4, so bitstreaming (pass-through) the AC-4 audio to an external sound system is not an option. Also no currently available streaming devices provide support for decoding AC-4, so their pass-through audio option is similarly worthless for client apps like NextPVR running on them.

Even for apps written to run on new TV's (like the official HDHR client app for LG OLED) can only go as far as making use of the built-in AC-4 support (e.g. LG has had built-in support for AC-4 on all OLED TV models since 2017), which is designed to produce decoding support needed only for the two speakers in the TV. So its output (say via ARC/eARC bitstreamed to an external audio system via HDMI) is only 2-channel L/R 2.0 even if the original audio was AC-4 5.1.

In other words... at the moment we are still at the bleeding edge of ATSC 3.0. Appropriate hardware to actually make use of the new AC-4 audio is unavailable. Plus, there are really very few ATSC 3.0 channels available yet in the 36 cities where initial rollout has started. So far, only FOX has really been the major leader in the early charge to upgrade their local affiliates with ATSC 3.0 channels along with the existing ATSC 1.0 versions of the same channel. All the other channels will follow over the next year or two or three, but for now it's essentially only FOX which has taken the lead on ATSC 3.0.

So whereas FOX stations nationwide have all used 720p as their video protocol for ATSC 1.0, the new ATSC 3.0 versions of FOX channels are broadcasting in native 1080p. Looks beautiful upscaled to 2160p for display on a 4K LG OLED TV! Also, other early rollout channels that were interlaced 1080i on ATSC 1.0 are now also delivering native 1080p for the same program on ATSC 3.0.

We're probably years away from this really being the widespread norm, and people replacing their old equipment only capable of handling AC-3 and ATSC 1.0 broadcast TV with new equipment properly supporting ATSC 3.0 for both HEVC video and AC-4 audio.

Which brings me to the point of this post: there is available today a GitHub project which is "Kodi AC-4" for Windows 7, 10 and 11. And it delivers decoded AC-4 audio... natively, using a beta version of FFMPEG that adds support for AC-4.

So because it is actually Kodi it utilizes the NextPVR backend for its live TV and recording services, which in turn supports my Flex-4K tuners.  And it uses the beta FFMPEG to support AC-4 natively, so ATSC 3.0 channels containing AC-4 audio are perfectly supported and deliver 5.1. You will get 5.1 audio out, either on your PC or pass-through bitrstreamed to an external audio system. And if you connect your Windows Kodi-enabled desktop PC graphics card or laptop HDMI output to an external audio system, you can get true 5.1 audio while enjoying the native 1080p video upscaled to 2160p, on your home entertainment system. NATIVE AC-4 SUPPORT IN KODI!

Here is the GitHub project page, with all the details. It also shows my recent conversation with the author. So everything I've learned about and questioned over the past few days is documented there in the comments below. All his answers are in the comments below. You will know everything I know, because it's all written down there.

I have now installed Kodi AC-4 on both my Win7 and Win10 systems. Note that it uses PVR.NEXPVR as its add-on, which is the one from Graeme Blackley. Turns out we had some problems getting the add-on installed initially, because the Kodi distribution had been changed since November when this project was posted on GitHub. The solution/workaround is to download the add-on manually in ZIP form, and then place the un-zipped folder in Kodi's \addons folder. Then the add-on can be configured and enabled as normal (being sure to un-check the "automatically apply updates" option). 

And it works perfectly, albeit it only for Windows. But if you're looking for the perfect solution to how to properly support the new Flex-4K product from SD, and the new ATSC 3.0 channels with built-in native support for the imbedded AC-4 audio, THIS IS THE CLIENT FOR YOU as your Windows client!


I finally got around to fixing the channel order problem in ffmpeg and compiled the latest stable version of Kodi (21.3) against it.  You can grab it here:   https://github.com/ferrellsl/kodi-ac4/releases/tag/v21.3-ac4

You can install it over your old version of Kodi as it leaves the old one in place and the new version will import all your old Kodi settings.  You WILL need to update your NextPVR add-on but that's it.  It should work fine after that, just make sure you run the correct version/icon for 21.3 instead of the earlier version of Kodi.
ferrels
Offline

Junior Member

Posts: 30
Threads: 2
Joined: Mar 2010
#17
2026-10-27, 12:33 PM
(2022-01-13, 04:05 AM)ferrels Wrote:
(2022-01-11, 01:13 AM)mvallevand Wrote: I am glad it works for you but the @ferrels Kodi branch I read about apparently was based on an older version of Nexus that spams the server.  Version 20.2.1 of  pvr.nextpvr is highly recommended and earlier versions for Nexus are not supported.

When producing Kodi builds I suggest it would be wise to target Matrix or if possible create nightly for Nexus.  There are exciting things coming often now.

Martin
I took your advice and created a Matrix build (ver. 19.3) from github.  It seems to be working just fine and has none of the problems with missing add-ons repositories.

HEVC/AC-4 programming seems to work just fine but I only have a Dolby 2.1 surround sound system so I can't test the other surround sound configurations.

Here's a download link to the installer for folks who want to try it:  Kodi-Matrix-AC4-setup.exe


I've created new builds of Kodi Omega version 21.3 with ATSC3/AC-4 audio support.  The three builds include Windows, Android, and FireTV/FireStick.  They can be downloaded from the following link:  https://github.com/ferrellsl/kodi-ac4/releases/tag/v21.3-ac4.2   The FireTV/FireStick versions remain untested as I don't own either device but the Windows and Android builds have been thoroughly test and run as designed. If there's enough interest I'll generate a Debian/Ubuntu Linux version and host it at the same link on github.  If you find any issues leave a note in the "Issues" section of my repo.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): « Previous 1 2


Possibly Related Threads…
Thread Author Replies Views Last Post
  SSL working everywhere but in Kodi MrOrange 7 1,881 2026-08-07, 01:48 PM
Last Post: mvallevand
  NextPVR V5 client connection to KODI gone on 4 different TV's bass_gas 7 1,111 2026-07-26, 03:14 PM
Last Post: mvallevand
  Kodi Piers Not ready for NPVR yet? Lao Pan 9 1,683 2026-05-24, 01:11 PM
Last Post: mvallevand
  How to activate https for NextPVR Plugin in Kodi Beksultan 1 847 2026-04-24, 01:44 AM
Last Post: mvallevand
  Setting http proxy with kodi doesn’t work with nextpvr araset 16 2,787 2026-03-05, 05:19 PM
Last Post: araset
  Kodi and NextPVR playback limited to 720p only araset 1 982 2026-03-02, 08:17 PM
Last Post: mvallevand
  Kodi playback - repeating/looping jzk 2 1,102 2026-02-25, 07:05 PM
Last Post: mvallevand
  [Wishlist] Customisable timer default in Kodi hmc 5 1,534 2026-01-19, 07:46 AM
Last Post: hmc
  Automated Updates of IPTV Channels in NPVR and Kodi via APIs taylormia 2 4,313 2025-11-04, 06:38 PM
Last Post: sub
  Kodi Recurring Recordings (Default Type) Fillimerica 2 1,516 2025-10-21, 07:34 PM
Last Post: mvallevand

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode