Jump to content

Emby AppleTV + HomePod Mini = Play/Pause Delay


Recommended Posts

Posted

I bought a HomePod Mini today and have been delighted. I noticed however that in Emby (and only within Emby), when I press:

  • Pause: The video freezes but the audio carries on for about 1.5-2 seconds
  • Play: There is another delay of 1.5-2 seconds before everything starts again

This was never the case without the HomePod (just using my TV Speakers). I am also wondering why YouTube, YouTube Kids, Netflix, Prime Video etc all work fine. What is specific to Emby that results in horrendous lag?

And if this is just how it is, how are other HomePod owners just accepting it? It is very badly impacting continuity when pausing a show/movie. I have also noticed the same effect on audio files. I even tried the MPV player and there was no change.

Specs:

  • AppleTV 4K (3rd Gen) 17.x
  • Emby (latest version of Server and Client)
  • HomePod Mini on 17.x

Has anyone else experienced this? Or does anyone else use a HomePod and not experience this at all?

Posted
19 hours ago, Luke said:

 

Hi there, let's look at an example. Please attach the information requested in how to report a media playback issue. Thanks!

 

Hi Luke, thank you for your reply.

I am happy to report that I fully resolved this issue by forcing the Apple TV Emby App to use the Native Player in settings.

Keep up the good work!

Posted

HI, ideally that shouldn't be the fix, but if you're happy then we're happy. Thanks for the update.

Posted
Just now, Luke said:

HI, ideally that shouldn't be the fix, but if you're happy then we're happy. Thanks for the update.

Will it have any implications going forward? Is the native player otherwise inferior to the MPV player? Anything I might be missing out on?

Posted

You might see a little more server transcoding when forcing playback to the native player. That's the main drawback.

Posted
1 minute ago, Luke said:

You might see a little more server transcoding when forcing playback to the native player. That's the main drawback.

Interesting, so would my initial issue be a bug you'd investigate?

Posted
On 11/13/2023 at 6:55 PM, TariqK said:

Interesting, so would my initial issue be a bug you'd investigate?

Hi, yes, can we please look at an example like I requested before? Thanks !

Posted

Hey Luke,

when using the native player for better HomePod compatibility I’ve run into some issues with audio drift.

When I would use plex I could overcome this by setting the audio to OPUS and plex would transcode to AAC with no audio drift. Any other audio codec (including aac) would give me audio drift.

Emby transcodes to MP3 which still suffers the audio drift. Is there any files I can edit to change this to default to AAC?

No idea why this happens with Live TV for me with the native player (affects Emby and plex). Same video has no audio drift with VLC when set with any audio codec🤷🏽‍♂️

 

  • 2 weeks later...
Posted
On 11/21/2023 at 4:43 AM, jordan.bestry said:

Hey Luke,

when using the native player for better HomePod compatibility I’ve run into some issues with audio drift.

When I would use plex I could overcome this by setting the audio to OPUS and plex would transcode to AAC with no audio drift. Any other audio codec (including aac) would give me audio drift.

Emby transcodes to MP3 which still suffers the audio drift. Is there any files I can edit to change this to default to AAC?

No idea why this happens with Live TV for me with the native player (affects Emby and plex). Same video has no audio drift with VLC when set with any audio codec🤷🏽‍♂️

 

HI, that drift is only when using homepod, right?

Posted
19 hours ago, Luke said:

HI, that drift is only when using homepod, right?

I don’t believe so, but will confirm later.

I actually figured out how to get it to transcode opus to AAC and unfortunately it didn’t fix the issue. (Same source with mpv and no HomePods has no audio drift)
 

Embys version of MPV seems better than plex’s for my 4k50 live tv source (plex would terminate the channel after some viewing)

So I have been using MPV successfully, although there is a slight audio/video offset on any mpegts channel or recording only when using HomePods.

 

Happy to run any tests or send a sample recording in if you like.

  • 4 weeks later...
Posted
Quote

I actually figured out how to get it to transcode opus to AAC

Hi, how did you do this?

  • 2 months later...
tree2369
Posted

Sorry @Lukeonly just saw this.

From memory I removed the mp3 audio driver haha and then Emby chose AAC instead I assume. 

  • Thanks 1
  • 3 months later...
tree2369
Posted

@Lukei think the audio drift on native player was due to my IP encoder.

Running the stream through ffmpeg with aresample=async=1 seems to have fixed the audio drift. Mpv must auto correct this audio drift?

  • Thanks 1
Posted
6 hours ago, tree2369 said:

@Lukei think the audio drift on native player was due to my IP encoder.

Running the stream through ffmpeg with aresample=async=1 seems to have fixed the audio drift. Mpv must auto correct this audio drift?

It’s possible it may be configured to sync audio and video.

tree2369
Posted
17 hours ago, Luke said:

It’s possible it may be configured to sync audio and video.

It would seem so.

Using a better encoder now and getting perfect sync with the native player (my preferred player).

  • Thanks 1
  • 3 weeks later...
zaHrecsohbiw
Posted (edited)

