kodi 18.4 on RPi4 audio video sync problems on mythtv
#1
I just saw that there is a Kodi 18 for Raspberry pi 4 and I installed it on my RP4 on Raspbian Buster per the posted instructions. I added the kodi-pvr-mythtv as I normally would and it seems to work and connect, but even from the start the audio is way ahead of the video and not in sync by many seconds.

Any idea where to look for this issue? I did not have this issue on RP3B+ with Kodi 18 and mythtv-pvr addon.  But this time I'm using my mythtv backend on the RP4 instead of remotely.
Reply
#2
Reproduce the problem and post kodi debug log: https://kodi.wiki/view/Log_file
And does it happen also with the remote mythtv backend?
Reply
#3
(2019-10-03, 22:48)rascas Wrote: Reproduce the problem and post kodi debug log: https://kodi.wiki/view/Log_file
And does it happen also with the remote mythtv backend?
Reply
#4
the problem occurs regardless of local or remote backend.

Log file
https://paste.kodi.tv/texezigopu
Reply
#5
Which insctructions did you followed exactly ? I suggest that you remove your Kodi version and try this:
https://www.raspberrypi.org/forums/viewt...6&t=251645
Make sure you install kodi-pvr-mythtv from that repo too.
Reply
#6
(2019-10-04, 01:10)rascas Wrote: Which insctructions did you followed exactly ? I suggest that you remove your Kodi version and try this:
https://www.raspberrypi.org/forums/viewt...6&t=251645
Make sure you install kodi-pvr-mythtv from that repo too.
You referenced instructions are a lot newer than what I followed.  Let me uninstall what I did and start over.
Reply
#7
Well I don't have a audio sync problem but I have many more bigger problems.

First a little explanation. my RP4 4GB is really a Mythtv Frontend/backend combo and works great at both. I record up to 4 ATSC HD (mpeg2) programs at once while watching a previously recorded program. For the most part mythtv frontend works but I can spot some issues with motion.  Usually on any computer I've tested Kodi always has better playback and is smoother.  I've been waiting for Kodi 18 to be available on Raspbian Buster for the RP4. 

So I got all the old kodi stuff purged and the new stuff installed per your referenced link. So when I launch Kodi it is very slow.  response to keyboard or mouse is measured in seconded.  When you finally get to a screen where one of the TV programs can be played, it is in lipsync, but jumpy. not near as smooth as a RP3 used as Kodi 18.4 frontend to a remote mythtv backend.
When I exit Kodi the system response returns and I can run mythtv frontend the same as before.

Any ideas??
Reply
#8
Post a new Kodi debug log. I also recommend that you start with default settings. For example, by close Kodi, moving/removing ~/.kodi and start it.
Reply
#9
(2019-10-04, 02:35)rascas Wrote: Post a new Kodi debug log. I also recommend that you start with default settings. For example, by close Kodi, moving/removing ~/.kodi and start it.
Log:
https://paste.kodi.tv/tojetivohi

I also removed the ~/.kodi directory , rm -r ~/.kodi

No difference at this point.
Reply
#10
(2019-10-04, 03:26)jfabernathy Wrote:
(2019-10-04, 02:35)rascas Wrote: Post a new Kodi debug log. I also recommend that you start with default settings. For example, by close Kodi, moving/removing ~/.kodi and start it.
Log:
https://paste.kodi.tv/tojetivohi

I also removed the ~/.kodi directory , rm -r ~/.kodi

No difference at this point. 
could CEC being disabled in the boot/config.txt file be a problem?
Reply
#11
Code:
2019-10-03 21:10:15.560 T:2972536112 NOTICE: GL_VENDOR = VMware, Inc.
2019-10-03 21:10:15.560 T:2972536112 NOTICE: GL_RENDERER = llvmpipe (LLVM 8.0, 128 bits)
2019-10-03 21:10:15.560 T:2972536112 NOTICE: GL_VERSION = OpenGL ES 3.0 Mesa 19.2.0-rc1
2019-10-03 21:10:15.560 T:2972536112 NOTICE: GL_SHADING_LANGUAGE_VERSION = OpenGL ES GLSL ES 3.00
This is your problem, for some reason it is using software rendering instead of hardware rendering. You should have something like this:

Code:
2019-10-04 02:55:48.636 T:2973342816  NOTICE: GL_VENDOR = Broadcom
2019-10-04 02:55:48.636 T:2973342816  NOTICE: GL_RENDERER = V3D 4.2
2019-10-04 02:55:48.636 T:2973342816  NOTICE: GL_VERSION = OpenGL ES 3.0 Mesa 19.2.0-rc1
2019-10-04 02:55:48.636 T:2973342816  NOTICE: GL_SHADING_LANGUAGE_VERSION = OpenGL ES GLSL ES 3.00
You should have a file named /etc/udev/rules.d/99-kodi.rules with the following:

Code:
SUBSYSTEM=="drm", GROUP="video", MODE="0660"
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"

Disabling CEC in config.txt shouldn't be a problem but try without that line.
Reply
#12
(2019-10-04, 04:11)rascas Wrote: You should have a file named /etc/udev/rules.d/99-kodi.rules with the following:

Code:
SUBSYSTEM=="drm", GROUP="video", MODE="0660"
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"

Disabling CEC in config.txt shouldn't be a problem but try without that line.
I have the 99-kodi.rules as you described.  Does the fact that the RPi4 has no hardware acceleration for Mpeg2 cause a problem? 
Also removing the CEC disable line had no affect.

What is a problem now is that every time I boot, the Menu panel at the top of the page is blank.  Some times the icons like the raspberry appear for a few seconds but have not effect when clicked.  This didn't happen until I installed Kodi.
Reply
#13
Kodi doesn't do any modification to LXDE, panel or anything like it, it doesn't use X server. Probably something that you removed, like explained above it looks like your system is using software rendering. Check your apt history log.
Reply
#14
(2019-10-04, 04:38)rascas Wrote: Kodi doesn't do any modification to LXDE, panel or anything like it, it doesn't use X server. Probably something that you removed, like explained above it looks like your system is using software rendering. Check your apt history log.
I'll build a new system tomorrow with just Raspbian buster and kodi. I'll setup a remote Mythtv backend connection before i build the local backend.
Reply
#15
So I started over I installed the latest Buster on my RPi4 4GB (2019-9-26), setup the system to use rootfs from USB3 SATA drive to increase speed of system.

Then I installed kodi per the link you gave above.  After kodi and kodi-pvr-mythtv were installed I tried running them without rebooting.  The keyboard response time was seconds for each keystroke. After I rebooted that was fixed, but I still had audio/video sync issues like the hardware acceleration was not being used.

Logfile below:
logfile

The udev rules file is as below:
 
SUBSYSTEM=="drm", GROUP="video", MODE="0660"
SUBSYSTEM=="tty", KERNEL=="tty[0-9]*", GROUP="tty", MODE="0660"
Reply

Logout Mark Read Team Forum Stats Members Help
kodi 18.4 on RPi4 audio video sync problems on mythtv0