Kodi Community Forum

Full Version: OpenELEC Testbuilds for RaspberryPi (Kodi 15.0) Part 2
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2015-05-24, 04:35)nickr Wrote: [ -> ]
(2015-05-24, 04:22)kisas Wrote: [ -> ]anyone can use Raspberry Pi2 as an airplay target?
Please, you only asked your question a couple of hours ago.

My apology, I saw more people posted here.


I have been working on this issue for 3 weeks. But I haven't figured it out. Tried many versions. Very frustrated. I hope at least I should know if anyone has successfully used airplay on their Raspberry Pi.
(2015-05-24, 04:37)wchick132 Wrote: [ -> ]
(2015-05-24, 04:22)kisas Wrote: [ -> ]anyone can use Raspberry Pi2 as an airplay target?

Yes, test only with iPad 3 with iOS 6, YouTube App is not working despite it shows AirPlay device is available. Also screen mirroring is not possible.

I guess the airplay codes on Raspberry XBMC is quite old. Hope someone can update it soon.
using #0523c , overclocked using kodi's recommended modest settings.

sample vid: https://drive.google.com/file/d/0B_5gfDC...sp=sharing

encode settings: 720p, constant quality 20, constant framerate, fast decode checked.

playback quality: video still stutters..though parts of the sample clip played a lot smoother compared to earlier builds..so there are improvements..

Code:
General
Unique ID                      : 198022446034507822211268262152806637225 (0x94F9BC6086990BE0C295D879ACE49EA9)
Complete name                  : C:\Users\admin\Desktop\dl\sample.mkv
Format                         : Matroska
Format version                 : Version 2
File size                      : 19.1 MiB
Duration                       : 1mn 0s
Overall bit rate               : 2 672 Kbps
Encoded date                   : UTC 2015-05-24T04:05:52Z
Writing application            : HandBrake 7217svn 2015052201
Writing library                : Lavf56.1.0

Video
ID                             : 1
Format                         : HEVC
Format/Info                    : High Efficiency Video Coding
Format profile                 : [email protected]
Codec ID                       : V_MPEGH/ISO/HEVC
Duration                       : 1mn 0s
Bit rate                       : 1 979 Kbps
Width                          : 1 280 pixels
Height                         : 688 pixels
Display aspect ratio           : 1.85:1
Frame rate mode                : Constant
Frame rate                     : 24.000 fps
Color space                    : YUV
Chroma subsampling             : 4:2:0
Bit depth                      : 8 bits
Bits/(Pixel*Frame)             : 0.094
Stream size                    : 14.2 MiB (74%)
Writing library                : x265 1.7:[Windows][GCC 4.9.0][64 bit]
Encoding settings              : wpp / ctu=64 / min-cu-size=8 / max-tu-size=32 / tu-intra-depth=1 / tu-inter-depth=1 / me=1 / subme=2 / merange=57 / no-rect / no-amp / max-merge=2 / temporal-mvp / no-early-skip / rdpenalty=0 / no-tskip / no-tskip-fast / strong-intra-smoothing / no-lossless / no-cu-lossless / no-constrained-intra / no-fast-intra / open-gop / no-temporal-layers / interlace=0 / keyint=240 / min-keyint=24 / scenecut=40 / rc-lookahead=20 / lookahead-slices=0 / bframes=4 / bframe-bias=0 / b-adapt=2 / ref=3 / no-weightp / no-weightb / aq-mode=1 / aq-strength=1.00 / cbqpoffs=0 / crqpoffs=0 / rd=3 / psy-rd=0.30 / rdoq-level=0 / psy-rdoq=0.00 / signhide / no-deblock / no-sao / no-sao-non-deblock / b-pyramid / cutree / rc=crf / crf=20.0 / qcomp=0.60 / qpmin=0 / qpmax=51 / qpstep=4 / ipratio=1.40 / pbratio=1.30
Default                        : Yes
Forced                         : No
Color primaries                : BT.709
Transfer characteristics       : BT.709
Matrix coefficients            : BT.709
Color range                    : Limited

