Kodi Community Forum

Full Version: Livestreams Audio Delay on LibreELEC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Not 100% sure where to post this question, but figured I'd start here. NHL hockey preseason has just started up and I'm watching as many games as I can. Over the offseason, I upgraded my setup to a 4k TV with a surround system, and I'm using an odroid C2 running the latest LibreELEC beta.

Unfortunately, any livestream I watch (be it an NHL game, or any other live video), the audio is delayed by about 1 second (which I can manually correct via the audio offset in the OSD). When I start a live stream, for a second or two, the audio and video are in sync, but for some reason, after a second or two, the audio seems to restart from the beginning, which causes it to be off by about a second.

This problem does not happen with non-livestreaming video (i.e. when I watch an archived game using the same NHL.tv addon). The audio is also perfectly in sync when I'm watching my local media stored on my server via smb and via the emby app.

Here is a debug log showing me playing 2 livestream games (the first stream died on my almost as soon as I started it, so I selected another stream, and the audio was off), as well as 1 archived game. The livestreamed games had the audio off by about a second, while the archived game's audio was in sync.

https://www.dropbox.com/s/l3pl9kvvdi24s39/kodi.log?dl=0

It appears that this problem is only happening on my odroid, since I can watch the same livestream NHL games on my shield (connected to another TV with no receiver) without problem.

Please let me know what other information I can provide to further assist.

Thanks!

::EDIT:: Just did some more testing, and it seems that when I'm playing a livestream and the audio is out of sync, if I try to skip ahead in the stream (which obviously I can't), the audio and video come back into sync and stay in sync.
Just wanted to bump this thread and give some more info as I think I have narrowed down the problem.

I recently upgraded my odroid to a minix u9-h running the latest LE, and I am experiencing the same problem. Both boxes were hooked up to my TV through my Yamaha RX-V679BL with passthrough enabled within kodi. Any stream I watch through my receiver has the sound slightly off, which I can correct by either forcing the stream to buffer (ie by trying to skip ahead 10 seconds) or by manually adjusting the audio offset. However, this is only a temp fix, since the stream will slowly go out of sync again. Again, this only happens when watching live streams (live NHL games), and not youtube videos or replays of NHL games.

I have a shield TV hooked up to another TV in my bedroom (direct HDMI connection), and when using the same NHL addon with the same settings, I do not (and have never had) any sync issues.

Does anyone have any idea what could be causing this issue?
You missed to provide the logfile at a paste service. Ppl are not willing to download files to read a log and I guess a >4MB logfile will be very very long. So please try to short the time until you grab the log. So:

- start your Odroid with debug logging enabled
- ssh in to your Odroid
- reproduce your issue as fast as you can....don´t do anything else!!!
- provide the log via: pastebinit /storage/.kodi/temp/kodi.log
- share the URL to us
@DaVu thanks for the reply.

Please see below for a live game with the sound off on the MINIX U9H with LibreELEC installed (latest available):

http://paste.ubuntu.com/25820492/

Next, please see below for a replay game where the sound is in sync (same box):

http://paste.ubuntu.com/25820501/

For both log files, I turned debugging on, restarted, went right into NHL.tv and started a game.
The log is quite clear. If you record that problematic stream it works, right?
This is a livestream from the NHL.tv addon, so I can't (at least I'm pretty sure I can't) record it. When the game is over though, I can watch the replay stream (meaning not live, so I guess the same thing as recording) and the sound and video are perfectly in sync.
(2017-10-26, 07:28)fritsch Wrote: [ -> ]The log is quite clear. If you record that problematic stream it works, right?

@fritsch - I wasn't sure from your reply if you can see what is going on with my setup. Any advice/help would be much appreciated.

Thanks
(2017-11-02, 15:25)feerlessleadr Wrote: [ -> ]This is a livestream from the NHL.tv addon, so I can't (at least I'm pretty sure I can't) record it. When the game is over though, I can watch the replay stream (meaning not live, so I guess the same thing as recording) and the sound and video are perfectly in sync.
 Have you found a fix for this yet?  I'm experiencing the same thing on LibreELEC on RPi3.  Live streams worked fine on OpenELEC, which I recently switched from.
Unfortunately no. My only solution at this point is to make the stream manually buffer by skipping forward, which temporarily re-syncs the audio, but after 10 minutes or so, the video and audio slowly go out of sync.

It is maddening.
(2017-11-17, 17:12)feerlessleadr Wrote: [ -> ]Unfortunately no. My only solution at this point is to make the stream manually buffer by skipping forward, which temporarily re-syncs the audio, but after 10 minutes or so, the video and audio slowly go out of sync.

It is maddening.
 It's a very strange phenomenon.  I guess I'll have to switch back to OpenELEC when they fix their TVDB metadata problem.
(2017-10-26, 07:28)fritsch Wrote: [ -> ]The log is quite clear. If you record that problematic stream it works, right
Fritsh - Any idea what could be causing this issue? When I use another program to capture/record the exact same stream, then play the still recording file through kodi, the audio/video are perfectly in sync.

Any ideas would be greatly appreciated.
Can anyone assist with this? Now even when I get the streams in sync, it slowly goes out if sync after a few minutes.

I can watch the NHL streams on my Xbox using the official app on the same TV and surround sound with no sync problems.

This is now just happening when I watch NHL streams. Fox sports go works fine.
Looks like the stream has no timestamps and your AML box can't handle this. Other platforms like Linux X11 do much better in this case.
Thanks, I've reported this to the Libreelec devs to hopefully get this sorted. See below:

https://forum.libreelec.tv/thread/10263-...#post71271
(2017-11-17, 18:51)G0AT Wrote: [ -> ]
(2017-11-17, 17:12)feerlessleadr Wrote: [ -> ]Unfortunately no. My only solution at this point is to make the stream manually buffer by skipping forward, which temporarily re-syncs the audio, but after 10 minutes or so, the video and audio slowly go out of sync.

It is maddening.
 It's a very strange phenomenon.  I guess I'll have to switch back to OpenELEC when they fix their TVDB metadata problem.

I was finally able to solve this problem. I upgraded to a Leia build on both my Minix u9H and ODroid C2 (Libreelec for both), and the audio video sync problems are completely fixed. Not sure if it was a Libreelec fix or a Kodi fix (doesn't really matter), but just happy it works.

I'm not a fan of using alpha software as my daily driver, but the default skin is solid enough, so my wife and I can deal with that for a while.