Jump to content

EMBY ATSC3


Recommended Posts

Posted
19 minutes ago, them8os235 said:

p.s. I reinstalled Emby Theater v3.0.20 ...

1. on one hand and I'm back to having audio out via Direct Play of HEVC ATSC 3.0 channels with AC4 audio. 

2. On the other hand audio & video is so badly out of sync when the channel's audio is 5.1 AC4 it's completely unwatchable; only in-sync when AC4 audio is 2.0/stereo. 

3. As application of audio re-sync is not available conditionally, and not applied on a case by case basis configured in the ET UI (why is that?) when the watcher determines it's needed, and one can't configure a server-side sync delay as that is only appropriate for a small subset of channels ....

Nothing in regards to ATSC 3.0 HEVC + AC4 audio is totally workable.

I'm reminded of why I a) hadn't been watching many HEVC channels or recordings in Emby, and b) the aggravations of the past and why I uninstalled the Electron based Emby Theater.  🤦‍♂️

 

ATSC3 rollout has been a dumpster fire industry wide thus far...

  • Like 1
  • Sad 1
  • Agree 1
them8os235
Posted (edited)

p.p.s. one piece of good news was just observed.  Using the new Emby client from the MS Store... 

I changed Video Player > Quality & Performance > Hardware Acceleration from my RTX 4060 LP graphics adapter to via integrated graphics of my i7-12700K CPU (UHD Graphics 770), when setting Quality to 1080p/4mbps it will transcode that and I will get audio even tho the original quality is the same bitrate.  Why I point this out is when using the 4060 to transcode, and setting the target bitrate to the same as the source, transcoding will not be triggered and I'll get no audio, until I stepped-on / lowered quality even more to 720p/4mbps.  (side-note too that the NVIDIA card's video output is super blocky!  I'd read in the past the Intel silicon does a higher quality job at transcoding.  But only observed the difference just now.)

This is almost workable! :D  By that I mean it would be great if it was automatic and one didn't have to look at the source bitrate and find the closest playback bitrate to transcode 'minimally'.  But it's still better than anything I've observed and verbosely described the last few days.

p.s. this behavior above is inconsistent. I've now had a few instances of it working, or not, then working again, then not. 

Edited by them8os235
Posted

Let me clear things up a bit:

The old Emby Theater had an old MPV version built upon our custom ffmpeg, which in turn has an experimental AC4 decoder.  The new Emby for Windows app uses a stock MPV version which doesn't have that. That is because our custom ffmpeg doesn't fit with the latest MPV player versions and the best and latest video playback is a by far higher priority.

Once we have updated our ffmpeg,. we'll be able to ship the latest mpv built on our ffmpeg like before.

The next after the next update for Emby Windows will indicate that it doesn't support AC4, so the server will transcode without that you'll need to fiddle quality or other settings.
It's "next after next" because the version which is still pending publication by the store doesn't have that. But the next one will and it will be pushed shortly after the next release.

Thanks

  • Like 1
  • Thanks 3
them8os235
Posted

Thank You! 

Fiddle is a nice way of saying it. ;) :D 

Posted

Since libmpv and ffmpeg are OpenSource when Emby makes the source code available you could build a working libmpv yourself. 

 

Posted (edited)
25 minutes ago, emveepee said:

Since libmpv and ffmpeg are OpenSource when Emby makes the source code available you could build a working libmpv yourself. 

 

This is stock MPV and stock ffmpeg. No customizations in place. 😜

Edited by softworkz
  • Like 1
Posted
24 minutes ago, softworkz said:

This is stock MPV and stock ffmpeg. No customizations in place. 😜

Right, but you never distributed libmpv with AC-4 patch when it was public to make our lives easier.  Fortunately It isn't that hard to build  libmpv with ffmpeg  patched for AC-4  Calling it AC-4 is wrong though since there is no patch for spatial audio that I have seen.

 

Posted
6 minutes ago, emveepee said:

Right, but you never distributed libmpv with AC-4 patch when it was public to make our lives easier.  

How does make your life easier? You won't get any information about the base version, so you'd have a hard time finding out which code belongs to the patch and which does not. It's much easier to find the patch and apply it.

 

6 minutes ago, emveepee said:

 Calling it AC-4 is wrong though since there is no patch for spatial audio that I have seen.

Why is it wrong? It's incomplete, but it still decodes AC-4 - just not all features.

Posted
On 1/12/2025 at 7:07 PM, softworkz said:

The new Emby for Windows app uses a stock MPV version which doesn't have that. That is because our custom ffmpeg doesn't fit with the latest MPV player versions and the best and latest video playback is a by far higher priority.