Audio
ID                             : 2
Format                         : AC-3
Format/Info                    : Audio Coding 3
Mode extension                 : CM (complete main)
Format settings, Endianness    : Big
Codec ID                       : A_AC3
Duration                       : 1mn 0s
Bit rate mode                  : Constant
Bit rate                       : 640 Kbps
Channel(s)                     : 6 channels
Channel positions              : Front: L C R, Side: L R, LFE
Sampling rate                  : 48.0 KHz
Bit depth                      : 16 bits
Compression mode               : Lossy
Stream size                    : 4.58 MiB (24%)
Title                          : Surround
Language                       : Chinese
Default                        : Yes
Forced                         : No
Running #517 on my v2, I left it showing the EPG with debug logging enabled for a day, maybe a bit more and when I looked at it this morning, it was locked up and unresponsive, although the log still seems to be recognising the remote keypresses.

There's a lot of errors towards the end of the log, from around 22:03 last night, referring to

Tvheadend HTSP Client: pvr.hts - failed to write (Invalid argument)
Tvheadend HTSP Client: pvr.hts - failed to transmit

so maybe that's what brought it down, although perhaps Kodi could be made more robust so that a problem with TvH doesn't crash the whole thing. If they only fault is in TvH though, please let me know and I'll report it in the appropriate place.

The log came to 177MB, so I've zipped it down to 10MB and uploaded it here: https://drive.google.com/file/d/0B1fDI89...sp=sharing
HEVC decoding is better in #523c.

some previous videos that stutters are now smooth. Some continue to stutters but less if the bitrate is too high ( CRF < 22 for example ) CRF 23 seems to be the limit for my samples. I haven't try preset > medium, psy-rd and others settings yet but will take a look latter.

The cpu usage is also really lower with this version. When samples with previous version have cpu usage between 80 and 90% now it's rather between 65 and 80%.

I also see videos that stutters but have cpu usage under 85%. Perhaps some bottlenecks in the VPU or GPU ?
(2015-05-24, 05:49)kisas Wrote: [ -> ]
(2015-05-24, 04:35)nickr Wrote: [ -> ]
(2015-05-24, 04:22)kisas Wrote: [ -> ]anyone can use Raspberry Pi2 as an airplay target?
Please, you only asked your question a couple of hours ago.

My apology, I saw more people posted here.


I have been working on this issue for 3 weeks. But I haven't figured it out. Tried many versions. Very frustrated. I hope at least I should know if anyone has successfully used airplay on their Raspberry Pi.

Video doesn't work which has been known for a long time.
I can successfully send music to the pi2 via airplay from;
My nexus 5 (android 5.1.1) using the allstream app.
A relatives iPhone 6 (iOS 8) using the os' built in airplay

So it seems the issue is more on your end.
(2015-05-24, 05:54)kisas Wrote: [ -> ]I guess the airplay codes on Raspberry XBMC is quite old. Hope someone can update it soon.

These build use top-of-tree code. There is no newer airplay code.
Airplay should support music and videos from non-DRM sources.
This means no Youtube app (but youtube from safari is okay), and no mirroring.
(2015-05-24, 08:39)doveman2 Wrote: [ -> ]There's a lot of errors towards the end of the log, from around 22:03 last night, referring to

Tvheadend HTSP Client: pvr.hts - failed to write (Invalid argument)
Tvheadend HTSP Client: pvr.hts - failed to transmit

You'll need to run this past the tvheadend maintainer.
(2015-05-24, 04:57)Milhouse Wrote: [ -> ]See bcmstat results - this is a Pi2 with gpu_mem=320. On the first play of Sintel_1080p_27qp_24fps_1aud_9subs.mkv the GPU mem drops to 191MB but returns to 249MB when playback is stopped. When playback is started a second time, GPU mem now drops to 180MB. When playback is stopped a second time at 02:38:34, the reloc memory is reported as 661MB... This isn't reproducible 100% of the time, but I have seen it happen 3 or 4 times so far while testing #0523c.
Not caught it so far in my dev environment (after 10 start/stops).
If you get this state again, can you report output of:
Code:
vcgencmd cache_flush && vcdbg reloc
Run it twice to try to get a consistent result.

