LiveTV audio starts before video

I’m having an issue with LiveTV on the Vero 4k+ box I just purchased. Anytime I play a channel, the audio starts almost immediately, but the Kodi GUI remains in the foreground for several more seconds before the video finally shows up, at which point the audio and video are out of sync. Sometimes I can fix it by stopping playback and restarting, but that doesn’t always work. When I try to play the same channel on my Shield TV running Kodi 19.4 there are no issues.

I get this occasionally. Just pausing the stream and re-starting it usually fixes it. And typically it happens only on the first channel I access. Some logs could help, also are you using a projector as these seem to be slow at switching to an appropriate resolution.

To get a better understanding of the problem you are experiencing we need more information from you. The best way to get this information is for you to upload logs that demonstrate your problem. You can learn more about how to submit a useful support request here.

Depending on the used skin you have to set the settings-level to standard or higher, in summary:

  • enable debug logging at settings->system->logging

  • reboot the OSMC device twice(!)

  • reproduce the issue

  • upload the log set (all configs and logs!) either using the Log Uploader method within the My OSMC menu in the GUI or the ssh method invoking command grab-logs -A

  • publish the provided URL from the log set upload, here

Thanks for your understanding. We hope that we can help you get up and running again shortly.

OSMC skin screenshot:

Okay I will post the logs ASAP, thanks!

Do you have Adjust Refresh Rate set to Always on both devices and the same UI resolution set?

Sam

Here are the logs https://paste.osmc.tv/ebususomey

On the Vero Adjust display refresh rate is set to On start/stop and on my Shield it is set to Off. I haven’t changed this setting on either.
On the Vero resolution is set to 1920x1080p(2D) and on my Shield it’s set to 1920x1080p

Both should be set to Always for the best results.

If you have it set to Off you obviously won’t see any black screens as there won’t be refresh rate changes; but this will give you choppy playback.

It’s still unclear if you have a projector and the refresh rates you’ve set on both devices. I can see it’s 59.94p on the Vero.

Okay I will try changing to Always and see if that fixes it. I don’t have a projector though, It’s an LG LCD TV. Is 59.94p the correct setting?

That setting won’t matter once you have Adjust Refresh Rate to Always as we’ll always change the refresh rate to match the content you’re playing.

Some people set it to 25Hz or 29.97 (for Live TV depending on region) or 23.976Hz for movies so that there’s no change when they play content, but this will make the UI slower and if you watch movies as well there’s no point in doing so.

1 Like

Okay I changed the refresh rate setting to Always, rebooted twice and tried again but the issue still remained. Here is what I saw.

  1. After reboot waited until cpu usage on screen overlay showed 20-30%
  2. Open up PVR channels and played the same channel from before
  3. Audio started playing in the background immediately
  4. Solid black screen for about 9-10 seconds with no video (one thing I noticed is I get this black screen while the audio is playing in the OSMC skin, but in the other skin I was using yesterday instead of the black screen it just remained showing the kodi gui)
  5. After about 9-10 seconds of black screen video started to show up
  6. Audio badly out of sync with video by at least a few seconds+
  7. Screen flashed black for a second and video appear to skip (assume this is maybe something with the refresh rate?)
  8. After flash of black and skip, no change in audio/video sync - still off by several seconds+
  9. Left playing for 2-3 minutes this way with no change - never synced up

Testing using the same refresh rate setting on my Shield and these were my results

  1. Rebooted shield twice
  2. Open up PVR channels and played the same channel I played on the Vero
  3. Audio and video both start playing simultaneously and almost immediately
  4. Audio and video in sync with each other
  5. Screen flashed black for a second and video appear to skip (this is not something I had noticed before, again I assume because I now have that refresh rate setting turned on?)
  6. After flash of black and skip, audio and video remain in sync
  7. Left playing for 2-3 minutes this way with no change

Here are the logs from the Vero: https://paste.osmc.tv/ujulaxosob

Did you change Adjust Refresh Rate on this device too?

Your logs show that your refresh rate is GUI Resolution: 1920x1080 @ 59.94p
.
You then play some Live TV:

CInputStreamPVRChannel - OpenPVRStream - opened channel stream pvr://channels/tv/All%20channels/pvr.channelsdvr_9056.pvr

But the stream has no metadata hints at all:

2022-12-22 18:41:43.619 T:3128    DEBUG <general>: AMLInsecureVideoCodec::openDecoder hints.fpsrate(0), hints.fpsscale(0), video_rate(0), hints.bitsperpixel(8)
2022-12-22 18:41:43.619 T:3128    DEBUG <general>: AMLInsecureVideoCodec::openDecoder hints.aspect(0.000000), video_ratio.num(1), video_ratio.den(1)
2022-12-22 18:41:43.619 T:3128    DEBUG <general>: AMLInsecureVideoCodec::openDecoder hints.orientation(0), hints.forced_aspect(0), hints.extrasize(47)
2022-12-22 18:41:43.619 T:3128    DEBUG <general>: AMLInsecureVideoCodec::openDecoder hints primaries 2, transfer characteristic 2, colourspace 2

when we initially play it. When this usually happens from the top of my head, we assume 25fps for Live TV. So we then wait, and switch when we do get a hint.

