Jump to content

Recommended Posts

Posted

We're going in circles. I don't use Windows for my media, what's the point in trying it?

 

I don't even have Premiere, right now I'm trying to decide if I get it.

Posted

Let me expand a bit on this subject (to all readers, not a direct response to Gryzor):

In a media file, there are typically one or more (logical) "streams", each one consisting of a series of "packets" which are interwoven (time-multiplexed) in the byte sequence of the file (or compound stream).

Typically, every single packet includes a timestamp (I'm simplifying to avoid explaining dts and pts) which indicates exactly at which time an audio frame needs to be played and a video frame needs to be shown. When a (video player) application wants to display a video frame, it writes/copies that frame's data into video memory (yet invisible) and has precise control over the exact time at which it makes that visible (usually by "swapping" with the currently shown frame).  

For audio playback it's a little different, because there aren't any discrete units which are being swapped out, but it's rather a continuous stream. There are latencies involved between the time when an application feeds audio data to the audio hardware and the point in time when it's being played on the audio output/speakers. Yet, with contemporary audio drivers and media APIs, those latencies are well known so that it's easy for an application to make sure that audio and video are perfectly synchronized according to the presentation timestamps in the media being played.

This also applies to blutooth audio devices. While these are often shutting down the wireless audio transmission to save energy and it takes a second until you hear any audio playing, this doesn't delay the audio (i.e. from a 2s audio sequence, you may hear only the second half), so what you hear is still always in-sync, because the latency of the full chain down to the speakers is reported back to the application (this is all simplified, audio devices can also serve as a sync source, etc. but that leads to far for this post).

In turn, I have never seen a Blutooth audio device on Windows where the audio was out-of-sync with the video when playing with players using Windows Media APIs (neither with other players). 

Now, when I hear users that are saying they need a setting for audio delay compensation in our Windows app, then I find this kind of alarming, because it might be an indication that there's something wrong with the way how we (actually MPV player) is doing the playback. It's something that should work right away and not require users to do manual adjustments for each file that they are playing. TBH - I would never use such a player. 

That's why I'm interested in finding out what's happening here. I know that there are very specific cases where the player is not fully in charge of the playback paths (e.g. video going through an AV receiver but not the audio, etc.) - but these are rare and we have a "static" setting to control that (even though this has severe drawbacks btw). I also don't understand why there's a different setting for 24fps videos (the settings we're taken from the old Emby Theater App), that's why I'm interested in the actual use cases and what they are really about.

Thanks for any input

Posted

Thanks - great information. I am no tech expert but there are two situations where there is a lag, not from Emby to the player setup but within the player setup and/or from there to the user 

1. Bluetooth. Latency is widely known and discussed. Newer Bluetooth systems are better, but still...

2. When using a TV/screen for video playback but a different audio playback system connected by wires of some sort.

But whatever the setup or reasons, the precise specifics don't really matter. Feel free to correct my ignorance, and maybe some experts here will enjoy an in-depth conversation about the nuances. But as I noted in the earlier thread, every modern TV has an audio delay/"lip synch" feature. I and other users would like this functionality built in to Emby, too, for when we aren't streaming to our TVs or even when we are, but it would be more intuitive or easier to set it from within Emby's settings than from the playback devices'. 

  • Agree 1
Posted
14 minutes ago, wordlover said:

1. Bluetooth. Latency is widely known and discussed. Newer Bluetooth systems are better, but still...

I wonder why I'm not seeing this, but maybe my Bluetooth devices are "too new"?

The important question though is: Have you ever seen such latency issues when using Windows Media Player?

16 minutes ago, wordlover said:

2. When using a TV/screen for video playback but a different audio playback system connected by wires of some sort.

Which kind of scenarios are those? How is the TV connected and how is the audio path? And where does the latency come from?

If you connect a TV or display via HDMI to a GPU or onboard graphics on a PC, there's no latency (unless you enable some of those weird "enhancements" on some TVs).
You could not play games otherwise..

Posted (edited)

Re: Bluetooth: https://duckduckgo.com/?q=bluetooth+latency

Re: other playback, relevant scenario is streaming video from Emby server on a Windows PC to a new Samsung TV (using Chromecast HD dongle running Emby OR the Emby app running on the smart TV) and separate attached Yamaha sound bar, which is connected to the TV either via HDMI or optical cable. (I have no idea how to get WMP into that mix.) And whatever the reason for the lag (even imperfectly timed video source file), the request remains: could Emby devs just add the ability to adjust audio delay? Pretty please?

Edited by wordlover
  • Agree 1
Posted

