Jump to content

Audio lag when playing with MPV video player


Magoespa

Recommended Posts

Hello, I'm writing because I have an issue when trying to play any type of video on my Apple TV with the MPV player. The main problem is that the audio has a very subtle delay, noticeable when watching the actor's lip sync. This issue doesn't occur with the native player, but I wouldn't like to use it because it doesn't support several formats supported by the MPV player.

When I'm playing the same movie with Plex everything works fine and no audio lag is detected. I've also tried the same movie with a chromecast and works with no lags too.

I have also attached logs where you can compare when I'm playing with apple tv native player and with MPV.

CleanShot2023-11-27at18_34.09@2x.png.a1198f19e00a591d0662650dc2f2e3e6.png

 

embyserver (1).txt

  • Agree 1
Link to comment
Share on other sites

Hello, new user of Apple TV 4K, IOS17, I encounter the same problem when playing MKV (h.264 and h.265)

the MPV player generates an audio delay. there is no option to adjust the offset in emby?

if it helps, the iptv applications (oqee (free for french user); canal +) are perfectly synchronized.

Using infuse, I also have the lag but the application allows you to adjust the audio lag (I have to put +200ms which is a lot)

  • Agree 1
Link to comment
Share on other sites

On 12/5/2023 at 3:39 AM, Luke said:

Hi, can you please try Emby for Apple TV 1.8.0 and let us know how that compares? Thanks.

unfortunately this doesn't solve anything for me.

All files read by emby and its player have an audio/video delay which really makes the application unusable

it is not possible to add a parameter to adjust the delay as is done in other applications?

Link to comment
Share on other sites

Hi.
Same problem over here.

I'm using an Emby Server 4.7.14.0 on a debian 11 linux Server with Emby for Apple TV 1.8.0 (5).
Details see in the log.
Sorry for the big log. Debug logging is on.
At "2023-12-09 18:16:51.405 Info SessionManager: Playback start reported by app Emby for Apple TV 1.8.0 (5) playing Sky Sport Bundesliga 1 HD. Started at 0 ms" I started the stream.
I use the vupus livetv plugin.

My FireTVs have no pronlem and everything works fine.
Only on my AppleTV 4K using the Emby App with MPV the problem ocours.

If I use the emby app with native the sound is synced but the stream will be transcoded and the tv picture gets significantly worse.

I hope that helps a bit.

embyserver.txt

Link to comment
Share on other sites

On 12/5/2023 at 3:39 AM, Luke said:

Hi, can you please try Emby for Apple TV 1.8.0 and let us know how that compares? Thanks.

Tested on 1.8.0 (5) with my apple tv 4k and the problem still persist 

Edited by Magoespa
Link to comment
Share on other sites

  • 2 weeks later...

Hi.
I've tried to disable "An Bildrate anpassen"  in the appletv settings.
The video and audio is synced now.
If I enable "An Bildrate anpassen" again it is unsynced again.

But of course I want to enable it again in the future. 😉

Maybe that helps.

  • Like 2
Link to comment
Share on other sites

23 hours ago, whytea said:

Hi.
I've tried to disable "An Bildrate anpassen"  in the appletv settings.
The video and audio is synced now.
If I enable "An Bildrate anpassen" again it is unsynced again.

But of course I want to enable it again in the future. 😉

Maybe that helps.

I will test this this evening or tomorrow morning.

but it is not ideal to deactivate this option because the image frequency will no longer be adapted depending on the source and therefore risks having problems with the fluidity of the image (lag, etc.)

  • Thanks 1
Link to comment
Share on other sites

@Luke

So I actually removed the option to automatically adapt the frame rate to the source in the appletv settings

in fact without this option there is no longer any sound/video delay

but it's a shame because this option is very useful for juggling between European TV apps, streaming and films on emby because there are frequency differences between the sources and without this option we have problems on certain frequencies

so the lag problem seems to come from the processing of the frequency by the appletv (the sound is always ahead of the image). But why no delay in netflix and other streaming app !

@Luke is it not possible to add an  option in emby player to adjust the delay? (like infuse?)

  • Like 1
  • Agree 1
  • Thanks 1
Link to comment
Share on other sites

  • 2 weeks later...
jpc0480

Just wanted to see if there has been any progress on this? I have issues with audio out of sync as well with the Emby app on Apple TV 4K.

Link to comment
Share on other sites

On 1/8/2024 at 10:46 AM, jpc0480 said:

Just wanted to see if there has been any progress on this? I have issues with audio out of sync as well with the Emby app on Apple TV 4K.