2022-12-22 18:42:00.302 T:3128    DEBUG <general>: CRenderManager::Configure - change configuration. 1920x1080. display: 1920x1080. framerate: 60.00.
2022-12-22 18:42:00.305 T:2798    DEBUG <general>: DeleteRenderer - deleting renderer
2022-12-22 18:42:00.306 T:2798     INFO <general>: Constructing CRendererAML
2022-12-22 18:42:00.306 T:2798    DEBUG <general>: CRenderManager::Configure - 8
2022-12-22 18:42:00.307 T:2971    DEBUG <general>: OnAVChange: CApplication::OnAVChange
2022-12-22 18:42:00.312 T:2798     INFO <general>: [WHITELIST] Searching the whitelist for: width: 1920, height: 1080, fps: 60.000, 3D: false
2022-12-22 18:42:00.313 T:2798    DEBUG <general>: [WHITELIST] Using the default whitelist because the user whitelist is empty
2022-12-22 18:42:00.313 T:2798    DEBUG <general>: [WHITELIST] Searching for an exact resolution with an exact refresh rate
2022-12-22 18:42:00.313 T:2798    DEBUG <general>: [WHITELIST] Matched an exact resolution with an exact refresh rate 1920x1080 @ 60.00 - Full Screen (24)
2022-12-22 18:42:00.313 T:2798    DEBUG <general>: [WHITELIST] Searching for an exact resolution with double the refresh rate
2022-12-22 18:42:00.314 T:2798     INFO <general>: Display resolution ADJUST : 1920x1080 @ 60.00 - Full Screen (24) (weight: 0.000)

It would be good to see a debug log from your Shield to see how that handles things and if it’s running the same version of Kodi. Kodi has a log uploader and you just need to enable debug logging as you did on the Vero, we don’t need any other system information so that should suffice.

Here’s how I’d proceed:

  • Change the refresh rate to 60Hz and turn off Adjust Refresh Rate. Stick to one channel and see if it improves the channel you just played
  • If it doesn’t – the refresh rate is not being picked up correctly, which would not surprise me. We’ll then investigate further.
  • Confirm the channel / source of the playback.

Users may find that it takes a few seconds for the screen to appear when playing (as we have to adjust to source) and projectors are the slowest for this; but it should then be in perfect sync. On a TV like yours it should be about a second.

If you can reproduce it with a recording and share it with us that would of course be perfect.

Sam

Yes I changed the refresh rate setting to “Always” on both devices

How to I change it to 60Hz? I’m not seeing that setting?

Nvm found it in the system menu

Okay, here are 2 more sets of logs, one from the Vero, and one from my shield playing the same channel, followed by a video recording.

To prepare I made sure both devices had Adjust Refresh Rate set to Always, turned on logging for both, then rebooted both devices twice. Then I scrolled to the same channel on each device but did not press play until I was ready to start the recording.

https://paste.kodi.tv/zohajirura

https://paste.osmc.tv/lenaceyifu

Imgur

I Around the 1:15-1:20 mark of the video is where you can tell more clearly that the audio is out of sync, when the video starts playing it’s at a point where there isn’t any dialogue and the volume was a little low, but the the whole time the screen is black, audio is in fact playing. If you turn it up loud enough you should be able to hear it.

After this, I also tried resetting the refresh rate to 60Hz, and turning Adjust Refresh Rate to Off, and I did not notice any difference in behavior.

Thanks. Can you confirm if recordings are affected and if so provide us with a sample?

Sam

Recordings seem to be working fine, tried playing a few and no issues. Have only noticed it on live tv. But I am also now seeing a similar issue using the Netflix addon. Slightly different effect, stream starts playing pretty quickly, audio and video start at the same time and are in sync. Then after a minute or so video starts lagging and gets badly out of sync with audio. If I pause the video, the audio stops, but the video keeps going for a few seconds. When I un-pause, it seems like for a second or so things might be back in sync but then the video starts looking laggy again and it gets back out of sync. This acually seems worse than the what I was seeing playing live tv, cause not only are the audio and video out of sync, but the video looks really laggy and choppy, which I did not see happening on the out of sync live tv streams. Also because I use the Netflix addon a lot. Here are a couple of recordings. Adjust Refresh Rate is set to always. Let me know if you would like some logs.

Imgur
Imgur

I must admit, this has been a little disappointing so far :disappointed:. My Shield is the original model from 2015 and I thought the Vero 4k+ was going to be a nice upgrade and I have always just wanted a simple Kodi only setup, but I’ve never had these kind of playback issues before. I appreciate your help and I’m going to keep trying, but ultimately if I can’t fix these issues, what is your return policy? And is it possible to root the Shield and uninstall Android and install OSMC?

You can return it within 14 days of receipt without reason. This may be your best option. Just send an email to support@osmc.tv and we’ll take care of it from there.

Without logs or a sample file I can’t advise what the issue is

Unfortunately not.

Have a good Christmas.

Sam

Okay, I can reproduce and post some logs. Any specific settings you would like set for this test? And anything you want me to do, such as trying the pause/un-pause example like in the video I shared, or would you rather I just start playback and let it go for a few minutes?

Can you provide a recorded file where we can reproduce this problem? We can then investigate and solve this promptly, as well as rule out network issues on your side.

No – just a log that reproduces the problem.