@softworkz

Didn't even think about that since I can play AC4 without transcoding.
I take it that the new Emby for Windows will use it like any other audio decoder installed in Windows?

I installed it from the Dolby OEM installer "Dolby_AC4_AC3_Installer.zip" which includes both:
DolbyLaboratories.DolbyAC4DecoderOEM
DolbyLaboratories.DolbyDigitalPlusDecoderOEM

 

Posted
14 hours ago, Carlo said:

@softworkz

Didn't even think about that since I can play AC4 without transcoding.
I take it that the new Emby for Windows will use it like any other audio decoder installed in Windows?

I installed it from the Dolby OEM installer "Dolby_AC4_AC3_Installer.zip" which includes both:
DolbyLaboratories.DolbyAC4DecoderOEM
DolbyLaboratories.DolbyDigitalPlusDecoderOEM

I don't know that installer zip file, but most likely these are MediaFoundation decoders and work with Windows Media Player. I'm not sure whether it also included DirectShow decoders (or wrappers), then it would also work in WMP Classic, and the various MPC-*** players. MPV doesn't use these, neither does VLC.
 

General Rule

No codec installations exist which have an influence on video playback in the Emby app.
Neither through the MS Store, nor any "codec packs", nor any other "codec installers".

 

  • Thanks 1
Posted

Update 

The latest beta of the Emby Windows app (2.211.0) should fix AC-4 playback (by having the server transcode it).
You need to be in the beta group to try it.

If all goes well, it will be in the next update for the Windows app.

  • Like 2
  • Thanks 2
them8os235
Posted (edited)

Yeah! Whoo Hoo. Normally this would be a thing to mention in the Test section but as it's discussed here I'll confirm here.  It's working, from detection to transcoding of just the audio stream part and the output to 2-ch computer audio.  Thank you, thank you, thank you. 

Again, I'm very grateful.  But, it does also make apparent the next thing called for in the Emby UI app is a means of dynamically applying a lip-sync offset right there in the UI while watching to bring the video and audio into alignment.  Hoping that is already on the backlog but if not it can be put on it and worked on in future sprint (if you follow that methodology) and released.  Thank you again!

AC4 Stereo Audio:

Screenshot2025-01-20120827.png.76cfd9b78319774a7d5a158720273796.png

 

AC4 5.1 Audio 

Screenshot2025-01-20121623.png.44dc2703166f380e50e20aa772fba112.png

Edited by them8os235
hide acct name
  • Like 2
  • Thanks 1
Posted

Thanks a lot for comfirming!

 

30 minutes ago, them8os235 said:

a means of dynamically applying a lip-sync offset

You mean like this:

image.png

 

 

But I rather wonder why you would need this at all - where does it happen that A/V is getting out-of-sync? What's your setup?

  • Like 1
them8os235
Posted

@softworkz Yep, I know that's there for setting it.  But some of my playback devices see out of sync a/v, some do not (I'll get to that later).   Ah, I just realized that is on a per playback device basis, so that addresses that point.  But equally some channels are out of sync, while some are not.  So that means audio delay is not always required.

But in regards to moving that into the Emby app UI spact... if I'm watching a video that is ATSC 3.0 vs. one that is not, or not even ATSC but an m3u/IPTV channel, I can't dynamically apply that while watching, at least can't do that using only one device.  And since I don't login to Emby Theater on my TV (run from an Amazon Echo or Apple TV box) as an admin but on those devices use a local user who does not have Admin permissions, that would be impossible to do on/from my TV. 

So, (assuming one is an Admin) if one doesn't want to have a phone or tablet in hand as watching TV one has to leave the video playback and go to that settings page, then go back to video playback.  Yes, watching on one device and using Emby app or HTTP UI app in another window, or 2nd/3rd screen, or different device, is the answer to that; really, a necessity too.  If however there was a tumbler setting option under the Emby app gear icon or its own new icon, that would be so much more convenient. It would also address the situation I definitely see in my home where playback in some cases have a/v out of sync and on other devices in-sync.

Addressing that too that you asked about... I know there are sooooo many variables to this. But here's my current setup. The images above are where I'm using the "just released" newest version Emby Beta app player v2.211.2.0, running on the same recently updated Windows 11 Pro workstation running Emby Server Beta, v4.9.0.35.  Hardware and software when appropriate is the following:

  • Intel i7-12700k CPU in balanced power profile
  • ASRock Z690 Extreme motherboard (minimal OC)
  • 128Gig DDR4, so not running the OS w/a swapfile; loads and loads of RAM free, haven't seen over 40Gigs committed
  • Built-in on-board audio: Realtek ALC1220 7.1 CH HD Audio Codec, Nahimic Audio
  • Using its 2.5Gig LAN to a 2.5Gig managed switch, which connects to a 1/10Gig managed switch that's then connected to another 1Gig unmanaged switch sitting physically next to where my two HDHomeRun devices (and others) are located, one a quad and one a 4k (it's only those ATSC 3.0 channels I'm caring and discussing here atm).  Everything is running wired high speed LAN.  Nothing passes thru a router or WiFi.
  • Gigabyte GeForce RTX 4060 LP 8Gig card and I also have Intel on-board UHD Graphics 770 enabled in the mb bios
  • Windows 11 Pro workstation updated a few days ago.  I have the $0.99 HEVC codec installed (lol) but as you posed a few days back I think that does not factor into things here.

* I tested ATSC 3.0 playback in the latest Emby Beta app with Video Player > Quality & Performance > Quality & Performance Preferences set to Balanced and I tested both with Hardware Acceleration set to "0: NVIDIA GeForce RTX 460" and "1: Intel(R) UHD Graphics 770", but both my monitors are connected only to the 4060 card via HDMI.  A/v was equally out of sync with both.  One thing I have not tested yet is using HW Accel from the integrated Intel UHD 770 silicon and using the MB HDMI out to a third monitor.  I'll carry one I have availble over and connect it up and test that later.

* Now, this a/v playback sync issue I mentioned is ONLY seen using the Emby app on this reasonably fast Windows 11 Pro machine, again, the same device as the Emby Server. When I displaced my wife (lol) from what she was watching on the Apple TV box in the Living room on the 65" to test playback thru Emby App on our Echo TV, the exact same channels and programs just tested has mostly in-sync a/v playback; a few words of a sentence visually goes out of sync with the audio momentarily but then soon syncs back up.  This is an example of playing the same thing (channel and program) on the Echo TV box, which has fairly well sync'ed a/v.  Below showing that in this case too only the audio was being transcoded:

Screenshot2025-01-20132651.png.a386a371cb0155d472d5f0de95d47291.png

In case that is wrong I didn't go to the logs to determine that it too shows that only the audio is being transcoded and not the video.  If you can't recreate and need me to check that I can do later, after taking care of other things I need to do.  If you can give me a substring I should search for in the large logfile that would help. Let me know if you need that too, or anything else I didn't think to itemize or mention.  Thank you for your curiosity and interest.  I really appreciate this avenue of feedback & communications you folks provide us!

 

Posted

Thanks for the detailed information - it included everything but the most relevant part: What's the audio path? Through HDMI to the TV or via onboard Realtek to something?

them8os235
Posted
1 hour ago, softworkz said:

Thanks for the detailed information - it included everything but the most relevant part: What's the audio path? Through HDMI to the TV or via onboard Realtek to something?

Ugh, it occurred to me I needed to include that, then it completely slipped my mind.  Sorry. 😕

Yes, audio out is from the Sound card (I tested HDMI audio out too, see below).  "Default System Audio Device", which in the OS is 'Speaker out' so the same as if I selected "Speakers (Realtek(R) Audio)" in the Emby app. 

Then the stereo out from the MB sound card is connected via wire to a Google Home Max speaker via its analog speaker-in connector, not Bluetooth, so there should be no delay. 

HDMI carries video only (minus the test immediately below) to two monitors that don't have speakers. I don't use Audio Pass-thru.

However I mentioned in the previous post I do have an HDMI connection to the integrated graphics out from the MB.  Just tried it, with the Emby app setting configured to use the "Intel UHD 770" integrated graphics instead of the 4060; with both audio over HDMI or Speaker-out from the MB.  Enough words already, I'll save you all the permutations of Video Player options in all the panels tried and jump right to the end...  I was able to make progress. Now, I see sync'ed a/v with 2-ch AC4 stream, but 5.1 is still always out of sync.  Tho my eyes & ears seem to think integrated graphics is better synced than when Emby app Video Player is configure to use my 4060 card.  Whether HDMI carries audio to the TV or I use the MB Realtek speakers out doesn't make a difference.  

Noticed something else I forgot to mention.  The Video Player > Video Options > Advanced > display sync was set to 'Audio'.  Would say I can try the other two, but just did and everything is 'unwatchabley' jumpy.  I know I don't have a bleeding edge i9-14900KS based machine w/a 4070Ti or higher grphx card, but noted above it is not too shabby and pretty well powered, and way above average of all Passmark benchmarks made in the world (heck of a lot more powerful than an Amazon Echo Box, lol) so don't know why playback using those settings are so unwatchable.  

