Audio and Video stutter when playing TrueHD movies

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
mtbdrew
Junior
Posts: 90
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Audio and Video stutter when playing TrueHD movies

Post by mtbdrew » Wed Dec 30, 2020 10:41 pm

Hello,

Regular 1080 video at 24
I am seeing major stutter when trying to play Atmos enabled movies regardless if they are 5.1 or 7.1 audio. I am using a Nvidia GT 630 HDMI connection to Yamaha TSR-700 receiver. Passthrough is enabled on remote frontend. During the stutter the receiver display shows decoder off for a spit second before the DTHD returns. I have tried changing the buffer to 3072 but this didn't help however 4096 does make a difference. The video becomes more stable and the decoder off message is not seen on the receiver. Unfortunately the audio is still dropping out and there is still a slight stutter on the video.

Questions:

1) Is there anyway to make the buffer size permanent?

2) Would upgrading the video card make a difference?

Any other suggestions welcome.

Thanks

mtbdrew
Junior
Posts: 90
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Re: Audio and Video stutter when playing TrueHD movies

Post by mtbdrew » Thu Dec 31, 2020 6:20 pm

Should have given some system details:

OS: Ubuntu 20.04

Mythtv 31 remote frontend

full gigabit network connection between nas, backend and, frontend

Intel Celeron CPU N3150@1.6GHx x 4
8GB

GT 630 rev 2 with 1GB (GK208) Current driver 455 but have tried 340 through 450

Audio is setup using the HDMI Nvidia device

Video is set up for VDPAU but have also tried the NVDEC with same issue seen

As stated HBR passthrough is enabled. If force force audio device output to 48KHz is selected then stutter in video/audio is not seen however, receiver shows PCM instead of DTHD.

User avatar
pgbennett
Developer
Posts: 426
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Audio and Video stutter when playing TrueHD movies

Post by pgbennett » Fri Jan 01, 2021 2:16 pm

I recommend increasing the audio read ahead.

In frontend - Setup -> Video -> Playback -> Advanced Playback Settings -> Audio Read ahead. Increase it to 1000 or 2000.

mtbdrew
Junior
Posts: 90
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Re: Audio and Video stutter when playing TrueHD movies

Post by mtbdrew » Sat Jan 02, 2021 1:27 am

Setting to 2000 has fixed the audio issues at least as far as my old ears can tell. There still seems to be a slight jitter in the video playback. Playback data shows an A/V sync slip of as much as -5ms. Available buffer seems to be steady at 100%.

mtbdrew
Junior
Posts: 90
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Re: Audio and Video stutter when playing TrueHD movies

Post by mtbdrew » Mon Jan 04, 2021 12:27 am

It is strange that i only see the A/V Sync -4ms slip with DTHD 6 or 8 channel audio. DTS-MA/DTS:X 6 or 8 channel audio gives a steady A/V Sync 0ms.

mtbdrew
Junior
Posts: 90
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Re: Audio and Video stutter when playing TrueHD movies

Post by mtbdrew » Mon Aug 23, 2021 9:05 pm

After latest upgrades to V31 this no longer works even when set to 2000ms there is a more noticeable jerkiness going on.

mtbdrew
Junior
Posts: 90
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Re: Audio and Video stutter when playing TrueHD movies

Post by mtbdrew » Thu Sep 09, 2021 2:54 am

The tic or jerkiness used to only be seen with 7.1 audio movies that used the Atmos but is now noticeable in all mkv movies played.

Added note - This is definitely an issue with the playback coding of v31, did not see this with v30. Upgraded the video card to a MSI GT 1030 2GB but it made no difference. I have performed a clean load of Ubuntu 20.04 and mythtv-frontend but the issue is still occurring. Tried all video profiles supported by my video card and issue is seen on all. Finally installed Kodi on this box as a control test to rule out the hardware, Kodi plays all mkv movies beautifully even the 7.1 Atmos and 7.1 DTS-MA.

mtbdrew
Junior
Posts: 90
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Re: Audio and Video stutter when playing TrueHD movies

Post by mtbdrew » Thu Sep 09, 2021 6:41 pm

Found a setting in Kodi that causes video playback to be the same as Mythtv-frontend. If I set "Adjust display refresh rate" to off, then I see the same tic or jitter in mkv video playback. However, when set to always, playback of the same movies are smooth.

I don't see any equivalent setting in Mythtv-frontend so I manually set the display resolution in Ubuntu settings to 23.98 Hz instead of 60 Hz and this clears up the playback in Mythtv-frontend. This begs the question, was there some change between v30 to v31 regarding the display sync function in video playback? Is there a setting somewhere that I now need to set or adjust that was not required in previous versions?

blm-ubunet
Senior
Posts: 174
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: Audio and Video stutter when playing TrueHD movies

Post by blm-ubunet » Thu Sep 09, 2021 10:47 pm

V31 uses avsync2 & removed original avsync code but that may not be the issue as you may have discovered.
All the playback stuff was totally revamped.
VDPAU & NVDEC high quality scaling is lost. This was mandatory when using 4K screen.

Mythtv has always been able to be setup to attempt to set refresh rate.
Need to set use Appearance / "Separate video modes for GUI & TV Playback"

Historically, Nvidia refresh rate control was & is a total mess. The code is awful. The old NVidia API did not support non-integer refreshrate names. So you had to name the modes 1080_24_1 & _24_2 & _60_1 etc and ensure the mapping was synchronised between driver & MythTV so it could determine which one to select. Never worked well. And I preferred to not use 24Hz modes.
So I have always manually switched video modes & used a patched version of old async code that was very good at playing all combinations.

Nvidia driver & API has supported true video-mode names for a while so this feature might work okay.

mtbdrew
Junior
Posts: 90
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Re: Audio and Video stutter when playing TrueHD movies

Post by mtbdrew » Sat Sep 11, 2021 12:45 am

Hello blm-ubunet,

Issue was not there in V30. Was there on my original 1080 Samsung television when I upgraded to V31 but only when playing 7.1 Atmos movies. After the latest two frontend software updates installed the issue has become worse as it now happens on all movie playback 5.1 non Atmos too.
I too prefer not to use a 24 Hz setting, that was just a troubleshooting step I tried while trying to figure out what was going on.
Kodi is using the same video card and Nvidia drivers so seems like a mute point to blame them.
Yes I have since upgraded to a 4K screen but was forced to set the display to a resolution of 1080 as both Kodi and MythTV kept flipping out randomly when moving between menu selections. Not a problem for me as I don't have any 4K material to play anyway.

"Mythtv has always been able to be setup to attempt to set refresh rate. Need to set use Appearance / "Separate video modes for GUI & TV Playback"" Yes I've seen this setting but never had to use it V30 and don't want this set for all media playback. Recordings made by the backend do not have the issue even though some play at 30Hz though the 720p 60 Hz shows tend to be a little fuzzy compared to the 1080i shows. However neither have the tic or jetter issue that the movies do.

blm-ubunet
Senior
Posts: 174
Joined: Sun Jun 15, 2014 1:08 am
Cambodia

Re: Audio and Video stutter when playing TrueHD movies

Post by blm-ubunet » Sat Sep 11, 2021 9:41 pm

Unfortunately, the developer who totally refactored the video playback decode rendering disappeared before polishing it..
I hope he returns in near future.

I don't know if there have been any significant changes to the playback engine in quite sometime.
PeterB was instrumental in the Avsync2 rework. This did seem to be the right way to do that (AIUI).

But if Kodi requires monitorrefreshrate - videoframerate matching to get jitter free playback.. why not use it in MythTV?

I believe MythTV tries to minimises the annoying slow refresh rate changes. I think you can set rules so you get the display refreshrate you want for specific video framerate. That's would have been the best setup.

The whole 24fps thing is a nonsense..
24p digital capture 100% aperture material does not look anything like mechanical film camera.
No one film maker wants to lose the low light performance of digital camera by halving the aperture to get the same temporal-spatial smearing/ sampling as film.
Peter Jackson was way ahead of his time.. capture at 48fps or higher & then the viewer can decide.

mtbdrew
Junior
Posts: 90
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Re: Audio and Video stutter when playing TrueHD movies

Post by mtbdrew » Tue Sep 14, 2021 9:10 pm

"But if Kodi requires monitorrefreshrate - videoframerate matching to get jitter free playback.. why not use it in MythTV?" I would if it was a single selection options in in Kodi. However it seems that in Mythtv I have to select use Appearance / "Separate video modes for GUI & TV Playback", then set a separate configuration for every refresh rate/resolution? So one for 720p, 1080p, 1080@24Hz and one for 1080@30Hz or is there an easier approach that I don't know about?

mtbdrew
Junior
Posts: 90
Joined: Tue Jul 22, 2014 1:10 pm
United States of America

Re: Audio and Video stutter when playing TrueHD movies

Post by mtbdrew » Wed Sep 15, 2021 1:05 am

Went ahead and tried setting a 1920x1080@23Hz using the method you mentions but though the video did seem to play a little smoother it was a mute point (literally) as sound for the movie didn't work.

Post Reply