Jump to content

Audio/Video out of sync


Nuitarius

Recommended Posts

14 hours ago, Luke said:

Hi, can you try sideloading our standard android app on the same device and let us know how that compares?

https://emby.media/emby-for-android.html

Thanks.

 

14 hours ago, wmichael3 said:

and it also lost sync on the Android app, and using a browser against the server

To me, that sounds like the issue is actually in the recording (i.e. it happened at the time of the broadcast).

Link to comment
Share on other sites

wmichael3
Posted (edited)

That is what I think - that it is in the file itself.  But it does eventually happen in live streams as well.   If I stop and restart the live stream, it is again perfect.  Not so with a recording, although in recordings it can correct itself later in the file - 20 minutes of bad sync, and then suddenly it is synced again.  I have not noticed it fix itself in a live stream. (Edit:  I have seen it fix itself in a live stream - left the stream on, saw it start to lag, let it go and came back a couple hours later and it was synced)

Everything is always perfect when playback starts.  And it is always the audio that lags.  It is really driving us nuts.  I start to obsess about watching people's lips.  

Edited by wmichael3
Link to comment
Share on other sites

  • 3 weeks later...
wmichael3
Posted (edited)

It has to be in the recording itself: we've been away this week using Emby for Roku and it has the exact same issue as Emby for Android TV.  Almost every recording loses audio sync after maybe 30-60 minutes.  It will get worse the longer the recording is, but sometimes will fix itself later in the recording.  It also occurs with Live TV - it may take an hour, but eventually it will lose sync.  It is on almost every recording.

What can I do about this?   Is there anything in the works or anything I can check or try?  Would there be anything in one of the logs?  I have attached a playback log from this morning from a Roku - playing back a recording from yesterday.

In the log this is everywhere:

07:51:28.580 [segment @ 00000201263ad4c0] Non-monotonous DTS in output stream 1:1; previous: 332, current: 331; changing to 333. This may result in incorrect timestamps in the output file.
07:51:28.580 Ignoring repeated subtitle frame
    Last message repeated 1500 times

 

It just started in March with the HD Homerun Prime tuner I've had for 8 years.  I've updated the firmware and booted it and it has a very strong signal. I am at wits end.

Signal Strength    98% (-1.8 dBmV),  Signal Quality    100% (41.7 dB)

ffmpeg-transcode-a3fbe991-4019-4100-bbd7-179be7c16675_1.txt

Edited by wmichael3
Link to comment
Share on other sites

wmichael3

No response?

I went ahead and bought a brand NEW HD HomeRun Prime and transferred my cable card to it a few hours ago.

THE SAME RESULT: Live TV will eventually lose synchronization between audio and video.  Might take 15 minutes.  Might take an hour.  After sync is lost, it will typically re-sync 15-25 minutes later - after a momentary freeze of video - almost not noticeable.  Rinse, repeat.  Sometimes the loss of lip sync is truly painful.  The loss of sync is embedded in the recordings and replicable across any means of viewing - Android TV, Roku, browser, etc.  Multiple Android TVs.

At this point I cannot recommend Emby to anyone as a Live TV source - the loss of sync, which was introduced a few months ago - is too painful.   Except for this, Emby is great these days - so many issues have been fixed. 

If you think this is my problem, at least give me a clue as to where to look.  Transcoding is on a fast SSD.  The PC is new - bought in January (An Intel I5 NUC). No disk errors. Low CPU utilization. Lots of memory.  The HD Homerun has 100% signal strength and 100% signal quality.  Drivers up to date.  It fails on Direct Play.  It fails on Direct Stream.  It fails on transcoding.  I don't know where to look.

Should I try rolling back to a February ffmpeg?  I'll try anything. From the little I know of how this works, it seems that is where the problem must be.  Is this anything anyone else has a problem with?  Is it just me?  Is it a problem you acknowledge?

I don't want to leave Emby - but we can't live with this.

Link to comment
Share on other sites

csadoian
3 hours ago, wmichael3 said:

No response?

I went ahead and bought a brand NEW HD HomeRun Prime and transferred my cable card to it a few hours ago.

THE SAME RESULT: Live TV will eventually lose synchronization between audio and video.  Might take 15 minutes.  Might take an hour.  After sync is lost, it will typically re-sync 15-25 minutes later - after a momentary freeze of video - almost not noticeable.  Rinse, repeat.  Sometimes the loss of lip sync is truly painful.  The loss of sync is embedded in the recordings and replicable across any means of viewing - Android TV, Roku, browser, etc.  Multiple Android TVs.