At this point the AC4 audio sync is only an issue when the source is 5.1 (tho that's a majority of my HEVC recordings ).  I'm happy to try more things.

Posted

Please try settings like this:

image.png

 

and this:

image.png

 

It's possible that you don't see the first setting but this instead:

image.png

 

Then, in the Emby enable "Exclusive Audio Mode".

"Audio" is normally the right thing for display syncing. The video options shouldn't have any influence.

 

 

 

  • Thanks 1
them8os235
Posted
On 1/20/2025 at 8:21 PM, softworkz said:

Please try settings like this:

...

Then, in the Emby enable "Exclusive Audio Mode".

"Audio" is normally the right thing for display syncing. The video options shouldn't have any influence.

 

 

I followed all the suggestions.  But they did not correct AC4 5.1 a/v out-of-sync issue.

But, there must be other factors at play.  Here is what I just observed for ATSC 3.0 HEVC channels & AC4 audio:

  • Channels broadcasting in AC4 2.0 / stereo audio/video are in-sync.
  • Some channels broadcasting in AC4 5.1 audio/video are ALSO in sync, specifically CW / WPIX-HD channel 111.1 in NYC.  'Stats for nerds' says it's 5.1 audio, but can those actually be 2.0 streams masquerading as 5.1?  Because...
  • Other channels broadcasting in AC4 5.1 audio/video are not in sync, specifically WABC-HD channel 107.1 in NYC.
  • HOWEVER why I say the above is... I can be watching something that has out-of-sync a/v, then a commercial break comes and the a/v is completely in-sync (is that commercial actually stereo audio?).  Then the next commercial(s) may be in-sync or out-of-sync, it goes back and forth.  The program returns from commercial break and its fully out-of-sync again.

I took screenshots of the "stats for nerds" to illustrate any difference in the signal from WPIX-HD vs WABC-HD.  However other than a 1mpbs difference in the bitrate all other stats are identical.  So saving the vertical space of this thread.  But if you want I'll follow-up with them. 

If you know of anything I can use to capture meaningful stats of the streams that may indicate the reasons for the selective a/v sync'ing issue let me know and I'll get that to you.

  • Thanks 1
Posted

If it doesn't happen when playing recorded TV, then we can only look into this deeper when starting the TVnext beta as we will have closer stream control and anaylsis abilities - plus different playback - than right now.

  • Like 1
them8os235
Posted
4 hours ago, softworkz said:

If it doesn't happen when playing recorded TV, then we can only look into this deeper when starting the TVnext beta as we will have closer stream control and anaylsis abilities - plus different playback - than right now.

It absolutely does.  When the HEVC audio/video is out-of-sync while I watch live any recording of the program behaves the same way.  I can upload them. Let me know how by PM.

Posted
3 minutes ago, them8os235 said:

It absolutely does.  When the HEVC audio/video is out-of-sync while I watch live any recording of the program behaves the same way.  I can upload them. Let me know how by PM.

I'll send you a link for our upload portal.

Posted

@them8os235- Thanks a lot for the test files.

I can say that it has nothing to do with the playback side and setup. It's in the files already.

Can you create a raw recording from the same channel ("Murdoch's...") by going to the web ui of the HDHR directly?

  • Just open in a browser: http://<ip-address-of-hdhr>
  • There you can see all the channels - click on the one in question and the download should start.
  • Let it run for like 15 min.
  • Now it gets a bit tricky because the stream would never end and when you cancel the download in the browser, it will delete it
    • So - go to your downloads folder 
    • There you should see the partial download (in case of Chrome, it has an extension of .crdownload)
    • Select the file and do CTRL-C then CTRL-V to create a copy
  • Cancel the download in the browser
  • Upload the copied file to our portal

Thanks

them8os235
Posted (edited)
On 1/25/2025 at 6:27 AM, softworkz said:

@them8os235- Thanks a lot for the test files.

I can say that it has nothing to do with the playback side and setup. It's in the files already.

Can you create a raw recording from the same channel ("Murdoch's...") by going to the web ui of the HDHR directly?

  • ...snip...
  • Upload the copied file to our portal

I deeply appreciate the attentiveness.  I knew the clock was ticking.  But there were things I had to do and didn't get to upload in time...  I can upload if the token can be reenabled.  But, do you still want them?

Meaning wondering if still needed after the advancements I've seen in Emby app -- both Beta and Release that I see now plays AC4 audio too -- and I'm guessing enhancements put into the Emby Server Beta to handle it too --  I'm running the latest at the time I write this, 4.9.0.37.  As when watching live or recordings of the worse offending channel -- WABC-HD, 107.1 in NYC -- a/v is in-sync.  Yes, the delay is embedded in the video if one watches recordings in VLC.  But what Emby Server streams to the app when only transcoding the audio, the a/v can be in-sync, w/a caveat (below).

I spent a few hours over the weekend recording snippets of 4 different programs via 3 different means: by Emby, by HDHomeRun app, by the means you directed thru Chrome browser for HTTP download.  And when watching them thru Emby the a/v is now in-sync with the caveat I MUST maximize the Emby app. When watching in a movable window a/v is still out of sync.  But that, I can deal with! :)

