[1] 2 >>> MLD-5.x / Systems / Raspberry PI / [MLD-5.5 testing] RPI4 frame drop and audio stuttering
 

Offline chaseadam

  • Newbie
  • *
  • Posts: 8
    • View Profile
tldr; Live TV displays, heavy frame dropping and occasional blanks. Audio from headphones is "low" (e.g. playing slow) and crackly and only out of one channel.

Excited to have just discovered VDR and then this project shortly after. Originally I thought it was rpi3 only (because stable does not include rpi4 yet). I got everything set up on rpi3 just to realize I need the mpeg2 license to play my ATSC (United States) channels. Shortly after I looked at the testing channel and saw a rpi4 option and happy to help with the testing process!

Burned and installed (only VDR) from SD card: `dd if=MLD-5.5_netinstall_2021.09.25-182.2+1617_armhf-rpi4.img bs=1M of=/dev/sdi`

Ran w_scan to generate the channels file in /etc/vdr/channels/ (thanks for including w-scan in in the package repository)

I had to switch sound settings to get vdr to start due to an error (because my monitor doesn't offer an audio channel?)

```
AlsaOpenPCM: playback open 'plug:iec958' error: No such file or directory
```

Live TV displays now, but heavy frame dropping and occasional blanks. Audio from headphones is "low" (e.g. playing slow) and crackly and only out of one channel.
From my previous experience, my hypothesis is there is an audio issue causing this behavior. Any debugging guidance is appreciated.
 
Possibly useful information: Recordings in `/data/tv/` are good and play without issue with VLC on desktop. Download speeds were not great (6-8MB/sec) but may be SD card limited?

MLD> uptime
 16:52:40 up 28 min,  load average: 4.63, 3.85, 2.94

I have heat sinks and a fan
MLD> vcgencmd measure_temp
temp=48.2'C

MLD> free
             total       used       free     shared    buffers     cached
Mem:       1666912    1587268      79644        588       2076    1297956
-/+ buffers/cache:     287236    1379676
Swap:            0          0          0
MLD> tvservice -s
state 0x120009 [HDMI CEA (16) RGB lim 4:3], 1920x1080 @ 60.00Hz, progressive

Offline gr4vity

  • Expert Member
  • *****
  • Posts: 604
    • View Profile
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #1 on: November 17, 2021, 17:32:03 »
Hi,

Welcome to the forum  :)
Which DVB stick, power adapter you're using?
Are you able to use satip and see if you still experience the same issue?

Best Regards.

Offline chaseadam

  • Newbie
  • *
  • Posts: 8
    • View Profile
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #2 on: November 17, 2021, 18:45:19 »
Thanks for the warm welcome!

Tuner card is WinTV-HVR-950Q USB based (tried plugged into USB3 and USB2 ports).

[   65.376483] au0828: Enabled Source: Xceive XC5000->Auvitek AU8522 QAM/8VSB Frontend->Auvitek AU8522 QAM/8VSB Frontend Ret 0
[   68.494484] xc5000: Firmware dvb-fe-xc5000-1.6.114.fw loaded and running.
[   68.495792] au0828: Disabled Source: Xceive XC5000->Auvitek AU8522 QAM/8VSB Frontend->Auvitek AU8522 QAM/8VSB Frontend Ret 0

Using rpi official OEM adapter (and there is solid red light)

Installed satip plugin with `apt install vdr-plugin-satip` but didn't see anything pop up on the network. Any other steps needed?

After install I rebooted and got smooth playback and normal audio output but only from one channel.  This is not reliably reproducible, but happened more than once.