At this point I cannot recommend Emby to anyone as a Live TV source - the loss of sync, which was introduced a few months ago - is too painful.   Except for this, Emby is great these days - so many issues have been fixed. 

If you think this is my problem, at least give me a clue as to where to look.  Transcoding is on a fast SSD.  The PC is new - bought in January (An Intel I5 NUC). No disk errors. Low CPU utilization. Lots of memory.  The HD Homerun has 100% signal strength and 100% signal quality.  Drivers up to date.  It fails on Direct Play.  It fails on Direct Stream.  It fails on transcoding.  I don't know where to look.

Should I try rolling back to a February ffmpeg?  I'll try anything. From the little I know of how this works, it seems that is where the problem must be.  Is this anything anyone else has a problem with?  Is it just me?  Is it a problem you acknowledge?

I don't want to leave Emby - but we can't live with this.

No, you aren't alone!  🙂

I noticed the audio sync issue a couple of months ago.  I regularly record the network evening news and local news, which are 30 minute shows, but on the same channel.  Inevitably the problem would show up on the second program (the local news) BUT NOT ALWAYS.  At first I thought it was my cheepo Windows tablet that I was using for playback, but then I noticed the problem was actually IN the recording, or it would occur (as you describe)  on LIVE TV (BUT NOT ALWAYS).

In my Emby setup I have 3 Silicon Dust tuners.  I have an HD HomeRun CONNECT, HDHomeRun EXTEND (BOTH OTA Tuners) and a HDHomeRun PRIME (Comcast cable).  Normally I try to record from my over the air tuners (when the program was available)  but for some reason I had set my evening news programs to record from Comcast.  After the audio sync issues started happening I first started playing around with my Emby Theater settings (specifically the audio delay settings), and it would help but it was inconsistent depending on what I was watching.

Eventually I switched my evening news recordings from the PRIME box to my OTA tuners (the programs are on my local stations) and to my surprise, no more audio issues.  So when I saw this thread and the problems you were having with your PRIME tuner I realized the sync issues were only occurring with live/recordings whose source was the PRIME box.

I checked my PRIME box and I did notice there was a firmware update waiting so I installed it (version 20220203), but I did not notice any difference.

I should mention that when using Emby Theater for Windows (on Windows 10) it is served up as direct play, no trans-coding involved that I can see.  I will attach two screenshots that show the stats for nerds on two streams.  The first is from my Prime tuner, and shows an H264/MPEG-4 stream from, using direct play.  The second is from my CONNECT tuner (OTA) and shows an MPEG-2 stream, again using direct play.  Perhaps Emby is having an issue with H264/MPEG-4 streams.  But I can certainly validate there is a problem here.

 

OTA_STATS.jpg

PRIME_STATS.jpg

Link to comment
Share on other sites

wmichael3
Posted (edited)

Thanks for your reply - at least I know it just isn't me!  I replaced my new tuner with the old one - will now return the new tuner - thank you Amazon return policy.

What I just did was replace ffdetect, ffprobe and ffmpeg with the files from 4.6.7.0 from 11/21/21 and will see if that makes a difference.  I did notice the picture quality decline as I think there were a lot of improvements to ffmpeg since then, but I couldn't find the files from the February era betas I was looking for - we were away the weeks before April 9th and after returning was when we started to see this problem.  The notes say that ffmpeg went to version 5 in 4.7.0.21 at 1/25/22, so I thought I would start before then.  We'll see.  I first reported the problem at 4.7.0.34.

Update: after putting in the old ffmpeg files and restarting and streaming live TV, it did not fix the problem.  The sync was gradually lost after maybe 45 minutes.

 

Edited by wmichael3
Addition/update
Link to comment
Share on other sites

csadoian

I should mention that I have watched a program from my HDHomeRun PRIME tuner using both Emby for Windows and HDHomeRun VIEW (Silicon Dust's native application) and when using Emby I can see the audio sync start to slip within about 10-15 minutes.  When using HDHomeRun View I can watch the same program using the PRIME tuner for over an hour and never loose audio sync.

I didn't think rolling back FFMPEG would do any good, it's my understanding that FFMPEG is not use unless Emby is transcoding the stream, right?  When viewing channels from my PRIME tuner with Emby the stream is always reported as Direct Play (at least when using Emby for Windows as the client).  I assume Direct Play takes FFMPEG out of equation.

 

Link to comment
Share on other sites

wmichael3
Posted (edited)

As near as I can tell ffmpeg is always used for me - it is always a process on the server, albeit a very light touch when not transcoding video.  I think it is only not used for "real" Direct Play - which is not Direct Stream - for Direct Play you can't pause Live TV at all.  Direct Stream uses ffmpeg and writes/reads to disk so that you can pause/skip/buffer.  At least I think that is how it works.  The terminology also seems to have changed a bit in the app over time.  Now the app tries to give you different terms for video versus audio.  But I'm using the old terminology - DIrect Play means no pausing, DIrect Stream means buffer/pause/skip/rewind.

Having said that, I've turned on the Direct Play option in Android TV that prevents pausing and still lose sync.  I had forgotten that when I tried this.  So your point is valid.

I am currently trying the same thing as you - using the HDHomeRun View app.  Have had CNN on for 45 minutes and sync is perfect.

Edited by wmichael3
Link to comment
Share on other sites

Bill LeDuc

I had Emby server running on a Mac Mini M1 and never saw this problem. Moved Emby to Windows 11 on a NUC11 and saw it right away. Based on the fact that the HDHomeRun app doesn't loose sync it should be fixable as long as the Emby team is listening. I'm at a loss as to how this could slip threw the development team. Emby are you listening?

Link to comment
Share on other sites

solson440

I'm having this exact same problem. It started within the last month, or so. Server is on a Windows 10 Pro machine, and client is Windows 11 Pro using Emby Theater from the Emby website, not the Windows store. The server indicates "Direct Play" on all categories. I notice the issue in virtually all recordings, with the problem getting progressively worse the longer the recording. The concern seems to coincide with a recent Emby Server update, but not positive.

Link to comment
Share on other sites

csadoian
30 minutes ago, solson440 said:

I'm having this exact same problem. It started within the last month, or so. Server is on a Windows 10 Pro machine, and client is Windows 11 Pro using Emby Theater from the Emby website, not the Windows store. The server indicates "Direct Play" on all categories. I notice the issue in virtually all recordings, with the problem getting progressively worse the longer the recording. The concern seems to coincide with a recent Emby Server update, but not positive.

Are you using a HDHomeRun PRIME tuner also?

I also think this problem coincided with the last MAJOR Emby server update, although like you I am not positive.  It wasn't like after the update the problem was immediately evident,  it took a little while to notice something had changed with the audio sync with regards to video streams from the PRIME tuner.

 

Link to comment
Share on other sites

solson440

Yes, I am using an HD Homerun tuner. Agree that it took a while to realize that there was something different going on.

Link to comment
Share on other sites

13 hours ago, solson440 said:

I notice the issue in virtually all recordings

Hi. Were these items recorded since the update?  If you play one of them in an independent player (like WMP or VLC) does the audio go out of sync?

Link to comment
Share on other sites

solson440
Posted (edited)

Yes, all recorded after the update; I don't know that I have any from pre-update. There are two TV shows that air while I'm either asleep, or working. I watch them either the same day, or the next day. Show that are sitting in the "Recorded TV" folder for a while will be processed by MCE Buddy to remove commercials; shows that I watch within a few hours are not processed. Additionally, I stopped MCE Buddy from processing videos for some time to see if there was a correlation; there was not. Both the shows processed by MCE Buddy, and the raw videos both exhibit the concern; they start out in sync, and as the video plays, the audio gradually gets out of sync. Both shows are one hour long, and by the end, the concern is extremely obvious to the point where you just have to listen and not watch. Live TV does the same thing; video from start is fine, audio slowly gets out of sync the longer it plays.

While I have not tried playing the video(s) in another player, yet, I did try playing the video(s) on my Android tablet with the Android Emby app, and it exhibited the same concern.

I did try removing the TV tuner from Emby, and reconnecting it. While it did update the logo's of stations that had changed, it did not change the audio behavior.

I have not tried watching live TV from the Homerun app, I suspect, as others have mentioned, that the concern will not be present.

Has anyone tried the 3.0 Beta to see if the concern is still there?

Edited by solson440
Link to comment
Share on other sites

wmichael3

A recording from early this morning had the sync problem after about 45 minutes of playback.  Pulled up the file using VLC and it had the same problem at the same point in time.  It could be that the sync problem starts right away and it takes a while before it becomes noticeable to the eye, but as I've said before sometimes it can also fix itself later on after a very momentary freeze of video.  This same recording (3 hours of "Morning Joe") fixed itself sometime later - two hours in, it is again synced.  Just left it on in the background so I don't know when the fix occurred.

Live or recorded is the same.  It is now *almost* universal as long as the recording or live viewing is long enough.  And it is increasingly common for it to fix itself later on if the recording is long enough.

Link to comment
Share on other sites

Spaceboy

jumping on this one too. this has started since the 4.7 update in my opinion. affects all live and recorded tv. i havent timed anything but it looks like a .5-1s drift over an hour long show

Link to comment
Share on other sites

mwongjay

Posted in a separate topic, but cross-posting here. In my case I was not recording just watching live tv. Uploading the log file from that session. One thing I noticed is playback would buffer every ~1-2 min. When playback resumed the synchronization was worse. Might be correlated to these errors in the log; these groups of errors seem to occur between 1-3 min.

21:33:21.437 [ac4 @ 0x73d280] substream audio data overread: 3
21:33:21.437 Error while decoding stream #0:1: Invalid data found when processing input

 

 

ffmpeg-transcode-7ab20cac-def9-44ab-b926-3e8810e07516_1.txt

Link to comment
Share on other sites

Bill LeDuc

Spaceboy, I think you are on to something. I had no problems running Emby server on a Mac Mini using version 4.6. Moved to Emby version 4.7 on wimdows 11 and saw the problem right away.

Link to comment
Share on other sites

csadoian

So, I think to sum up the audio sync issue the following conditions must be met:

1)  Emby Server 4.7.0 or higher on WINDOWS 10 or 11

