Kodi Community Forum

Full Version: Audio drops
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

Since I am using my bitstream ability in XBMC I notice dropping connections.
Somtimes it was stopping from the image, but most of the times the audio just stops for a short period (receiver does not detect an audio track) and then it comes back again.

Currently I am searching to see if it is caused by network streaming. Tried ssh, samba and NFS, all the same problem.
Now I wil try to do it by an USB drive. If that also has the problem I can conclude for sure it is my HTPC.

Update:
I used the same movie, only played from an USB drive. Gues what, no glitches at all.
However what is strange is that the network is gigabit, capable of doing 14 megabyte hands down. A movi is like 7 megabyte.
Is this a problem on my HTPC that is cannot progress this data so fast...

With normal DTS and 5.1 I have no problems if I stream via the network

Network test:
Code:
htpc01:~ # iperf -s -p 65000
------------------------------------------------------------
Server listening on TCP port 65000
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[  4] local 192.168.178.18 port 65000 connected with 192.168.178.11 port 46617
[ ID] Interval       Transfer     Bandwidth
[  4]  0.0-10.0 sec  1.07 GBytes   921 Mbits/sec
[  5] local 192.168.178.18 port 65000 connected with 192.168.178.11 port 46624
[  5]  0.0-10.0 sec  1.08 GBytes   923 Mbits/sec

Shows that it could not be the structural network speed, I will look for a plotted longer period test to see if there are some strange drops
Okey, small update:

Memusage normal XBMC:
2051184 available
1691556 used
82,5 (percentage used)

When I have a ssh open to my htpc and i give a continues input (example in "top" push the arrow up button) then the sound drops immediately. After releasing the button the sound reappears.

So apparently it is not the Server which is causing issues, but it is pointed down to the HTPC itself.

The HTPC is running a complete KDE desktop with on top XBMC.
The mem in the htpc is 2gb
Swap is not in use, but is present

It has an atom proc D525 (Sapphire Edge HD2)
http://www.sapphiretech.com/presentation...id=1&leg=0

Your iperf output looks normal. You should benchmark how long it takes to copy a movie from your network share to your local drive. You should get at least a couple tens of megabytes per second to be on the safe side. Are you streaming from a NAS?
Copy from a mounted NFS Share:

Code:
┌──────────────────────── Copy ────────────────────────┐
│ Source                                               │
│ _______________________.iso                          │
│ Target                                               │
│ /root/Download/Test/_______________________.iso      │
│    [                                        ]  26%   │
│ ETA 0:18.09 (27.86 MB/s)                             │
│                                                      │
│                  [ Skip ]  [ Abort ]                 │
└──────────────────────────────────────────────────────┘

Copy from a SMB share (same file):

Code:
┌──────────────────────── Copy ────────────────────────┐
│ Source                                               │
│ _______________________.iso                          │
│ Target                                               │
│ /root/Download/Test/_______________________.iso      │
│    [                                        ]  26%   │
│ ETA 0:18.09 (9.04 MB/s)                              │
│                                                      │
│                  [ Skip ]  [ Abort ]                 │
└──────────────────────────────────────────────────────┘