When it was smooth/working, I changed channels (one up and back) and no video plays with the following in /var/log/messages (last one repeated a large number of times:

```
Nov 17 18:41:49 MLD-rpi4 user.err vdr: audio/alsa: set params error: File descriptor in bad state
Nov 17 18:41:50 MLD-rpi4 user.err vdr: audio: snd_pcm_drop(): Input/output error
Nov 17 18:41:50 MLD-rpi4 user.err vdr: audio: snd_pcm_prepare(): Input/output error
Nov 17 18:41:52 MLD-rpi4 user.err vdr: audio: snd_pcm_drop(): Input/output error
Nov 17 18:41:52 MLD-rpi4 user.err vdr: audio: snd_pcm_prepare(): Input/output error
Nov 17 18:41:52 MLD-rpi4 user.err vdr: audio/alsa: set params error: File descriptor in bad state
Nov 17 18:41:53 MLD-rpi4 user.err vdr: audio/alsa: snd_pcm_avail_update(): Input/output error
Nov 17 18:41:53 MLD-rpi4 user.err vdr: audio/alsa: snd_pcm_avail_update(): Input/output error
Nov 17 18:41:53 MLD-rpi4 user.err vdr: audio/alsa: snd_pcm_avail_update(): Input/output error
Nov 17 18:41:53 MLD-rpi4 user.err vdr: audio/alsa: snd_pcm_avail_update(): Input/output error
Nov 17 18:41:53 MLD-rpi4 user.err vdr: audio/alsa: snd_pcm_avail_update(): Input/output error
...
```

Offline gr4vity

  • Expert Member
  • *****
  • Posts: 604
    • View Profile
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #3 on: November 17, 2021, 19:08:08 »
Hi,

In order for satip to work you need to have a satip server that runs either under Windows/Linux.
The idea is you will connect your DVB stick to your pc and watch channels on your Rpi.

By the way, i think vdr-plugin-softhddevice-drm ​is still in the experiemental phase, i experience such issues from time to time as well.

Best Regards.

Offline chaseadam

  • Newbie
  • *
  • Posts: 8
    • View Profile
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #4 on: November 17, 2021, 19:22:14 »
By the way, i think vdr-plugin-softhddevice-drm ​is still in the experiemental phase, i experience such issues from time to time as well.

Can you clarify with the "such issues"? I presume it is the audio and excessive frame dropping.

Does stable (5.4) use vdr-plugin-softhddevice-drm as well?

Can you confirm that 5.5 defaults to vdr-plugin-softhddevice-drm? Is there a way to use 5.5 (testing) without vdr-plugin-softhddevice-drm?
« Last Edit: November 17, 2021, 19:44:17 by chaseadam »

Offline chaseadam

  • Newbie
  • *
  • Posts: 8
    • View Profile
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #5 on: November 17, 2021, 23:19:59 »
Can you confirm that 5.5 defaults to vdr-plugin-softhddevice-drm? Is there a way to use 5.5 (testing) without vdr-plugin-softhddevice-drm?

It does default to "client" SHD which I believe is vdr-plugin-softhddevice-drm. There is a gstreamer option, but the installation appears to be in a bad state when selecting that option. There is no "VDR" application start nor is it listed in "Services" on the web ui.

Offline gr4vity

  • Expert Member
  • *****
  • Posts: 604
    • View Profile
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #6 on: November 18, 2021, 00:21:14 »
Hi,

Yes, SHD is vdr-plugin-softhddevice-drm.

I can't remember which problems i had using that plugin but i believe the audio wasn't stuttering and no frame dropping.

it's just sometimes I see the following in log

Code: [Select]
AudioGetClock: no hw delay
AudioGetClock: no hw delay
AudioGetClock: no hw delay
AudioGetClock: no hw delay
AudioGetClock: no hw delay
AudioGetClock: no hw delay

There is another plugin which called vdr-plugin-rpihddevice which was more stable but it doesn't work on Rpi4, it worked fine for me on Rpi3 though.

Best Regards.
« Last Edit: November 18, 2021, 16:48:57 by gr4vity »

Offline chaseadam

  • Newbie
  • *
  • Posts: 8
    • View Profile
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #7 on: November 19, 2021, 17:14:45 »
I was able to reproduce the same behavior with latestVDR and https://github.com/zillevdr/vdr-plugin-softhddevice-drm compiled on raspios x64. It appears to be an upstream issue, so will push up a level or start exploring non-drm plugin options. Thanks for streamlining the experience with VDR, hopefully we can figure out a fix upstream.

Offline chaseadam

  • Newbie
  • *
  • Posts: 8
    • View Profile
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #8 on: November 19, 2021, 19:21:22 »
Upstream issue filed with softhddevice-drm: https://github.com/zillevdr/vdr-plugin-softhddevice-drm/issues/7

Based on suggestions of using xine in https://minidvblinux.de/forum/index.php/topic,10209.msg81134.html, I tried out xine (outside of MLD) and it is working much more smoothly than softhddevice-drm. Will try using xine with MLD.

Offline gr4vity

  • Expert Member
  • *****
  • Posts: 604
    • View Profile
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #9 on: November 19, 2021, 20:21:45 »
Hi,

Yeah, the plugin to use is vdr-plugin-xineliboutput.

 As you read on the other thread i use it while doing other stuff like chatting on Whatsapp .. etc.

It works great with SD channels with minimum CPU usage , however sometimes you will notice CPU temperature is increasing with HD channels.

I dunno if it's possible to enable hardware aceleration in MLD,
Claus can answer that question though.

Best Regards.

Offline chaseadam

  • Newbie
  • *
  • Posts: 8
    • View Profile
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #10 on: November 29, 2021, 15:53:48 »
Per upstream project, the rpi4 does not have enough power to display HD content. https://github.com/zillevdr/vdr-plugin-softhddevice-drm/issues/7#issuecomment-976411089

Interesting that the xine output plugin appears to work, but my guess is that it has a lot of code to gracefully deal with 'insufficient' hardware for playback.

Marking solved.

Offline gr4vity

  • Expert Member
  • *****
  • Posts: 604
    • View Profile
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #11 on: November 30, 2021, 02:13:48 »
Not powerful enough with software decoding but it works well with hardware decoding.
Claus, if i installed Kodi package, will it support hardware decoding?

Best Regards.
« Last Edit: December 05, 2021, 07:32:10 by gr4vity »

Online clausmuus

  • Administrator
  • Expert Member
  • ********
  • Posts: 20118
    • View Profile
    • ClausMuus.de
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #12 on: November 30, 2021, 12:47:31 »
Hi,
yes Kodi use the hardware for decoding, like the softhddrm VDR Plugin also.
MLD 5.5 - Raspberry PI - 7" Touch TFT - Squeeze Play
MLD 5.5 - lirc yaUsbIR - OctopusNet - XFX GeForce 9300 mit Intel E3200 - 2GB RAM - 12TB HDD - Lian Li PC-C37B - Samsung LE40A559

Offline gr4vity

  • Expert Member
  • *****
  • Posts: 604
    • View Profile
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #13 on: November 30, 2021, 18:32:09 »
Hi claus,

Are you able to watch HEVC content with softhddrm?
I only get sound with black screen or inverted colors with the following error
Code: [Select]
VideoRenderFrame: error_flag or FRAME_FLAG_CORRUPT
VideoRenderFrame: error_flag or FRAME_FLAG_CORRUPT
VideoRenderFrame: error_flag or FRAME_FLAG_CORRUPT

I was looking for Kodi v19 for Rpi4, i found v17 in MLD search.
Are you going to upload v19 soon?

Best Regards.
« Last Edit: December 05, 2021, 08:03:13 by gr4vity »

Online clausmuus

  • Administrator
  • Expert Member
  • ********
  • Posts: 20118
    • View Profile
    • ClausMuus.de
[MLD-5.5 testing] RPI4 frame drop and audio stuttering
« Reply #14 on: November 30, 2021, 23:03:47 »
Kodi 19 is part of the kodi-stable package.
MLD 5.5 - Raspberry PI - 7" Touch TFT - Squeeze Play
MLD 5.5 - lirc yaUsbIR - OctopusNet - XFX GeForce 9300 mit Intel E3200 - 2GB RAM - 12TB HDD - Lian Li PC-C37B - Samsung LE40A559

[1] 2 >>> MLD-5.x / Systems / Raspberry PI / [MLD-5.5 testing] RPI4 frame drop and audio stuttering
 



Users Online Users Online

0 Members and 1 Guest are viewing this topic.