2)  This only seems to be occurring when using a HDHomeRun PRIME tuner.  I have not seen it happen on my OTA tuners.

3)  Affects both recordings and live TV

4)  Sync problem does not seem to occur right away, it usually takes a few minutes (upwards of 10-20 minutes) to become noticeable.

5)  In the case of a recording, when playing the TS file with another player (such as VLC) the audio sync problem is still noticeable, indicating it is embedded in the recording produced by Emby.

6)  Sync issue occurs regardless of the client platform used (i.e. Android, IOS, Roku, Windows, etc)

Since this issue only seems to be affecting the HDHomeRun PRIME tuner, I'm thinking the problem might be in how Emby is handling MPEG-4/H264 streams.  HDHomeRun OTA tuners appear to output MPEG-2 video.

 

 

 

Link to comment
Share on other sites

wmichael3

I first reported this on April 14th, at 4.7.0.34, on Windows 10 on a Intel NUC with HD HomeRun Prime on Comcast.  I had updated to that version on that day; prior beta updates were installed on 4/10 (.33) and before that 3/14 (.30) , before that 2/10 (.23).  I don't know when it started for sure, but I only noticed it after the install on 4/10 - but we were gone between 3/15 and 4/9, so it could have been in the 3/14 install as well.

So my best guess is that this was introduced between 4.7.0.30 and .34.

I will add that on 4.8.0.0, it now *routinely* fixes itself later on.  The past two days I've left live TV running during the day - it loses sync after 15-45 minutes, and then regains it later on - maybe another 30-60 minutes.  Once it regains sync, it seems to stick.  Over the past weeks I've actually seen it fixing itself a few times - just a blip of a video freeze and then sync returns.  But in 30-60 minute recordings it is more likely to be bad throughout once it starts.

Watching the bad sync reminds me of watching a dubbed Godzilla movie from the 50s.

Link to comment
Share on other sites

  • 2 weeks later...
Fratopolis

Lol I started noticing this issue over 6 months ago. Possibly longer. I just set hdhomrun dvr to record live news which fixed the problem and have emby monitor that folder as well. It is definitely only when emby records it. 

Link to comment
Share on other sites

solson440

My setup does it on live TV, as well. Sometimes almost immediately. This is a recent problem. If I had to guess, it happened when Emby Server natively handled Live TV and recording.

Link to comment
Share on other sites

revengineer
On 6/3/2022 at 1:40 PM, Spaceboy said:

jumping on this one too. this has started since the 4.7 update in my opinion. affects all live and recorded tv. i havent timed anything but it looks like a .5-1s drift over an hour long show

Yup, same here. Just updated from 4.6.7 to 4.7.2 and am seeing this in addition to other errors. I don't have time to contribute to fixes at this time, so I am reverting back to 4.6.7 for the time being.

Link to comment
Share on other sites

revengineer

I have a production and a test installation, which I can switch between, and I always test new versions before upgrading my production. I learned the hard way that one should never ever ever ever update the production version without testing the new releases because after database upgrades there is no way of going back.

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