Sample video that is out of the sync on RPI2 and osmc September-2

Hi,

before I send everything that is needed for the debugging, can someone try to play the video https://dl.dropboxusercontent.com/u/17084525/2015-10-09_131301.m2ts on RPI2 and osmc version september-2?

On my RPI2, video and audio are not synchronized.

Regards.

Looks fine to me with omxplayer enabled or disabled.
Can you use the “audio offset” (in audio OSD settings) to correct the audio and report what value was needed?

On my RPI2, audio is out is sync.
It starts ok, but than after few seconds, audio is going ahead of video, regardless of the omxplayer or not.
If I don’t use omxplayer, during playback by pressing option button, I can see the error at 43000%. By using omxplayer, option button doesn’t report any errors.
Errors are starting from the very beginning.
I tried to play the video from SC card, USB stick and the external HDD, but result is always the same.

As the video starts ok, I don’t believe that audio offset can help.

  • The issue you are currently experiencing with OSMC

After few seconds, audio is ahead of the video (out of the synchronization)

  • What you were doing when this issue occurred

I have played the local video file.

  • Whether you can replicate this issue on demand. If you can, then please
    provide some steps on how an OSMC developer can reproduce the same issue.

It is replicable on the demand. In order to get the error, I just have to play
this video.

  • The device you are currently running OSMC on

RPI2

  • What peripherals are attached to the device?

External 3,5” drive (powered), and an USB stick.

  • Has this issue been introduced by a new version of OSMC? When did the issue
    first appear and can you recall a time when it was not present?

I had a problem to play files of the same type as the sample video before.

Sample video is on https://dl.dropboxusercontent.com/u/17084525/2015-10-09_131301.m2ts

Logs are here: http://paste.osmc.io/ulawigolam

I would really want to know what is the problem.
All other video types RPI2 is playing with no problem at all.

Regards.

Is the video mpeg2 ? (It looks that way from the extension)

If so, I notice you don’t have the mpeg2 codec license installed. This means that regardless of what settings you choose for omxplayer or dvdplayer the Pi will be trying to software decode the video and will most likely not be able to keep up.

If it is mpeg2 then buy the mpeg2 codec from the Pi foundation and install it and that should fix your issue.

The video is h.264, so the licence won’t help. The problem is the video is 1080p50.

@kriticar can you remove “core_freq=450” from config.txt and try again?

After removal of the “core_freq” option from config.txt, m2ts videos are playing fine regardless of the player. Thank you very very much for this tip.
I am not familiar with that option but it looks like that was the problem.
Does removal of this option have some drawbacks?

I have done tests on other videos but more thoroughly with debugging on.
The videos are now synchronized, but still they are missing sound from time to time.

Debug for sample video is now on http://paste.osmc.io/erimitecim
You can see that there are many lines with error word in it.

Furthermore, I have rebooted the RPI2 and started another debugging session with slide show.
My slide show setup will show all pictures and video recursive and random.

Slide show log is here: http://paste.osmc.io/umesiquhas

The sound stopped for a second at kodi.log lines:

12:55:26 344.914856 T:1567384608   DEBUG: CDVDPlayerAudio::HandleSyncError - average error -1879785.510216 above threshold of 200000.000000
12:59:00 559.454163 T:1667757088   DEBUG: CDVDPlayerAudio::HandleSyncError - average error -2882704.709533 above threshold of 200000.000000

Basically whenever there is CDVDPlayerAudio::HandleSyncError - average error line in the kodi.log, the sound is missing for a second, but aftewards it is synchronized again.

I really don’t get it. :frowning:

So when omxplayer is enabled do you get the audio dropouts? Can you disable “adjust display refresh rate to match video” and report if you still get dropouts?

If we are talking about Settings > Video > Playback, there is an option “adjust display refresh rate” which is set to off.
There is an option “sync playback to display” beneath it which is turned on.

Can you please give to me a path to the option?

Check here: http://kodi.wiki/view/Raspberry_Pi_FAQ#Audio_or_video_dropouts_on_HDMI

The last log had dozens of videos being played and debug logging was disabled.
Can you capture a log with debug enabled, ideally with a single video being played, and report how many minutes/seconds into the video it was when dropout occurred.

Test with omxplayer enabled/disabled.
Test with “adjust display refresh rate” enabled/disabled.
Test with “sync playback to display” enabled/disabled.
Add the config_hdmi_boost=7 setting to config.txt

and report if any changes affect it.