Kodi Community Forum

Full Version: AV sync stutter and jitter
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm losing my mind with this one. Every 5 or 10 minutes (almost exactly 5 or 10 minutes, but mostly 5), my audio video stutters and has to resync with the audio. Here's the log. Depending on the media file, the errors change a little bit, but they all center around the avcodec, CPullupCorrection, and CALSADirectSound with broken pipes.

Help me XBMC forum...you are my only hope!

The last lines show the timing and problems:
Code:
14:36:18 T:2714758000 M:2931765248   DEBUG: CPullupCorrection: pattern lost
14:36:19 T:2714758000 M:2932146176 WARNING: Decode - avcodec_decode_video didn't consume the full packet. size: 1452, consumed: 0
14:36:19 T:2714758000 M:2932146176 WARNING: Decode - avcodec_decode_video didn't consume the full packet. size: 1487, consumed: 0
14:36:20 T:2714758000 M:2932146176   DEBUG: CPullupCorrection: detected pattern of length 1: 16683.33
14:36:23 T:2723150704 M:2932146176   DEBUG: CVideoReferenceClock: detected 1 vblanks, missed 19, refreshrate might have changed
14:36:23 T:2714758000 M:2932146176 WARNING: Decode - avcodec_decode_video didn't consume the full packet. size: 2692, consumed: 0
14:36:24 T:2714758000 M:2932154368   DEBUG: CPullupCorrection: detected pattern of length 1: 16683.33
14:41:23 T:2723150704 M:2930503680   DEBUG: CVideoReferenceClock: detected 1 vblanks, missed 20, refreshrate might have changed
14:41:25 T:2714758000 M:2930511872 WARNING: Decode - avcodec_decode_video didn't consume the full packet. size: 1300, consumed: 0
14:41:26 T:2714758000 M:2930511872   DEBUG: CPullupCorrection: detected pattern of length 1: 16683.33
14:51:23 T:2706365296 M:2928349184 WARNING: CALSADirectSound::GetSpace - get space failed. err: -32 (Broken pipe)
14:51:23 T:2706365296 M:2928349184   DEBUG: CDVDPlayerAudio:: Discontinuity - was:5254640618.482990, should be:5254393295.536119, error:-247322.946872
14:56:23 T:2723150704 M:2926174208   DEBUG: CVideoReferenceClock: detected 1 vblanks, missed 19, refreshrate might have changed
14:56:28 T:2714758000 M:2925539328 WARNING: Decode - avcodec_decode_video didn't consume the full packet. size: 3463, consumed: 0
14:56:29 T:2714758000 M:2925793280   DEBUG: CPullupCorrection: detected pattern of length 1: 16683.33
15:06:23 T:2723150704 M:2926706688   DEBUG: CVideoReferenceClock: detected 1 vblanks, missed 19, refreshrate might have changed
15:06:27 T:2714758000 M:2926579712 WARNING: Decode - avcodec_decode_video didn't consume the full packet. size: 2203, consumed: 0
15:06:27 T:2714758000 M:2926579712   DEBUG: CPullupCorrection: detected pattern of length 1: 16683.33

Here's the media info:
Code:
* * * MediaInfo Mac 0.7.36.0 file analysis report.
* * * MediaInfo Mac is ©2010 by Diego Massanti - http://mediainfo.massanti.com
* * * MediaInfoLib by Jerome Martinez - http://mediainfo.sourceforge.net
Created on: Oct 30, 2011 3:13:48 PM PDT
Report for file: NHL 2011 Oct 29 Bruins at Canadiens.mp4

General / Container Stream #1
    Total Video Streams for this File.................1
    Total Audio Streams for this File.................1
    Video Codecs Used.................................AVC
    Audio Codecs Used.................................AAC LC
    File Format.......................................MPEG-4
    Play Time.........................................1h 44mn
    Total File Size...................................1.56 GiB
    Total Stream BitRate..............................2 134 Kbps
Video Stream #1
    Codec (Human Name)................................AVC
    Codec (FourCC)....................................avc1
    Codec [email protected]
    Frame Width.......................................1 024 pixels
    Frame Height......................................576 pixels
    Frame Rate........................................59.940 fps
    Total Frames......................................376134
    Display Aspect Ratio..............................16:9
    Scan Type.........................................Progressive
    Color Space.......................................YUV
    Codec Settings (Summary)..........................CABAC / 4 Ref Frames
    QF (like Gordian Knot)............................0.057
    Codec Settings (CABAC)............................Yes
    Codec Settings (Reference Frames).................4
    Video Stream Length...............................1h 44mn 35s 169ms
    Video Stream BitRate..............................2 000 Kbps
    Video Stream BitRate Mode.........................VBR
    Bit Depth.........................................8 bits
    Video Stream Size.................................1.46 GiB (94%)
    Video Encoder.....................................x264 - core 116 r2074 2641b9e
    Video Encoder (Settings)..........................cabac=1 / ref=3 / deblock=1:0:0 / analyse=0x3:0x113 / me=hex / subme=5 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=1 / chroma_qp_offset=0 / threads=12 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / bluray_compat=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / open_gop=0 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=abr / mbtree=1 / bitrate=2000 / ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
    Date of Original Encoding.........................UTC 2011-10-30 00:16:43
Audio Stream #1
    Codec.............................................AAC
    Codec (FourCC)....................................40
    Audio Stream Length...............................1h 44mn 35s 584ms
    Audio Stream BitRate..............................128 Kbps
    Audio Stream BitRate Mode.........................VBR
    Number of Audio Channels..........................2
    Audio Channel's Positions.........................Front: L R
    Sampling Rate.....................................48.0 KHz
    Audio Stream Size.................................95.7 MiB (6%)
    Date of Original Encoding.........................UTC 2011-10-29 05:52:11
Something is stalling your system, start by checking the kernel log.
bobo1on Wrote:Something is stalling your system, start by checking the kernel log.
Thanks for the reply. I'm looking into the kernel log now, and I might have found something. I found a bunch of these:
Code:
[76264.108991] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[76564.109165] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[76864.109028] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[77164.112342] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[77464.108869] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[77764.112194] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[78064.112259] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[78364.112165] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[78664.112239] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[78964.108712] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[79264.112105] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[79564.112016] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[79864.112127] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[80164.108768] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin
[80464.112099] rtl8192c_common: Loading firmware file rtlwifi/rtl8192cfw.bin


If I'm reading the time stamp right, they are all separated by 300 seconds, and that's how often I get video dropoffs. I'm testing it right now, so it's too early to tell if this is the problem. But I'm crossing my fingers.
Reporting back in case anyone else stumbles on this thread. I disabled my wireless in the BIOS on my Shuttle and the video jitters seem to have vanished. If you're running Openelec on a Shuttle XS35GTv2 you may want to follow this issue on this thread.