Tbh, it doesn’t really matter where the lag comes from (whether it's the TV, soundbar, the file itself, and so on). This feature already exists in VLC, MPC, and Kodi. A simple +/- offset that can be added through the OSD should be feasible and would likely be a feature many people would appreciate, making a lot of sense to implement. IMHO.

  • Agree 2
Posted
29 minutes ago, wordlover said:

That wasn't my question, but mabye someone else can share some experience regarding it: "Have you ever seen such latency issues when using Windows Media Player?"

32 minutes ago, wordlover said:

streaming video from Emby server on a Windows PC to a new Samsung TV (using Chromecast HD dongle running Emby OR the Emby app running on the smart TV) and separate attached Yamaha sound bar, which is connected to the TV either via HDMI or optical cable.

Wouldn't you be able to use the TV's audio delay adjustment in this case?

 

33 minutes ago, wordlover said:

the request remains: could Emby devs just add the ability to adjust audio delay? Pretty please?

My current mission is the new Windows app which is in beta since last week and there are multiple layers of considerarion with regards to audio/video latency:

  1. Out-of-the-box functionality
    • Does it play videos with audio in-sync in the best possible way (without any adjustments made)?
    • "best possible way" means the way how Windows Media Player (and other players) are able to do it
    • Means to find out whether there are cases where we don't do it as good as other do it
  2. Static Adjustment Feature
    • This is meant to compensate delays due to audio/video hardware paths which cannot be controlled/known by the player
    • Find out whether it works sufficiently well and in a consistent way
    • Find out whether a separate delay setting for 24fps videos is really needed and why
  3. Dynamic Adjustment of Audio Delay During Playback
    • Find out whether it can even be done with MPV player

1 and 2 are essential and current focus
3 is a nice-to-have and subject to prioritization/decision making in the future (your feature request)

So all my questions here are about 1 and 2 - hope this clarifies things a bit.

  • Like 1
  • Thanks 1
Posted
On 9/17/2024 at 3:49 PM, softworkz said:

I wonder why I'm not seeing this, but maybe my Bluetooth devices are "too new"?

The important question though is: Have you ever seen such latency issues when using Windows Media Player?

I have a JBL flip 4 via Bluetooth, and yes, testing with the Windows player I have a 200ms delay, as I do with VLC and all players I've tried with.

Alternatively testing with my HyperX gaming headset via USB RF dongle, there is no delay.

 

Posted

I'm checking if there is a software update...

Posted
3 minutes ago, generiq said:

I'm checking if there is a software update...

No luck... so I have to compensate...

Posted

To also join on this topic:

I always streaming my files via emby web player . (on Edge) from my server.   (I am also an Emby Premiere user)

The sync is perfect when playing the sound from my laptop speakers.

But as soon as I put on my bluetooth headset I get that audio and video are out of sync. 
That would be for me a perfect reason to have an option to be able to delay (or advance?) the audio by milliseconds.

So like many said, most players have this option to adjust the audio delay per X milliseconds.; kodi, plex, vlc, nova video player (on android)

 

Thank you

 

 

  • Agree 1
Posted

so maybe implement something similar as the subtitle offset:

image.png.b55c87d2227a9af0e2d4bfcf12812d6f.png

  • Agree 2
Posted
1 minute ago, generiq said:

Won't help my sh***y speaker 😁

It's not about quality, but whether you get the same 200ms delay in this mode?

Posted
2 minutes ago, softworkz said:

It's not about quality, but whether you get the same 200ms delay in this mode?

That's what I meant - no change. The fault lies with the speaker.

Posted
5 minutes ago, generiq said:

That's what I meant - no change. The fault lies with the speaker.

Yea well, for your speaker I can at least understand why they don't care, it's more about playing music from a mobile device on the road, but it gets more interesting when it comes to headsets. I really wonder how can it be that a company is selling BT headsets when you cannot do

  • Video telephony with proper lipsync
  • Play games with realtime audio
    I mean you cannot run around and be shooting enemies when the gunfire you hear is not in-sync with your trigger actions and with what you see

For those who mentioned to have BT headsets, is that true that there's audio delay even when playing games or doing videoconferencing?
I would actually assume that such devices would be returned by buyers right away...

Posted

I have two JBL headsets, the big one over your head (slight delay) and the "earpods",  bigger annoying delay.

I also have it with vlc, but there I just have configured it to have a audio delay by default of 200ms.

  • Like 1
Posted
3 hours ago, albertlos said:

I have two JBL headsets, the big one over your head (slight delay) and the "earpods",  bigger annoying delay.

I also have it with vlc, but there I just have configured it to have a audio delay by default of 200ms.

So you cannot play games nor video-conferencing, right?

Why didn't you return them to the seller?

Posted
On 19/09/2024 at 19:32, softworkz said:

For those who mentioned to have BT headsets, is that true that there's audio delay even when playing games or doing videoconferencing?

Never noticed it.  Live TV, gaming,  media on emby all seems synced with Bluetooth from Pixel 8 phone, Asus G834 laptop,  Sony X85 TV and a Roku with Bluetooth.  Never done videoconferencing but I see no reason it wouldn't be synced.

I have AKG and Panasonic earbuds and an MPOW dongle you can plug any 1/8" headphone in for listening.

Posted
1 hour ago, tedfroop21 said:

Never noticed it.  Live TV, gaming,  media on emby all seems synced with Bluetooth from Pixel 8 phone, Asus G834 laptop,  Sony X85 TV and a Roku with Bluetooth.  Never done videoconferencing but I see no reason it wouldn't be synced.

So you have Emby Theater on a Windows machine where there's an audio delay during video playback, but when playing games on the same machine, there's no delay?

Posted
8 hours ago, softworkz said:

So you have Emby Theater on a Windows machine where there's an audio delay during video playback, but when playing games on the same machine, there's no delay?

No audio delay on anything....emby theatre or otherwise.

Posted (edited)

Seriously..... Where is this feature?!? Over 2 years of requesting it on this thread alone is crazy!

Edited by Yafishy

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