Jump to content

Audio Delay


Smok@zz

Recommended Posts

Smok@zz

Emby Team,

 

As of late, i have noticed that live tv and recordings are exhibiting a very brief audio delay where i hear the sound before the natural lip movement.  I have done all i can to reduce this through the TV or external sound device but i need it to go just a little further.  While playing back direct streamed DVR, i can manually set an audio delay of -200ms and that is a perfect sync.  However, i am unable to do this with live TV that is being transcoded (direct is too choppy).  Is there a way to have that audio delay come from the source and apply it all playback items?  Thanks in advance.

Link to comment
Share on other sites

Jbizzlefosho

I have noticed this as well for live or recorded TV, but it's not limited to Emby. SPMC does the same thing. I can rw/ff and the audio syncs up, but soon falls out of sync again. 

 

Oddly enough, using the HDhomerun view app, there is no loss of audio sync. To add to all of this, when I stream to my work comp to catch up on my late night shows, it works just fine AND emby/kodi on my htpc doesn't have a problem. This is only for OTA TV, not for any of my bluray rips. 

 

Still playing around myself before submitting any formal log.  I recently updated my HDhomerun extend to the latest beta firmware. I'll revert to stable before raising any more flags. 

 

Edit: Just want to say I'm a recently new supporter and I am fascinated by the capabilities of this software. Keep up the good work!

Edited by Jbizzlefosho
Link to comment
Share on other sites

I have noticed this as well for live or recorded TV, but it's not limited to Emby. SPMC does the same thing. I can rw/ff and the audio syncs up, but soon falls out of sync again. 

 

Oddly enough, using the HDhomerun view app, there is no loss of audio sync. To add to all of this, when I stream to my work comp to catch up on my late night shows, it works just fine AND emby/kodi on my htpc doesn't have a problem. This is only for OTA TV, not for any of my bluray rips. 

 

Still playing around myself before submitting any formal log.  I recently updated my HDhomerun extend to the latest beta firmware. I'll revert to stable before raising any more flags. 

 

Edit: Just want to say I'm a recently new supporter and I am fascinated by the capabilities of this software. Keep up the good work!

 

Hi, welcome, and thanks!

  • Like 1
Link to comment
Share on other sites

Jbizzlefosho

Following up, and perhaps I could reach out to the community for additional insight/help. 

 

Learned the hard way that once you upgrade firmware on an Hdhomerun, you can't go back to old firmware due to some Cablelabs rule. So I really hope that is not the problem. 

 

I've tried sending logs through the ATV Emby apps function, but how do I ensure that the developer here (ebr?) gets it and that I can answer any of his questions.

 

Thanks!

 

 

My Setup:

 

Shield TV>Denon AVR-S910W>Samsung TV

 

Edit: Setup Info

Edited by Jbizzlefosho
Link to comment
Share on other sites

I'm afraid app logs aren't going to help us here as, whatever the problem is, is buried deep in either the stream itself or the player.  

 

Is the problem with both the internal player and VLC?

Link to comment
Share on other sites

The next release of the app will have the option to not use VLC for live TV so you can try and see if that helps with the audio problem.

Link to comment
Share on other sites

Smok@zz

ebr - I am very excited about not having to use VLC for live TV as i have done my own testing with other Android apps (for another issue of ffmpeg constantly restarting itself).  I have a Bravia TV which includes its own Video player.  I am able to stream TV directly from the HDHR Prime with not transcoding and no audio sync issues.  So its not coming from the HDHR at all, its with the transcoding and ffmpeg.  Playback of recorded items or movies do not exhibit this behavior because they are not transcoding and thus ffmpeg isn't being called.  So, the issue is somewhere within ffmpeg (along with other issues...) but I know you guys do not make that software or code it, you just utilize it.  

 

I would try my best to see what switches might need to be changed but Emby does it's own calculations to figure out when transcoding is needed and when it isn't and I do not believe there is a place for us to override the switches your team puts on the transcoding (maybe a feature request?).  So, until ffmpeg starts magically working the way it used to, I was hoping that you guys might be able to build in some audio sync settings to help combat their bugs/issues.  Thanks.

 

