video lagged, audio not lagged, only sometimes
#1
Hi,
I've got 2 raspberry pi 3 units. Both have the mythtv pvr client plugin running, mythtv backend running on an intel nuc. Everything seems to work great, I can see the listings, play recordings etc. My only remaining issue is, on certain recordings, playback video is kind of slow motion, but audio is not at all. After a few seconds, the video kicks back to sync, but slow motion again. This happens on both raspberry pi units. I have also noticed, when tuning in live tv, same thing happens, only on certain channels it seems. I'm not sure yet if it always happens on certain channels. When this problem happens, it is consistent with what recordings it happens on. That is, if I have the problem with a recorded show, I always have the problem, and vise versa for shows that work fine.
But, when I go to the mythbackend nuc, which also has the myth frontend installed, I can play these recorded shows just fine through the mythtv frontend on the box. So it's not in the video source, or how it was recorded. The problem happens on the RPi units only. So I started digging around the playback/hardware acceleration options, enabled everything, but still have the issue. I've looked at every playback option I think might have an effect, but nothing has helped. These videos are all recorded with the same codec/type of video (mpeg2 I think, I'm not sure). It seems like the RPi units are not hardware accelerating certain videos, or something. Anyone have a clue? I have a parallel mythtv backend/frontend setup I'm wanting to retire to clear up some room in our entertainment center, this is my only remaining issue and I can get rid of that other setup (I want to use the drives for something else too).

thanks
David J.
Reply
#2
Darn. I was afraid this would be a tough one. I think I'll just get another Nuc, and install kodi there, and if that doesn't work at least I can default back to running the myth frontend on it. Was just hoping for an all-in-one solution. If anyone has any bright ideas please post back.
Reply
#3
Have you purchased the license keys for MPEG2 decoding for the Pis? The Pi needs a license key included in its config.txt to enable hardware MPEG2 and/or VC1 decoding. They're not very expensive (£2.40/£1.20), but you need one for each device since it's tied to the processor serial number.

From the symptoms you're describing, that sounds exactly like what the problem is.

Some other things to try if that isn't the problem and you do have the licenses is to check whether the Pi has recognized the license key and enabled the hardware decoder. You can also try changing the setting for using pvr.mythtv's own MPEG demuxer.

If you're interested in other hardware acceleration options (for a variety of other codecs), you can check what options you have in the Video/Acceleration options in the settings. Double check that MMAL is active; depending upon what distro your Pi is running and how Kodi was built, you can also check out OMX acceleration (but you may need to install omxplayer first).
Reply
#4
MPEG2 is indeed what mythtv is using. I had no idea I had to purchase a license key. But the mystery is, why do some mythtv recordings play back fine? It is about 50/50, some do and some don't.
I'll try that. thanks
Reply
#5
prcameron thanks a lot, that was it. I've purchased a license and everything plays fine. I would have never figured that out.

Cheers,
David J.
Reply
#6
The reason it was only experiencing problems sometimes is because for smaller bandwidth streams (such as SD video), the Pi actually has to power to decode the MPEG2 in software. However, for higher bandwidth/resolution streams, the Pi does not have the power to decode them in realtime. I imagine the times when you did not notice any slowdown was when playing back non-HD streams, and the problems arose with HD streams.
Reply
#7
Or some of your tv stations are sending h.264, which rpi handles without an extra codec purchase
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

Logout Mark Read Team Forum Stats Members Help
video lagged, audio not lagged, only sometimes0