@TariqK@tree2369Finally, someone to commiserate with! I've been pulling my hair out for years with audio issues, because I also use HomePods as the default audio output on all of my Apple TVs. Emby has given me the best performance of any home media streaming app, but I still have lots of trouble. 

This isn't my area of expertise, but assuming there are no other constraints, I would love to have a way to force AAC transcoding at all times (except for DDP, I would imagine), and use the native player exclusively.

Is that off-base? Are there other issues to take into consideration? 

Edited by zaHrecsohbiw
zaHrecsohbiw
Posted

Ah yes, I guess the problem that I have with the native player is just how often remote media files fail to actually load and play (in my case, at least). I just set one of my Apple TV's back to Native Player as preferred, and the 2nd media file that I opened failed to play. 

zaHrecsohbiw
Posted

I think this is still on-topic (apologies if not), but tying my two posts together, it would seem beneficial to have the ability to force transcoding, even in cases where a file meets the criteria for using the native player. This is a file that both my Apple TV (via Emby) as well as QuickTime Player on my Mac struggle mightily to play. In both cases, they have failed to play it at all, played it with stutters, played it with no audio, etc. If I load the same file with IINA, it plays just fine (using videotoolbox no less, and libmpv), and it seems to play just fine when I set the preferred player in the Emby Apple TV app to MPV. 

I'm pre-apologizing in case the uploaded images appear very large in my post.

image.png.28f901ab0042dcc1e3592c0877ac2a6f.png

image.png.0f9ace889f683dade4f1a92fc5e8bcdb.png

Posted
On 7/4/2024 at 5:44 PM, zaHrecsohbiw said:

I think this is still on-topic (apologies if not), but tying my two posts together, it would seem beneficial to have the ability to force transcoding, even in cases where a file meets the criteria for using the native player. This is a file that both my Apple TV (via Emby) as well as QuickTime Player on my Mac struggle mightily to play. In both cases, they have failed to play it at all, played it with stutters, played it with no audio, etc. If I load the same file with IINA, it plays just fine (using videotoolbox no less, and libmpv), and it seems to play just fine when I set the preferred player in the Emby Apple TV app to MPV. 

I'm pre-apologizing in case the uploaded images appear very large in my post.

image.png.28f901ab0042dcc1e3592c0877ac2a6f.png

image.png.0f9ace889f683dade4f1a92fc5e8bcdb.png

HI, when it outright fails, what exactly happens? That should trigger a failure and the app will automatically switch to server transcoding. Let's start with that and see if we can get that one worked out.

tree2369
Posted
On 05/07/2024 at 05:09, zaHrecsohbiw said:

@TariqK@tree2369Finally, someone to commiserate with! I've been pulling my hair out for years with audio issues, because I also use HomePods as the default audio output on all of my Apple TVs. Emby has given me the best performance of any home media streaming app, but I still have lots of trouble. 

This isn't my area of expertise, but assuming there are no other constraints, I would love to have a way to force AAC transcoding at all times (except for DDP, I would imagine), and use the native player exclusively.

Is that off-base? Are there other issues to take into consideration? 

My method is - as my server is on a M2 Mac:

Download the program “Subler” and convert all mkv’s to mp4 (subtitles are kept via mov_text).

You can do this one by one and customise the video, audio and subtitle tracks. Or you can bulk drag and drop into the queue and let the program do its thing.

 

Havent had any issues playing those mp4s 99.9% of the time.

 

note that this program only remuxs mkv to an ‘Apple compatible mp4’… so any other file formats you’ll need to use something else.

 

The only other work around with HomePods would be to make use something like a HDfury arcana (I think that’s the model) which allows you to extract the earc and send it to the TV - then you can set your Apple TV to connect to the TVs ‘Audio system’.

 

  • Thanks 1
zaHrecsohbiw
Posted
On 7/5/2024 at 9:52 PM, Luke said:

HI, when it outright fails, what exactly happens? That should trigger a failure and the app will automatically switch to server transcoding. Let's start with that and see if we can get that one worked out.

I'm sorry @Lukefor not responding earlier. Been busy with the July 4th weekend. I'll try to give you a full response this evening or tomorrow morning. 

Posted
4 minutes ago, zaHrecsohbiw said:

I'm sorry @Lukefor not responding earlier. Been busy with the July 4th weekend. I'll try to give you a full response this evening or tomorrow morning. 

HI, that would be great. Thanks.

zaHrecsohbiw
Posted

@Lukeso I tried to play the same media file that I mentioned in the previous post. It seems that the server is _attempting_ to transcode the file, but parameters that are fed to ffmpeg are causing it to fail.

I've included the ffmpeg log for you to inspect.

04:40:32.985 Could not write header for output file #0 (incorrect codec parameters ?): No such file or directory
04:40:32.985 Error initializing output stream 0:0 -- 
04:40:32.986 [libmp3lame @ 0x1ccf080] 3 frames left in the queue on closing
04:40:32.988 Conversion failed!
04:40:32.988 EXIT

emby-debug.txt

zaHrecsohbiw
Posted

Interestingly, if I exec into the docker container and run the ffmpeg command manually, it works?

ffmpeg-debug.txt

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...