Not wanting to hijack my own thread but it's interesting that I can stream from HDHR directly which no quality or audio loss.  When i stream directly from Emby, it's starts off strong, then gets very choppy video with pixelation issues and audio cuts in and out after a few moments.  Isn't direct streaming from Emby just passing the stream from the HDHR to the client or is there something else going on behind the scenes to cause this issue?

 

Thanks again for all you guys do - i love the software and i very much appreciate all the hardwork your team puts into this.  Just kinda sucks that you have to rely on others for some heavy lifting and they sometimes cause more issues then they solve...

Link to comment
Share on other sites

Jbizzlefosho

I tried a couple streams through VLC and though Emby itself. My server log is 20MB+, and since the forums have a 10MB limit, what would be the preferred method to share that?

 

The ones through VLC played fine, when the app worked. VLC seems to crash a lot on me when accessing network content. 

 

Thinking I might try reflashing a factory image tonight and see if maybe the update that happened first thing after I bought the shield screwed something up. I doubt it though. 

 

Again, I'm seeing the same thing as Smokezz. Choppy video that has out of sync audio, and sometimes when backing out, it crashes Emby to where I have to force close it. 

 

 

Thanks!

transcode-8b587c90-e53a-428b-8812-fe91f59da96a.txt

transcode-2fe88041-8baf-49b1-8f2e-83585c4a4a1d.txt

transcode-d94bbdb6-95ab-468a-a038-4495002fc10e.txt

Link to comment
Share on other sites

Server logs aren't going to tell us anything in this instance.  Whatever this problem is it is within the player.

 

Can you please describe in more detail the experience with VLC vs. the Google player?  Detail whether the stream was transcoding or direct streaming and which player it was and how it played back.  Thanks.

Link to comment
Share on other sites

Smok@zz

*I really wish you guys had a hotline to call about some issues.  It can be very difficult to explain issues properly when you can only type but i realize you all have day jobs too*

 

ebr,

While i cant speak for jbizz, i can tell you about my experience in the hopes that it will help you.  On my Bravia TV, i have Emby, VLC, and a system included video player.  The latter is nothing special but it can utilize DLNA so i can directly stream from HDHR Prime.  

 

So when i play from Emby using direct/v it will play but the video is choppy almost like its running at 20 or 25fps instead of 30fps.  however the audio appears to be in sync (although the choppy video makes it difficult to know for sure.)  When disabling direct stream, it will transcode and experience this audio delay.

 

When trying from the VLC app, i am unable to find any channels on my HDHR so i cannot direct stream.  I can find Emby and attempt to play tv that way, but the stream (not sure if it's direct or transcoded) plays worse then through emby using direct/v.  So that's out.

 

The last option, playing from the included video player definitely works the best.  The sound is perfectly in sync and no choppy video.  It is playing directly from HDHR so its not transcoding at all.  

 

So what i gathered from this is that my TV is able to be streamed directly over wifi (5ghz) without issue.  I always thought that Emby just forwarded the stream from HDHR when it would play in direct/v, perhaps thats not the case?  Either way, something with transcoding is broken which is causing this audio delay.  I really hope this helps answer some of your questions, if not, we can always chat over a webex ;)

Link to comment
Share on other sites

So it sounds to me like using the Google player with a direct stream is our last hope - and you will be able to try that in the version that was just released today so let me know how it goes.

Link to comment
Share on other sites

Smok@zz

Thanks ebr - i actually just updated my version earlier today to 1.1.99g.  Is that the version you are speaking of?  If so, i didn't seem to notice any different in direct/v.  In fact my examples from above was referenced from that version.  Or perhaps, there is a specific combination of what should and shouldn't be checked off.  Hoping you have a 1.2.00g version for us to try.  Thanks.

Link to comment
Share on other sites

99 is the version I was talking about.

 

