Posts: 21
Joined: Jun 2014
Reputation:
0
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.
Posts: 21
Joined: Jun 2014
Reputation:
0
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.
Posts: 21
Joined: Jun 2014
Reputation:
0
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.
Posts: 19,982
Joined: May 2009
Reputation:
452
nickr
Retired Team-Kodi Member
Posts: 19,982
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.)
Posts: 21
Joined: Jun 2014
Reputation:
0
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.
Posts: 19,982
Joined: May 2009
Reputation:
452
nickr
Retired Team-Kodi Member
Posts: 19,982
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.)
Posts: 21
Joined: Jun 2014
Reputation:
0
Yes - I do have that purchased and installed.
Posts: 21
Joined: Jun 2014
Reputation:
0
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.