Hi, we are looking into this. Thanks.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

  • 3 weeks later...

Commenting here for easier tracking. I'm also having the same issue with MPV. Using the native player works but then none of my 4K movies play.

  • Agree 1
  • Thanks 2
Link to comment
Share on other sites

  • 4 months later...
J0ffr37
On 04/02/2024 at 03:01, Skopin said:

Commenter ici pour un suivi plus facile. J'ai également le même problème avec MPV. L'utilisation du lecteur natif fonctionne, mais aucun de mes films 4K n'est lu.

Honestly, the lag problem seems to come from Apple TV which systematically shifts the sound when automatic frequency adaptation is activated.

I finally switched to infuse and connected it to the emby database, I found the current readings, folder, etc..

infuse allows you to manage synchronization by modifying the lag and recovering good synchronization.

In any case, on Apple TV, to play trueHD, you will have to go through infuse so you might as well manage everything like that

Link to comment
Share on other sites

  • 2 months later...
brezlord

The issue still persists. The only way to make it watchable is select the native player. The problem this is everything is transcoded.

Link to comment
Share on other sites

brezlord

I don't believe waving the white flag and using infuse is the answer. You lose functionality lite live TV through infuse. There must be a solution to this problem. In the short term adding the option to adjust the delay so that you can fix the sync issue would be a good idea and this does not seem like a difficult thing to implement.

Link to comment
Share on other sites

zaHrecsohbiw

 

21 minutes ago, brezlord said:

I don't believe waving the white flag and using infuse is the answer. You lose functionality lite live TV through infuse. There must be a solution to this problem. In the short term adding the option to adjust the delay so that you can fix the sync issue would be a good idea and this does not seem like a difficult thing to implement.

For Apple TV, every media player that I have personal experience with that uses the MPV library seems to have this problem. It's especially frustrating if you use HomePods as default audio output. I'm actually perfectly fine relying on transcoding so that I can always use the native player, but that hasn't been especially reliable for me on the server side. 

I agree though that rather than give up and use infuse, we should do what we can to help define the problem(s) in order to diagnose the issues.

I take it from your post that transcoding isn't an ideal solution in your case? 

Link to comment
Share on other sites

brezlord

Transcoding works fine as I have a Nvidia Quadro P600 attached to the VM running emby. The issue is that you lose quality from a full bluray rip essentially on 4K rips.

I have been using Plex since its inception and have been keeping any eye on Emby for years. I have started using Emby as my dayily driver for video but use Plex for audio. The Plex amp is unbeatable and I hope one day Emby will get a dedicated music app that work as good as plex-amp.

The Plex appleTV app has similar sync issues so I would agree that MPV is a pain in the ass. I'm not sure what player infuse is using.

Exposing an option to manually sync audio with video seems like the easy option that has the most benefit with the least development effort.

image.png.eb08803b2707d72892ffc6253941ebde.png

Edited by brezlord
Link to comment
Share on other sites

zaHrecsohbiw
38 minutes ago, brezlord said:

Transcoding works fine as I have a Nvidia Quadro P600 attached to the VM running emby. The issue is that you lose quality from a full bluray rip essentially on 4K rips.

I have been using Plex since its inception and have been keeping any eye on Emby for years. I have started using Emby as my dayily driver for video but use Plex for audio. The Plex amp is unbeatable and I hope one day Emby will get a dedicated music app that work as good as plex-amp.

The Plex appleTV app has similar sync issues so I would agree that MPV is a pain in the ass. I'm not sure what player infuse is using.

Exposing an option to manually sync audio with video seems like the easy option that has the most benefit with the least development effort.

image.png.eb08803b2707d72892ffc6253941ebde.png

It's funny that you bring this example up. I just mentioned in another thread earlier today that I don't understand the need for transcoding from HEVC to AVC, considering that HEVC is natively supported by Apple TV. 

Do you happen to know a technical justification for this?

Link to comment
Share on other sites

48 minutes ago, zaHrecsohbiw said:

It's funny that you bring this example up. I just mentioned in another thread earlier today that I don't understand the need for transcoding from HEVC to AVC, considering that HEVC is natively supported by Apple TV. 

Do you happen to know a technical justification for this?

Hi, did you explore the stats feature in the video player to learn why it was transcoding?

Link to comment
Share on other sites

zaHrecsohbiw
1 minute ago, Luke said:

Hi, did you explore the stats feature in the video player to learn why it was transcoding?

I will do that right now!

Link to comment
Share on other sites

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