Kodi Community Forum
OpenELEC Testbuilds for RaspberryPi Part 2 - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: General Support (https://forum.kodi.tv/forumdisplay.php?fid=111)
+---- Forum: Raspberry Pi (https://forum.kodi.tv/forumdisplay.php?fid=166)
+---- Thread: OpenELEC Testbuilds for RaspberryPi Part 2 (/showthread.php?tid=184866)



RE: OpenELEC Testbuilds for RaspberryPi Part 2 - Milhouse - 2013-12-14

(2013-12-14, 20:51)popcornmix Wrote: It should apply to newclock3, but you probably want to remove "[rbp] Add support for gui sounds to PiAudio backend" which may conflict.

With the above commit removed, applying piaudio_sink on top of newclock3 still fails due to a conflict with "[rbp/omxplayer] Remove visualisation support". It's possible to build without both of these patches, would you expect any problems?

The piaudio_sink branch could do with being rebased/resynced as several of FernetMentas commits have now appeared in xbmc/master.

I'll upload a combined build shortly.


RE: OpenELEC Testbuilds for RaspberryPi Part 2 - popcornmix - 2013-12-14

(2013-12-14, 21:10)MilhouseVH Wrote: With the above commit removed, applying piaudio_sink on top of newclock3 still fails due to a conflict with "[rbp/omxplayer] Remove visualisation support". It's possible to build without both of these patches, would you expect any problems?

The piaudio_sink branch could do with being rebased/resynced as several of FernetMentas commits have now appeared in xbmc/master.

Not removing visualisation support will be harmless (if paplayer handles audio files, then the visualisation from omxplayer won't be called).
I've rebased piaudio_sink.


RE: OpenELEC Testbuilds for RaspberryPi Part 2 - Leopold - 2013-12-14

(2013-12-14, 18:00)robby1337 Wrote: That doesnt work, no SMB here Smile
Wheres this update map you mean? Just tell me the file i have to edit, guess i find the rest Big Grin

thanks in advance!

You might find it easier to use this http://openelec-dev-update.googlecode.com/


RE: OpenELEC Testbuilds for RaspberryPi Part 2 - Milhouse - 2013-12-14

New OpenELEC Gotham build: #1412b (obsolete)

Code:
rpi512:~ # uname -a
Linux rpi512 3.12.5 #1 PREEMPT Sat Dec 14 18:05:15 GMT 2013 armv6l GNU/Linux
rpi512:~ # vcgencmd version
Dec  2 2013 20:30:23
Copyright (c) 2012 Broadcom
version 0334d765c5cb144589b4d7a4ac68ae8f136491e1 (clean) (release)
rpi512:~ # lsb_release
OpenELEC_Gotham (Milhouse) - Version: devel-20131214204451-r16567

Based on tip of XBMC master (d886d3cc40) and tip of OpenELEC master (5bab247229) with the following modifications:
  • Includes these newclock3 commits (except for 3ee32af which I've replaced with a static spinner, and c38e6b9 due to conflict with piaudio_sink branch)
  • Includes these piaudio_sink commits (except for a82f99a due to conflict with newclock3 branch)
  • Excludes the fernetmenta patch as this conflicts with the newclock3 ffmpeg (c3b6365) patch
paplayer is now the default audio player in this build. If your userdata/advancedsettings.xml file contains a duplicate of what were once system-wide settings you may need to edit your file and remove the audio settings as these are now out-of-date. See this post from popcornmix for more details of the paplayer changes.

@popcornmix: A quick test with Flac audio shows that gapless playback is almost working perfectly, however there's a very brief (sub-second) silence between tracks, is this expected/known?

I've also noticed that "rewind" is working correctly - maybe due to the switch to paplayer? Good news anyway! Smile


RE: OpenELEC Testbuilds for RaspberryPi Part 2 - Milhouse - 2013-12-14

I also note that enabling "debugging", and then playing a song seems to load the CPU considerably (up to 60% from average 30% on a 1GHz Pi), and seems to be responsible for frequent but brief pauses (stutter) to the audio output. Without debugging, there are no pauses/stutter. I can't see anything obvious in the debug log that coincides with each stutter - just a *lot* of the following:
Code:
19:58:06 1374.082153 T:2842686544   DEBUG: PAPlayer::Process - freeBufferTime=0.00
19:58:06 1374.179199 T:2842686544   DEBUG: Previous line repeats 8 times.
19:58:06 1374.179199 T:2842686544   DEBUG: PAPlayer::Process - freeBufferTime=0.20
19:58:06 1374.181396 T:2842686544   DEBUG: PAPlayer::Process - freeBufferTime=0.10
19:58:06 1374.183350 T:2842686544   DEBUG: PAPlayer::Process - freeBufferTime=0.00
19:58:06 1374.282349 T:2842686544   DEBUG: Previous line repeats 8 times.
19:58:06 1374.282349 T:2842686544   DEBUG: PAPlayer::Process - freeBufferTime=0.10
19:58:06 1374.284180 T:2842686544   DEBUG: PAPlayer::Process - freeBufferTime=0.00



RE: OpenELEC Testbuilds for RaspberryPi Part 2 - popcornmix - 2013-12-14

(2013-12-14, 21:59)MilhouseVH Wrote: I also note that enabling "debugging", and then playing a song seems to load the CPU considerably (up to 60% from average 30% on a 1GHz Pi), and seems to be responsible for frequent but brief pauses (stutter) to the audio output. Without debugging, there are no pauses/stutter. I can't see anything obvious in the debug log that coincides with each stutter - just a *lot* of the following:
Yes, that is unnecessary. Removed now,


RE: OpenELEC Testbuilds for RaspberryPi Part 2 - popcornmix - 2013-12-14

(2013-12-14, 21:47)MilhouseVH Wrote: @popcornmix: A quick test with Flac audio shows that gapless playback is almost working perfectly, however there's a very brief (sub-second) silence between tracks, is this expected/known?

No, but we did find a number of cases where high cpu caused underrun. You may see "underrun" in log if Pi Sink underruns, but you also get silence inserted when engine underruns without a message.

One issue is that the Sink thread is meant to run at higher (nice=-1) priority than other threads but that may not be allowed.
On raspbian I had to insert
Code:
*                -       nice            -1
/etc/security/limits.conf for this request to have any effect.
In OpenELEC I'm not sure if processes are allowed to decrease their nice level.


RE: OpenELEC Testbuilds for RaspberryPi Part 2 - Milhouse - 2013-12-14

(2013-12-14, 22:26)popcornmix Wrote: Yes, that is unnecessary. Removed now,

Thanks, I've uploaded a new build #1412b (see post #1894) with this reduced logging.

(2013-12-14, 22:31)popcornmix Wrote: No, but we did find a number of cases where high cpu caused underrun. You may see "underrun" in log if Pi Sink underruns, but you also get silence inserted when engine underruns without a message.

One issue is that the Sink thread is meant to run at higher (nice=-1) priority than other threads but that may not be allowed.
On raspbian I had to insert
Code:
*                -       nice            -1
/etc/security/limits.conf for this request to have any effect.
In OpenELEC I'm not sure if processes are allowed to decrease their nice level.

Not sure about decreasing the nice level in OpenELEC, though as everything runs as root I don't see why you shouldn't be able to do that.

In case its useful, this is the debug that appears when one Flac track ends and the next begins - there is a brief silence during the transition (CPU load averages about 25% at this time):
Code:
21:03:15 706.736511 T:2716849232   DEBUG: OnQueueNextItem : play state was 2, starting 0
21:03:15 706.779358 T:2884629584  NOTICE: Thread JobWorker start, auto delete: true
21:03:15 706.786560 T:2884629584   DEBUG: CFileCache::Open - opening <artists/65/48/547.flac> using cache
21:03:15 706.818481 T:2884629584   DEBUG: NFS: Refreshing context for 192.168.0.3/mnt/share, old: 521706, new: 693586
21:03:15 706.818726 T:2884629584   DEBUG: NFS: Using cached context.
21:03:15 706.825073 T:2884629584   DEBUG: CNFSFile::Open - opened mnt/share/data/Music/MP3/Daft Punk/Alive 2007/11 Daft Punk - Da Funk, Daftendirekt.flac
21:03:15 706.967773 T:2867852368  NOTICE: Thread FileCache start, auto delete: false
21:03:15 707.011047 T:2884629584   DEBUG: CNFSFile::Open - opened mnt/share/data/Music/MP3/Daft Punk/Alive 2007/11 Daft Punk - Da Funk, Daftendirekt.flac
21:03:16 707.112183 T:2884629584   DEBUG: unrecognized XipComment name: TRACKTOTAL
21:03:16 707.120178 T:2884629584   DEBUG: CNFSFile::Close closing file mnt/share/data/Music/MP3/Daft Punk/Alive 2007/11 Daft Punk - Da Funk, Daftendirekt.flac
21:03:16 707.411133 T:2884629584    INFO: AudioDecoder: File is queued
21:03:16 707.421021 T:2884629584   DEBUG: AudioDecoder::GetReplayGain - Final Replaygain applied: 1.000000, Track/Album Gain 89.000000, Peak 0.000000
21:03:16 707.439392 T:3034575952   DEBUG: CAESinkPi:IsCompatible Format:15 Channels:2 Samplerate:44100
21:03:16 707.481323 T:3034575952    INFO: CActiveAE::OpenSink - sink incompatible, re-starting
21:03:16 707.581360 T:3034575952   DEBUG: CAESinkPi:Drain delay:98ms now:0ms (0)
21:03:16 707.581604 T:3034575952   DEBUG: CAESinkPi:Deinitialize
21:03:16 707.590454 T:3034575952   DEBUG: COMXCoreComponent::Deinitialize : OMX.broadcom.audio_render handle 0xa75df928
21:03:16 707.591125 T:3034575952   DEBUG: CActiveAE::OpenSink - trying to open device SinkPi:Pi:HDMI
21:03:16 707.591492 T:3034575952   DEBUG: CAESinkPi:Initialize Format:4 Channels:2 Samplerate:44100 framesize:4 bufsize:17640 bytes/s=176400.00
21:03:16 707.591675 T:3034575952   DEBUG: CActiveAE::OpenSink - SinkPi Initialized:
21:03:16 707.591858 T:3034575952   DEBUG:   Output Device : Device not found
21:03:16 707.591980 T:3034575952   DEBUG:   Sample Rate   : 44100
21:03:16 707.592224 T:3034575952   DEBUG:   Sample Format : AE_FMT_S16NE
21:03:16 707.592407 T:3034575952   DEBUG:   Channel Count : 2
21:03:16 707.592651 T:3034575952   DEBUG:   Channel Layout: FL,FR
21:03:16 707.592773 T:3034575952   DEBUG:   Frames        : 2205
21:03:16 707.592957 T:3034575952   DEBUG:   Frame Samples : 2
21:03:16 707.593140 T:3034575952   DEBUG:   Frame Size    : 4
21:03:16 707.621033 T:3044508752   DEBUG: DllAvUtilBase: Using libavutil system library
21:03:16 707.621338 T:3044508752   DEBUG: DllAvFormat: Using libswresample system library
21:03:16 707.622192 T:3044508752   DEBUG: DllAvUtilBase: Using libavutil system library
21:03:16 707.622437 T:3044508752   DEBUG: DllAvFormat: Using libswresample system library
21:03:16 707.625732 T:3034575952   DEBUG: CAESinkPi:Initialize2
21:03:16 707.629333 T:3034575952   DEBUG: COMXCoreComponent::Initialize OMX.broadcom.audio_render input port 100 output port 100 m_handle 0xa63af9c8
21:03:16 707.630371 T:3044508752   DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
21:03:16 707.638000 T:3034575952   DEBUG: Previous line repeats 1 times.
21:03:16 707.638000 T:3034575952   DEBUG: COMXCoreComponent::AllocInputBuffers component(OMX.broadcom.audio_render) - port(100), nBufferCountMin(1), nBufferCountActual(2), nBufferSize(8820), nBufferAlignmen(16)
21:03:16 707.643738 T:3044508752   DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
21:03:16 707.670044 T:2884629584    INFO: PAPlayer::PrepareStream - Ready
21:03:20 711.502136 T:2716849232   DEBUG: OnPlayBackStarted : play state was 2, starting 0
21:03:20 711.506470 T:2751456336   DEBUG: Thread FileCache 2751456336 terminating
21:03:20 711.514648 T:2716849232   DEBUG: CNFSFile::Close closing file mnt/share/data/Music/MP3/Daft Punk/Alive 2007/10 Daft Punk - Prime Time of Your Life, Brainwasher, Rollin' And Scratchin',Alive.flac
21:03:20 711.518250 T:3044520784   DEBUG: CGUIInfoManager::SetCurrentSong(musicdb://artists/65/48/547.flac?albumartistsonly=true&albumid=48&artistid=65)
21:03:20 711.800110 T:2716849232   DEBUG: PAPlayer::ProcessStreams - Stream Freed
21:03:20 711.800476 T:3044508752   DEBUG: CActiveAE::DiscardStream - audio stream deleted
21:03:20 711.800842 T:3044508752   DEBUG: CActiveAE::ClearDiscardedBuffers - buffer pool deleted
21:03:20 711.816345 T:3044520784   DEBUG: Previous line repeats 1 times.
21:03:20 711.816345 T:3044520784   DEBUG: Loading additional tag info for file nfs://192.168.0.3/mnt/share/data/Music/MP3/Daft Punk/Alive 2007/11 Daft Punk - Da Funk, Daftendirekt.flac
21:03:20 711.823181 T:3044520784   DEBUG: CNFSFile::Open - opened mnt/share/data/Music/MP3/Daft Punk/Alive 2007/11 Daft Punk - Da Funk, Daftendirekt.flac
21:03:20 711.854919 T:3044520784   DEBUG: unrecognized XipComment name: TRACKTOTAL
21:03:20 711.855347 T:3044520784   DEBUG: CNFSFile::Close closing file mnt/share/data/Music/MP3/Daft Punk/Alive 2007/11 Daft Punk - Da Funk, Daftendirekt.flac
21:03:20 711.855774 T:3044520784   DEBUG: CAnnouncementManager - Announcement: OnPlay from xbmc
21:03:20 711.856079 T:3044520784   DEBUG: GOT ANNOUNCEMENT, type: 1, from xbmc, message OnPlay
21:03:20 711.860413 T:2884629584   DEBUG: DoWork - Saving file state for audio item musicdb://artists/65/48/546.flac?albumartistsonly=true&albumid=48&artistid=65
21:03:20 711.875366 T:2884629584   DEBUG: DoWork - Marking audio item musicdb://artists/65/48/546.flac?albumartistsonly=true&albumid=48&artistid=65 as listened
21:03:20 711.897949 T:2884629584   DEBUG: Mysql execute: UPDATE song SET iTimesPlayed=iTimesPlayed+1, lastplayed=CURRENT_TIMESTAMP where idSong=546



RE: OpenELEC Testbuilds for RaspberryPi Part 2 - popcornmix - 2013-12-14

(2013-12-14, 23:01)MilhouseVH Wrote: In case its useful, this is the debug that appears when one Flac track ends and the next begins - there is a brief silence during the transition:

Seems to be closing and opening Sink. That may be down to settings.

You want "crossfade between songs" to be set to something (e.g. 5s) in settings/music/playback.
And in system/audio output you want optimised (I think best match stops crossfade working).

I'd recommend trying with Low for resample quality if you are seeing problems (although it doesn't make that much difference to cpu).


RE: OpenELEC Testbuilds for RaspberryPi Part 2 - ph87 - 2013-12-14

Edit: Sorry wrong thread!!!


RE: OpenELEC Testbuilds for RaspberryPi Part 2 - Milhouse - 2013-12-14

(2013-12-14, 23:16)popcornmix Wrote: Seems to be closing and opening Sink. That may be down to settings.

You want "crossfade between songs" to be set to something (e.g. 5s) in settings/music/playback.
And in system/audio output you want optimised (I think best match stops crossfade working).

I'd recommend trying with Low for resample quality if you are seeing problems (although it doesn't make that much difference to cpu).

Ah yes, a cross-fade of 5 seconds does...a cross-fade! However this isn't quite the same as non-crossfaded "gapless" playback, since the cross-fade is fairly obvious and not entirely desirable.

A value of 1-4 seconds cross-fade still results in brief-silence, and the 5 second cross-fade eliminates this silence, but the resulting cross-faded audio isn't what I would consider to be quite the same as purely "gapless" playback where the two tracks continue seamlessly, with no fade or interruption. I don't mean to sound ungrateful, as in general it's a big improvement, but cross-fading as a solution isn't really appropriate on most gapless tracks (IMHO). I think given the choice, I would accept the very brief silence rather than the cross-fade so that I can listen to the tracks as they were intended to be heard (and no I'm not an audiophile but just realised I might actually be sounding like one! Smile)


RE: OpenELEC Testbuilds for RaspberryPi Part 2 - popcornmix - 2013-12-14

(2013-12-14, 23:37)MilhouseVH Wrote: Ah yes, a cross-fade of 5 seconds does...a cross-fade! However this isn't quite the same as non-crossfaded "gapless" playback, since the cross-fade is fairly obvious and not entirely desirable.

How about changing optimised to fixed?
Does "keep receiver alive" help?


RE: OpenELEC Testbuilds for RaspberryPi Part 2 - Milhouse - 2013-12-14

(2013-12-14, 23:42)popcornmix Wrote: How about changing optimised to fixed?
Does "keep receiver alive" help?

"Fixed" appears to have increased the duration of the silence between tracks from ~0.1 second to somewhere between 0.5 second and 1 second.

The silence is usually heard between 5 and 2 seconds before the end of each track (this is with both Optimised and Fixed).

"Keep audio device alive" didn't help with either "Fixed" or "Optimised" settings, but then I'm not connecting to a receiver (HDMI 2.0 to monitor with stereo line-out from monitor to the line-in on a PC).

Edit: Looking at the time code and comparing it with when the silence occurs, these tracks are being played back in what I would consider to be a "gapless" manner, as there is no gap *between* each track. The actual silence is occurring between 5 and 2 seconds *before* the end of each track. So the gapless side of things seems to be sorted, I guess it's this closing and opening of the sink (which may be what happens a few seconds before the end of each track) that is the remaining problem and prevents the audio from being totally seamless/continuous.


RE: OpenELEC Testbuilds for RaspberryPi Part 2 - User 180998 - 2013-12-15

(2013-12-14, 13:14)MilhouseVH Wrote:
(2013-12-14, 12:47)webjib Wrote: Just to let you know I've got a bug with USB drive attached to the Pi with recent MilHouseVH version. The drive is mounted, but partially, this is weird. Only the first folder of my USB drive is available (SAMBA or SSH).

Build from 24 november is the latest one that has not the bug.
I've also tested "official" dev builds (http://openelec.thestateofme.com/dev_builds/) and the build 16552 does not have the issue, so I guess one of the patches are causing the bug ?

debug log (wiki)? Maybe seeing any error might give a clue, as right now I can't think which patch should be causing this behaviour.

Here's the log :
http://xbmclogs.com/show.php?id=97478

Can't find anything about USB mount in the log ?!
By the way, the issue is still the same with build from today. When I re-plug my USB drive, I've got usual notification in xbmc (drive mounted) but the drive does not appear in filemanager as well.


RE: OpenELEC Testbuilds for RaspberryPi Part 2 - Trickname - 2013-12-15

If you have this:

Quote:For me some LiveTvChannels only shows black screen,
when i press stop in OSD i can see last frame and it stops.
This dont happen when i quick change to the channel (using up und down)

Sometimes sound seems to be to slow and make voices from hell.
This dont happen when choose channel directly. (PVR=DvbViewer)

in build 0412 i have no problems with this

try this:
1. System-System
2. Set Gui resolution limt 720