But what surprises me more is the activity of XBMC during standby (no music or movie is played:
Resource status: CPU 100%
Memory status: 650Megabyte of 2Gigabyte

About the cpu, what is left of CPU power goes to XBMC, I see it fluctuating between 25% to 75% (other processes take 25% (xorg, kwin, ksysguard)
I have vdpau enabled and the nvidia driver is loadedHuh
Later I will check to see when I am using SMPlayer if a movie is just using the 20% CPU, coz then I at least know IF something is incorrect in the config of XBMC.
SMPlayer: 13% CPU - VDPAU
XBMC - Movie: 85% CPU - VDPAU questionHuh?
XBMC - No Movie: 27% CPU - VDPAU questionHuh?


SMPplayer (same movie as XBMC, only no DTS output since smplayer is not capable of doing that):
Code:
top - 14:59:33 up  5:13,  4 users,  load average: 0.75, 0.94, 1.77
Tasks: 127 total,   1 running, 126 sleeping,   0 stopped,   0 zombie
%Cpu(s): 19.0 us,  6.2 sy,  0.0 ni, 73.0 id,  0.0 wa,  0.0 hi,  1.7 si,  0.0 st
KiB Mem:   2051184 total,  1922936 used,   128248 free,    16144 buffers
KiB Swap:  4192252 total,       32 used,  4192220 free,  1317068 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
3055 htpc01    20   0  345m  76m  26m S  11.9  3.8   0:49.21 mplayer2
1687 htpc01    20   0  636m  85m  51m S   8.6  4.3  20:48.36 kwin
1366 root      20   0  154m  56m  29m S   3.3  2.8   8:57.98 Xorg
3040 htpc01    20   0  434m  49m  30m S   1.0  2.5   0:16.24 smplayer2
    8 root      -2   0     0    0    0 S   0.3  0.0   0:03.15 rcu_kthread
2861 root      20   0     0    0    0 S   0.3  0.0   0:27.79 kworker/u:24
3051 root      20   0     0    0    0 S   0.3  0.0   0:00.85 kworker/0:0
3104 root      20   0 17924 1612 1144 S   0.3  0.1   0:03.58 top
3105 root      20   0 96656 4300 3144 S   0.3  0.2   0:31.65 sshd
3163 root      20   0 17936 1632 1148 R   0.3  0.1   0:00.33 top

XBMC (same movie with DTS hd output):
Code:
top - 15:17:43 up  5:31,  4 users,  load average: 2.82, 1.16, 1.12
Tasks: 128 total,   2 running, 126 sleeping,   0 stopped,   0 zombie
%Cpu(s): 50.0 us, 40.8 sy,  0.0 ni,  0.0 id,  0.0 wa,  0.0 hi,  9.2 si,  0.0 st
KiB Mem:   2051184 total,  1909736 used,   141448 free,    15856 buffers
KiB Swap:  4192252 total,       32 used,  4192220 free,  1222620 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
3214 htpc01    20   0 1105m 190m  53m S  85.0  9.5   0:57.54 xbmc.bin
1687 htpc01    20   0  640m  85m  51m R   9.2  4.3  22:29.09 kwin
1366 root      20   0  141m  51m  24m S   2.6  2.6   9:34.70 Xorg
2861 root      20   0     0    0    0 S   1.0  0.0   0:29.90 kworker/u:24
3104 root      20   0 17924 1612 1144 S   0.7  0.1   0:11.58 top
3105 root      20   0 96656 4300 3144 S   0.3  0.2   0:33.40 sshd
3163 root      20   0 17936 1632 1148 R   0.3  0.1   0:04.97 top
    1 root      20   0 43676 4356 2000 S   0.0  0.2   0:01.26 systemd
    2 root      20   0     0    0    0 S   0.0  0.0   0:00.00 kthreadd
    3 root      20   0     0    0    0 S   0.0  0.0   0:00.02 ksoftirqd/0
    5 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 kworker/0:0H
    7 root       0 -20     0    0    0 S   0.0  0.0   0:00.00 kworker/u:0H

XBMC No movie:
Code:
top - 15:16:28 up  5:30,  4 users,  load average: 0.57, 0.55, 0.94
Tasks: 128 total,   2 running, 126 sleeping,   0 stopped,   0 zombie
%Cpu(s): 34.9 us,  9.1 sy,  0.0 ni, 44.6 id,  0.3 wa,  0.0 hi, 11.1 si,  0.0 st
KiB Mem:   2051184 total,  1910988 used,   140196 free,    15328 buffers
KiB Swap:  4192252 total,       32 used,  4192220 free,  1312484 cached

  PID USER      PR  NI  VIRT  RES  SHR S  %CPU %MEM    TIME+  COMMAND
3214 htpc01    20   0  983m 101m  48m R  27.0  5.1   0:13.38 xbmc.bin
1687 htpc01    20   0  640m  85m  51m S  19.1  4.3  22:17.81 kwin
1366 root      20   0  141m  51m  24m S   5.6  2.6   9:31.16 Xorg
2861 root      20   0     0    0    0 S   0.7  0.0   0:29.35 kworker/u:24
    8 root      -2   0     0    0    0 S   0.3  0.0   0:03.93 rcu_kthread
3104 root      20   0 17924 1612 1144 S   0.3  0.1   0:11.28 top
3105 root      20   0 96656 4300 3144 S   0.3  0.2   0:33.28 sshd
3163 root      20   0 17936 1632 1148 R   0.3  0.1   0:04.64 top
3183 root      20   0     0    0    0 S   0.3  0.0   0:00.12 kworker/0:0
Have you made sure that the VPDAU codec is actually being used when you play movies? (see the codec info OSD).

About the transfer speeds, it looks like you should be using NFS if you can, although there's definitely something wrong with your server/NAS because you should be getting way better speeds (unless you use some old USB drives).
I don't think it is my server, copying to windows goes with 50megabytes per second, same file.
So it is limited to the HTPC.

Btw how or where should I see this, during a movie pressing on "i" for info is never saying vdpau??
However in the config menu I enabled vdpau and vaapi!

But this is probably not enough or...

Update 22:07:
After a start of XBMC out of KDE and direct starting a movie (bluray) I get a proc usage of 35 percent. After switching to an other bluray I get 85% after switching back to the first bluray which gave me 35 percent this one also rises to 80+ percent.
Seems there is something strange with XBMC!!!
Can it be something wrong with XBMC?

I will at leats build the latest GIT tonight (Currently I am on the first GIT RC of Frodo)
Code:
From https://github.com/xbmc/xbmc
   4b21225..14689e2  master     -> origin/master
From https://github.com/xbmc/xbmc
* [new tag]         Frodo_rc2  -> Frodo_rc2
First, rewinding head to replay your work on top of it...
Fast-forwarded master to 14689e236b72348cae153b0fb755a0aae500ea0b.

Going to test latest XBMC first, this GIT sounds interesting
https://github.com/xbmc/xbmc/commit/7826...43b02fd7f6
You should bring up the OSD that contains a lot of technical information. Somewhere on the right side there's a piece of text starting with "dc:" (I think, could be "vc:"). The text after it should contain "vdpau" if VDPAU is actually being used.

Are you certain you have the correct drivers installed (you'll need Nvidias proprietary drivers in order to use VDPAU). Also make sure you have compiled XBMC with VDPAU support (if you didn't compile it yourself this is probably not the issue).
XBMC is with VDPAU support,
It shows during the compilation (did double check last night during config phase of new build)

NVidia drivers are correct installed 310.19 (otherwise I could not use them in MPlayer.
Going to test version latest GIT now.

Code:
configure: creating ./config.status
install prefix            /usr/local
source path               .
C compiler                /usr/bin/ccache gcc
ARCH                      x86 (generic)
big-endian                no
runtime cpu detection     yes
yasm                      yes
MMX enabled               yes
MMX2 enabled              yes
3DNow! enabled            yes
3DNow! extended enabled   yes
SSE enabled               yes
SSSE3 enabled             yes
AVX enabled               yes
CMOV enabled              yes
CMOV is fast              yes
EBX available             yes
EBP available             yes
debug symbols             yes
strip symbols             yes
optimize for size         no
optimizations             yes
static                    no
shared                    yes
postprocessing support    yes
new filter support        yes
network support           yes
threading support         pthreads
safe bitstream reader     yes
SDL support               yes
Sun medialib support      no
libdxva2 enabled          no
libva enabled             yes
libvdpau enabled          yes
AVISynth enabled          no
frei0r enabled            no
gnutls enabled            no
libaacplus enabled        no
libass enabled            no
libcdio support           no
libcelt enabled           no
libdc1394 support         no
libdirac enabled          no
libfaac enabled           no
libgsm enabled            no
libmodplug enabled        no
libmp3lame enabled        no
libnut enabled            no
libopencore-amrnb support no
libopencore-amrwb support no
libopencv support         no
libopenjpeg enabled       no
libpulse enabled          no
librtmp enabled           no
libschroedinger enabled   no
libspeex enabled          no
libstagefright-h264 enabled    no
libtheora enabled         no
libutvideo enabled        no
libv4l2 enabled           no
libvo-aacenc support      no
libvo-amrwbenc support    no
libvorbis enabled         no
libvpx enabled            no
libx264 enabled           no
libxavs enabled           no
libxvid enabled           no
openal enabled            no
openssl enabled           no
zlib enabled              yes
bzlib enabled             yes

Code:
config.status: executing depfiles commands

====================================
  XScreenSaver support      :  no
  PNG image support         :  yes
  OGG Vorbis sound support  :  no
------------------------------------
  Enabled screensavers:
  - Cyclone                 :  no
  - Euphoria                :  yes
  - Field Lines             :  no
  - Flocks                  :  no
  - Flux                    :  no
  - Helios                  :  no
  - Hyperspace              :  no
  - Lattice                 :  no
  - Plasma                  :  yes
  - Skyrocket               :  no
  - Solar Winds             :  yes
====================================

Code:
------------------------
  XBMC Configuration:
------------------------
  Debugging:    Yes
  Profiling:    No
  Optimization: Yes
  SWIG Available:       Yes
  JRE Available:        Yes
  Doxygen Available:    Yes
  Crosscomp.:   No
  target ARCH:  no
  target CPU:   no
  OpenGL:       Yes
  ALSA:         Yes
  DBUS:         Yes
  VDPAU:        Yes
  VAAPI:        Yes
  CrystalHD:    No
  VDADecoder:   No
  VTBDecoder:   No
  OpenMax:      No
  Joystick:     Yes
  XRandR:       Yes
  GOOM:         No
  RSXS:         Yes
  ProjectM:     Yes
  Skin Touched: No
  X11:          Yes
  Bluray:       Yes
  TexturePacker:Yes
  MID Support:  No
  ccache:       Yes
  ALSA Support: Yes
  PulseAudio:   No
  HAL Support:  No
  DVDCSS:       Yes
  Google Test Framework Configured:     No
  Avahi:        Yes
  Non-free:     Yes
  ASAP Codec:   No
  MySQL:        Yes
  Webserver:    Yes
  libssh support:       Yes
  libRTMP support:      Yes
  libsmbclient support: Yes
  libnfs client support:Yes
  libafpclient support: No
  AirPlay support:      Yes
  AirTunes support:     No
  UPnP support:         Yes
  Optical drive:        Yes
  libudev support:      Yes
  libusb support:       No
  libcec support:       No
  libmp3lame support:   Yes
  libvorbisenc support: Yes
  libcap support:       Yes
  additional players:   No
  External FFmpeg:      No
  PVR add-ons:          Yes
  prefix:       /usr
------------------------

Oh and btw you mean "On-Screen Video Diagnostics":
Code:
On Screen Video Diagnostics, or Codec Info, can be displayed when a video is playing by pressing 'o', or the corresponding control on your remote.

Will be back in a 30 mins
Okey, good update:
VDPAU is working.

Update of XBMC did not solve the problem, but what was more surprising I had no problems when I sued my Logitec Dinovo Mini, but when I used my ipod with XBMC "official Remote" the CPU went through the sky. AFter shutdown only using the logitech went fine, no CPU higher than 35% when playing in full HD and DTS HD. (No stuttering or whatever)

To later test again, first switch with the remote IPOD made the CPU go nuts again. As a result I installed Constailation again. On my IPOD and checked with the alternative remote, and what happens ----- all went fine and still low CPU.

So I am almost 100% sure of the fact that it is the App. For the moment I will test with Constail. Any Idea if I need to file a report on the app forum?

FurthermoreI change from samba to NFS since it is faster and minimizes chances on disruption 5mb versus 50mb Wink
That's great. I think the screen I was talking about was "On Screen Video Diagnostics" yes (I don't have XBMC near me during the holidays so I can't check).
OKey, I deff found the problem.

Since I rebuilded all my databases again (NFS Smaba, grrrr...) took a while before I could really test again.
So I was playing with my keyboard (dinovo and everything went OK whole afternoon).

Then I thought lets just test step by step. So I let the xbmcremote app connect. And what did I see.... An immediate raise of my CPU with 40% (max it could get) it became a total of 80% and slugish again.
Restarted XBMC problem solved again.

So it should be the app. Btw I also see a big data tranfer on iptraf (not sure about that, but something is not ok in the app). Constailation is working fine.

Ps. I make this a cross post for the developer of xbmc remote app since I like the app.
http://forum.xbmc.org/showthread.php?tid=128279&page=73