So please advise if you think your team is good on this side.  But it you want the recordings I made via the three different mechanisms, I have them and will upload them after you IM me a new link to re-enable the previous one.

Thanx again.

 

Edited by them8os235
  • Like 1
Posted
8 hours ago, them8os235 said:

And when watching them thru Emby the a/v is now in-sync with the caveat I MUST maximize the Emby app. When watching in a movable window a/v is still out of sync.  But that, I can deal with! 

All three recordings are playing in sync?

With the new Windows app in full-screen or non-fuillscreen?

And if the recording made via Emby plays in sync - what has changed that it's working now?

them8os235
Posted (edited)
On 1/30/2025 at 8:28 PM, softworkz said:

All three recordings are playing in sync?

With the new Windows app in full-screen or non-fuillscreen?

And if the recording made via Emby plays in sync - what has changed that it's working now?

I'm glad I waited to reply.  Because I have more answers now.

I'll jump right to "what has changed that it's working now?". Also referencing your earlier post of "No codec installations exist which have an influence on video playback in the Emby app. Neither through the MS Store, nor any "codec packs", nor any other "codec installers"".

It is working because of the Microsoft Store 's $0.99 "HEVC Video Extensions". 

TL;DR

I thought it was working because your team updated and released changes to the Emby server and both the Beta and Release version of Emby app with complimentary HEVC handling code. But ... I just fired up a Windows 10 laptop I had not used in maybe a year.  And confirmed channels that broadcast in HEVC w/AC4 5.1 had no audio in Emby app (WABC channel 107.1, WPIX channel 111.1).  So that negates the prior belief. 

Please take note of this sequence of tests...

  1. On my main Windows 11 workstation I have been talking about this whole time (which happens to also be my Emby server) I installed that $0.99 HEVC codec pack long ago.  But nothing changed regarding AC4 audio, in either VLC, Windows Media Player or the prod version Emby app.
  2. I didn't make the connection right away (as they weren't close in time) but it was only after a reboot of the machine (which I do very infrequently) that I started seeing audio in non-Beta/Release Emby app in addition to the Beta version.  With the added twist I needed to maximize Emby app for the audio & video to be in-sync with no delay. 
  3. Now, on the aforementioned old Windows 10 laptop I hadn't used in a long time, I installed Emby app Release / non-Beta version.  I tuned to WABC channel 107.1 & WPIX channel 111.1 again.  I had no audio.
  4. I rebooted that laptop.  Fired up Emby app. Retested the HEVC AC4 5.1 channels.  Still no audio.
  5. I went to the Microsoft Store.  There the "HEVC Video Extensions" app showed as a cloud icon with a arrow pointing down to download it, as I'd bought it but not installed on this machine.  So I download and installed it.
  6. Reopened Emby app.  Retested the HEVC AC4 5.1 channels I'd mentioned before. Still no audio.
  7. I rebooted that laptop. Reopened Emby app.  Retested the HEVC AC4 5.1 channels.  Now I have audio!  I mean, that seems pretty irrefutable!  :)  
  8. And what I observed regarding a/v sync is still the case.  Windowed, recently recorded TV Series with true AC4 5.1 is out of sync, AC4 2.0 is in-sync, and old programs and movies (one to three decades old) and a lot of commercials that the channel says is broadcast in AC4 5.1 I believe is actually AC4 2.0 and is in-sync.  Maximize Emby and everything is in-sync. ;)

Also to get back to a/v sync'ing of the test recordings... All those recordings I made via the three different means have audio/video badly out of sync when I watch them in Windows 11's built-in Windows Media Player; again reason I get any audio is because I paid the $0.99 for the Windows HEVC Video Extensions app and rebooted, but even after reboot still no audio when I play them in VLC. And when I play them in Emby app from the Emby Server Library maximized they are in-sync ... So the Emby Server's transcoding of just the audio stream is definitely mixing in some of its special sauce to sync up the audio & video when played in Emby app.

 

Edited by them8os235
  • Confused 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...