Also stop kodi and run those commands again. I'd like to know if the heap is permanently broken.
Try this hevc sample:
https://docs.google.com/uc?id=0B9YhsPfRT...t=download

I get some stutters and video artifacts (at the end of playback).

Encoded with ffmpeg-2.6.3 + libx265-1.6, crf=26, other settings at default.

No overclock.
(2015-05-24, 18:46)popcornmix Wrote: [ -> ]If you get this state again, can you report output of:
Code:
vcgencmd cache_flush && vcdbg reloc
Run it twice to try to get a consistent result.

Also stop kodi and run those commands again. I'd like to know if the heap is permanently broken.

I've run some more tests. It's not easy to reproduce the memory problem, but it is fairly easy to reproduce some sort of odd behaviour. Playing Sintel 720p for a few seconds - ie. stopping playback at 45 seconds when the fight starts - followed by Sintel 1080p for another 45 seconds, and possibly repeating playback of Sintel 1080p a second time will usually provoke some kind of problem - either unrealistic GPU mem > 600MB, a complete system freeze, or briefly frozen playback followed by very severe visual artefacts (blue/green pixelation). Quite often a system crash may occur when stopping playback once the pixelation is visible, either when stopping the video in which the pixelation first appeared, or a subsequent video.

If you see no problem after playing Sintel 1080p the first time (for 45 seconds), you'll almost certainly have problems playing it a subsequent time (either crash, or visual artefacts). Try Sintel 720p, Sintel 1080, Sintel 720, Sintel 1080 in that order (playing each for 10 seconds) and you should eventually experience abnormal behaviour.

Here's bcmstat showing GPU Mem at 705MB (@18:59:49) after alternating playback of Sintel 720p/1080p then finally terminating playback of Sintel 1080p at which point the GPU memory becomes abnormal.

These are the corresponding vcgencmd cache_flush && vcdbg reloc once the memory became abnormal, run three times: #1, #2, and #3 (in that order). The kodi.log - sorry, not debug - is here (note that the time in kodi is BST, or UTC+1, while the system time shown in bcmstat is UTC).

I then shut down kodi, and captured three more vcdbg reloc: #4, #5 and #6. bcmstat continued to show abnormal GPU memory after shutting down kodi.bin.

The above tests were performed with no overlock other than for sdhost, using this config.txt.

These are the two Sintel files I'm testing with:
Sintel 720p: Dropbox, 66MB
Sintel 1080p: Dropbox, 113MB
New OpenELEC Isengard build #0524: RPi / RPi2
(Supercedes previous build)

Code:
# uname -a
Linux rpi512 4.0.4 #1 Sun May 24 21:07:02 BST 2015 armv6l GNU/Linux

# vcgencmd version
May 23 2015 16:42:55
Copyright (c) 2012 Broadcom
version 29d1114a122b6ef70bdfb7d4db3dd28bdfc38ac2 (clean) (release)

# lsb_release
OpenELEC (Milhouse) - Version: devel-20150524210311-#0524-g4c12965 [Build #0524]

# vcdbg log msg 2>&1 | grep DTOK
001563.991: Kernel trailer DTOK property says yes

# Kernel device tree status: Enabled

Based on tip of OpenELEC master (4c129658, changelog) and tip of XBMC master (0f1aea5f, changelog) with the following modifications: Build Highlights:
  1. Various small changes