There is a checkbox for whether or not to use VLC for direct streamed live TV.  Uncheck it and it should play in the internal player instead.

Link to comment
Share on other sites

Smok@zz

ebr - might be beating a dead horse now but even with it disabled, same issue.  I also enabled it, same choppy issue.  I took some videos to help illustrate this for you:

 

VLC disabled: https://www.dropbox.com/s/q823z0yw0d0oj46/With%20VLC%20Enabled.mp4?dl=0

VLC enabled: https://www.dropbox.com/s/cpmohn2ajf3ktya/With%20VLC%20disabled.mp4?dl=0

Bravia Video player: https://www.dropbox.com/s/8dal7fzu3do1ito/Bravia%20Video%20Player.mp4?dl=0

 

It takes a second for two for Bravia video player to catch up but when it does, the sync is perfect.

 

On a side note and back to the original thread reason - is there anyway to build an audio delay into the app or from emby server itself?  

 

Thanks for taking a hard look at this.  I really do appreciate it.

Link to comment
Share on other sites

I don't see the OSD in your videos.  Did you confirm what the actual playback method was in each instance?

Link to comment
Share on other sites

Smok@zz

i did confirm, but i can take another video if that would help you.  Might get shakey cam sickness, but i can do it.  Let me know.  Thanks.

Link to comment
Share on other sites

Don't need another video.  Just wanted to be sure it was doing what we thought it was.

 

If you can't get smooth playback with either VLC or the internal player I just really don't know what else to do other than force it to transcode.

 

Is this a wireless connection...?

Link to comment
Share on other sites

Smok@zz

thanks - i dont mind having it transcode but that audio be slightly off is driving my wife and i insane.  Any chance to have audio delay added to when transcoding?  It can be done when using direct/v.  That would really go along way in this effort.

 

edit - yes this is a wireless connection over 5ghz

Edited by Smok@zz
Link to comment
Share on other sites

Jbizzlefosho

Turning off the option to "attempt to use VLC" seems to have fixed my issue. I made sure to restart my shield after un-selecting it. Restarting Emby itself probably would have worked, but figured better safe than sorry. The OSD is telling me that it is Direct/I though, not Direct/V, is that intended?

 

The only hiccup, and this only happens when I first start a channel, It looks like it takes a second or two to buffer or catchup, and while doing so it skips and freezes. After that, it plays fine, excellent actually. Perhaps once the freenas plugin is updated (.5972?), with it's emphasis on performance, that will diminish. 

 

Smoke's setup is different than mine since he is playing through an actual android TV, but I am seeing similar problems but on different apps. For example, when I play TV through the HDHomerun app, the audio is in sync but it looks like it's running at 20fps or something. It just looks choppy. If I watch TV through SPMC with the HDhomerun add on, the video is fine, but the audio gets way out of sync.

 

I love the concept of AndroidTV, but it still has a lot of maturation to do. I really appreciate all the work you do ebr and the rest of the Emby team. Let me know if the Direct/I is intended or if you have any other questions.

 

P.S. We can't be the only ones with these problems. Wonder why more people haven't come by with their input. 

 

Thanks again!

Edited by Jbizzlefosho
Link to comment
Share on other sites

Turning off the option to "attempt to use VLC"...The OSD is telling me that it is Direct/I though, not Direct/V, is that intended?

 

If you turn off the option to use VLC, then it will use the internal player instead - which is what we were after.

  • Like 1
Link to comment
Share on other sites

Jbizzlefosho

@@ebr,

 

Just read that the android VLC app is updating to version 2.0 and I was wondering how VLC is integrated into the Emby app. As an external player? Once the update to the stand alone app comes through the playstore on my shield, will I be able to test turning "attempt to use VLC" on and see if that fixes the problem as well? Or do I need to wait for VLC to be integrated into Emby somehow? 

 

thanks. 

Link to comment
Share on other sites

We have to compile our own version of the VLC libraries and include them in the app. 

  • Like 1
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...