Audio sync problem after skipping
#1
I am using Kodi Isengard version with pvr.mythtv (Sources tarball for Kodi-15 Isengard), on Raspberry Pi 2

When playing a recording, if I use the forward and back arrows to skip commercials, the audio becomes unsynchronized. Lip-sync is incorrect. Stopping play and resuming fixes it, also switching from analog to digital audio and back to analog fixes it. Pausing does not help, when resuming it is still unsynchronized.

This problem also existed with the Helix version. It has got worse with isengard. With Helix it happened occasionally, but with Isengard it happens almost every time I skip.
Reply
#2
Hi @pgbennett , i have seen your issue posted before. Currently i'm afraid the root cause is in Kodi itself. If you haven't yet enable internal demuxing and have only channels providing mpeg-ts stream (that is the default for digital channel) then try to enable the demuxer provided with the addon: from the addon settings screen, in advanced tab. And let me know if it is better. Thanks
Reply
#3
Hi Janbar, thank you for the reply. I have tried that setting before, but I tried it again today to make sure. I set the "enable demux for mpeg-ts" option, and then restarted Kodi (because the addon said restart required). The problem with skip is still the same. After just 1 skip forward the audio sync is wrong.

I looked at the source for the mythtv pvr addon but I could not understand much. I was hoping to make it do the same thing that happens when you switch audio to digital and back after a skip, because that resynchronizes the audio. However it is not clear to me if that is possible.

I am going to check whether I can access my recordings through the Kodi videos using nfs to access the recording files directly, whether that would avoid this problem. The kodi PVR addon is fine for live TV because we do not do much skipping in that case.

Thank you for a great addon, thanks to your addon and mythtv I have got rid of all of the cable company adapters and I am watching everything through mythtv, saving a lot each month in cable company fees.

If there is anything I can do to help debug this or any other issue, let me know. If you suggest any work around or fix I can test it.
Reply
#4
I tested Kodi playing a mythtv recording directly from the MPG file via NFS. The audio sync problem happens there as well. It looks like Kodi has a problem with mpeg-ts files.
Reply
#5
Is your stream mpeg2 or h264?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#6
The stream is mpeg2 in an mpg file.
I tried converting to mpeg-ps (vob) format using ffmpeg and the same problem still happens.
If I convert to mkv format keeping mpeg2 encoding ( -acodec copy -vcodec copy -f matroska ) the problem is fixed, when watching from videos or from mythtv pvr addon. However running this for every recording would be extra overhead.
Reply
#7
Do you have the rpi mpeg2 codec purchased & installed?
If I have helped you or increased your knowledge, click the 'thumbs up' button to give thanks :) (People with less than 20 posts won't see the "thumbs up" button.)
Reply
#8
Yes - I do have that purchased and installed.
Reply
#9
If you use RPi , then probably the issue is linked with OMXPlayer. You could create a track ticket for Kodi. Unfortunately now i cannot reproduce it using a RPi because the motherboard of my myth 0.28, which i use to build and test commflag, has dead yesterday Sad. I ordered new one this morning and i could test it at the end of the next week.
Reply
#10
(2015-10-24, 12:10)janbar Wrote: If you use RPi , then probably the issue is linked with OMXPlayer.

In video/acceleration settings you can enable/disable omxplayer. Would be interesting information if that fixes it, or has no effect.
Reply
#11
I am using RPI 2.
I found that OMX player was already disabled and MMAL acceleration was enabled.
I tried disabling MMAL and enabling OMX. That still causes the same issues.
I tried disabling both MMAL and OMX. This way the video works ok and seems synchronized, but if I use left arrow to skip backward the video freezes on one frame. The audio keeps playing but the video is forever frozen until I press stop and resume play. Skip forward (right arrow) works and stays synchronized.

My workaround for now is to convert the recordings to mkv with a Mythtv user job using mkvmerge. This solves the problem but does take about three minutes in the myhtv backend after a recording, and I am not sure whether the high IO on the mythtv backend may cause a subsequent recording to fail if it tries to record while the mkvmerge is running.
Reply

Logout Mark Read Team Forum Stats Members Help
Audio sync problem after skipping0