Build Details:
  1. OpenELEC:
    • libfslvpuwrap: update to libfslvpuwrap-1.0.58 (6b8df0b9)
    • imx-vpu: update to imx-vpu-5.4.28 (00ee931a)
    • firmware-imx: update to firmware-imx-3.14.28-1.0.0 (1d81a9fa)
    • udevil: update to udevil-0.4.4 (e7016aed)
    • udevil: fix build (ad3fb0cd)
    • xf86-video-intel: fix build (32b3cf43)
    • gdb: update to gdb-7.9.1 (82fd73ce)
    • glib: update to glib-2.44.1 (acbe0685)
    • dbus: update to dbus-1.8.18 (4c129658)
  2. XBMC:
    • FIX: [audiotrack] proper detection of supported sample rates (PR:7131, 1 commit, 2 files changed)
    • always use the DialogOK with the textbox input instead of separate lines (PR:7112, 1 commit, 29 files changed)
    • [win32] Fix crash after 8e1f62cc1b80918d723edc40e7b2a903cbef96e2 due … (PR:7181, 1 commit, 1 file changed)
    • Fixed makefile ARCH install bug (PR:6942, 1 commit, 1 file changed)
    • [input] drop fallback window configuration for fullscreeninfo dialog (PR:7170, 1 commit, 1 file changed)
    • fix kaitoast dialog loading the previous icon instead of the default … (PR:7182, 1 commit, 1 file changed)
    • [addons] fix toast dialog showing wrong icon on install errors (PR:7180, 1 commit, 1 file changed)
    • [addons] add thumb support for info provider group (PR:7109, 1 commit, 2 files changed)
    • [win32][gtest] fixed gtest build that broke with kissfft (PR:7185, 1 commit, 2 files changed)
  3. libnfs:
    • UTILS: add nfs-cat utility (4b1de15b)
    • FUSE: use nfs_stat64() not nfs_stat() (6f272746)
    • EXAMPLES: convert remaining nfs_[f]stat to nfs_[f]stat64 (ec3a3afe)
    • UTILS: move nfs-cp from examples to utils (eadef4f7)
    • UTILS: move nfs-cp from examples to utils (08ea9a31)
  4. newclock4:
    • New commits in this build:
      • Revert "temp: don't reset codec when running behind" (00dba755)
      • [players] Fix for SetPriority calls being ignored (f5353c62)
      • [rbp] Only avoid increasing audio thread priority with omxplayer (e20e38dc)
Another test with #0524 - I played Sintel 720 for a few seconds, then Sintel 1080 three times for a few seconds each, and the GPU mem free (vcgencmd get_mem reloc) became an impossible 4091MB - bcmstat output. Unfortunately the system totally froze (network connection lost) and it required power cycling.

I now think that running bcmstat.sh is a crucial step required to trigger abnormal behaviour - it seems harder to cause abnormal behaviour when bcmstat is *not* running, although corruption still seems to be occurring as when not running bcmstat.sh, after playing Sintel 720/1080 a few times without any obvious error, trying to run "/usr/bin/vcgencmd get_mem reloc_total" produces the following error:
Code:
/usr/bin/vcgencmd: error while loading shared libraries: librt.so.1: failed to map segment from shared object

In fact, it's no longer possible to load any shared library on a system that is in this state:
Code:
rpi22:~ # journalctl --no-pager
journalctl: error while loading shared libraries: librt.so.1: failed to map segment from shared object
rpi22:~ # reboot
reboot: error while loading shared libraries: librt.so.1: failed to map segment from shared object
rpi22:~ # poweroff
poweroff: error while loading shared libraries: librt.so.1: failed to map segment from shared object

dmesg is clean.

As a minimal test, the following should be sufficient to see when memory corruption has occurred without running the whole bcmstat.sh:
Code:
while [ : ]; do echo "$(date): $(/usr/bin/vcgencmd get_mem reloc)"; sleep 1; done

While running the above code, play Sintel 720p and Sintel 1080 in sequence, for 10-20 seconds each, until the reported reloc amount becomes abnormal.
Interesting. I had caught a corrupt heap with Sintel on OE and I was running bcmstat (but hadn't guessed it might make it more likely). Not reproduced it in debug env, but will try using bcmstat.
(2015-05-24, 14:51)Milhouse Wrote: [ -> ]You'll need to run this past the tvheadend maintainer.

Thanks, I'll do that.