LiveTV MPEG2 from Over-The-Air (OTA) audio stutter

I’m trying to find the old forums but it appears the link to them is dead as I think I faced something similar before.

I just migrated from Raspbmc 14.1 on my Raspberry Pi B+ to OSMC last night (September release). Yes, I did take a VERY long time to move on, but only because everything worked.

I’m now having issues with LiveTV (MPEG2) streaming from HDHOMERUN over the air (OTA) TV (I’m in Canada). The video displays fine, with a consistent audio cut out every 5 seconds or so.

I’ve searched the forums looking for what setting should be enabled or disabled.

Video Acceleration:
OMXPlayer: Video smooth, Audio cuts out.
MMAL: Video Choppy, Audio is fine

Deinterlace is set to Auto.

Disabling passthrough was the biggest help, but then no Dolby Digital going to the Samsung TV. My tvservice -a only has 2 channels displaying as well (PCM)

My TV will detect Dolby Digital (DD) and send it to my soundbar which is connected to my TV by optical. Disabling passthrough eliminates Dolby Digital and just says that PCM is being sent.

I’m not at home, so I’ll post again later with the logs, but I was just hoping to find a quick config setting or something. It’s been over a year since I’ve changed my set up! Clearly something has changed on the MPEG2 decoding side from LiveTV.

Everything else is fine. Am I missing a setting or something?

Do you have the MPEG2 codec installed?

Yes, I added the serial number for MPEG2. I can watch it, it’s only the Audio cutting out every 5 seconds that is wrong. Fiddling with all the setting (turning off Audio passthrough) fixes it.

So it looks like LiveTV will work if I set the following:

  1. disabling passthrough audio - which makes the audio out of sync, or
  2. enabling passthrough audio and NOT checking anything below it on, such as Dolby Digital. This is my solution.

tvservice -a
PCM supported: Max channels: 8, Max samplerate: 192kHz, Max samplesize 24 bits.

If I add hdmi_force_edid_audio=1 to config.txt, tvservice -a produces A LOT more, but it doesn’t change anything.

So for now, my solution is enabling passthrough audio and NOT checking anything below it on, such as Dolby Digital.
This post helped me: Audio Passthrough using TV to convert HDMI to Optical? - #13 by scrag

It’s too bad because it was working in 14.1 for over a year before I upgraded. To be fair, my Samsung SmartTV has received updates, and the Raspberry Pi and Kodi 15.2 are an update. So many changes to keep track of!

P.S. My SmartTV can play Dolby Digital and DTS, as I tested this using the Plex app from the Smart TV apps. The computer that runs the “Smart TV” is not part of the same system that allows Audio to passthrough. I hate TV manufacturers for doing this kind of nonsense.

The stutter is back! …

I had reverted to enabling passthrough and enabling that my TV supported “Dolby Digital (AC3) capable receiver” for the last month or 2. I was able to have Dolby Digital 5.1 passed through as my TV passed the signal properly.

Today, after the June update, I’ve had to uncheck the “Dolby Digital (AC3) capable receiver” under passthrough as the stutter came back. Unchecking resolves it, but I no longer have DD 5.1 audio played.

Also, this:

osmc@osmc:~/.kodi/temp$ tvservice -a
PCM supported: Max channels: 2, Max samplerate: 48kHz, Max samplesize 24 bits.

whereas before it was:
tvservice -a
PCM supported: Max channels: 8, Max samplerate: 192kHz, Max samplesize 24 bits.

My logs are here: http://paste.osmc.io/vojivakuqa
Specifically, I play the MPEG2 live tv at:

PVRManager - OpenLiveStream - opening live stream on channel ‘CIII-HD’
20:26:26 51.880894 T:2583688176 DEBUG: opening live stream for channel ‘CIII-HD’

Although to be honest, the problem could be anywhere. Any insight as what change occurred in the latest change for the audio?

FIX:

Disabling OMXPlayer, and Enabling MMAL in the Video Acceleration section seems to fix the stuttering audio. Audio passthrough and “Dolby Digital (AC3) capable receiver” are both enabled, and the DD 5.1 is passed through once more.

Video Acceleration Results:
OMXPlayer: Video smooth, Audio cuts out. (frame rate always at incorrect 25.00 instead of 29.97 at 1920x1080 or 59.940 at 1280x720)
MMAL: Video is fine, Audio is fine (frame rate is correct at 29.97 at 1920x1080 or 59.940 at 1280x720)

Deinterlace is on Auto. If somebody knows which Deinterlace is most lightweight, please let me know.

The main change in June update is sync “playback to display” is enabled by default.
You may want to try just changing it to disabled to get the same behaviour as May version.

1 Like

I’ll try it once I’m back home and report back.
Thank you.

That fixed it! Thank you.

Interestingly, OMXPlayer still displays a frame rate of 25 for any of my Live TV streams, whereas MMAL displays the correct frame rate (when I press ‘o’).

Which fix would you recommend? Turning off OMXPlayer acceleration, or turning off sync “playback to display”?

1 Like

OMXPlayer displays the non-deinterlaced framerate. MMAL displays the deinterlaced framerate.
They differ by a factor of 2, but you will be getting 50fps on the display in either case so there is no problem here.

2 Likes

Can’t thank you and the OP enough. I had the same problem and you fixed it :joy: . Created an account to say thank you.

Glad this thread helped you!

I have 2 raspberry pi 3’s and a seperate computer for recordings. I also have a silicon dust dual tv tuner for atsc broadcast tv I.e. A sorta cheap TiVo. My parents are ditching dish when I finish the mythTV box. It was stuttering and I didn’t know why. I put the mpeg codecs in it and it still didn’t fix it. Your rhread fixed my problem. As long as the problem exists you should include part of your thread and put it in the documentation.

Thanks,

Esp

I’m hoping we can bring back the pre-June (i.e. disabling sync playback to display) behaviour soon. It was causing some freezing with OSMC, particularly on Pi 1.

Sam

1 Like

I’ve been weirdly having the issue though in the PVR live tv section as compared to the hdhomerun addon when the setting is disabled. Is there a playback feature I need to disable in that as well (out of curiosity)?

Thanks,

Esp

(Edit) I tried the setting “Start playback minimized”, and it seems to have the same setting as the aforementioned setting in this thread. Weirdly enough, disabling it, fixes streaming from my backend i.e. no glitchyness and/or stuttering. Also theres no glitchyness when using the PVR specific live TV viewer.

(Edit #2) The ghosting is still happening but, not as frequently. I can’t figure out what differentiates Live TV and the hdhomerun addon.

(Edit #3) I fixed it by making the computer use the NIC rather than wifi. No problems now :smile: