[Com. QPKG kodi 2-16.1.1 ALL PVR / Visu / audio] for HD_Station 3.1+

This is the best place for community developers to publish their genius work. Your Apps enrich the QNAP Turbo NAS.
Locked
tombain
New here
Posts: 5
Joined: Sun Mar 20, 2016 3:31 am

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by tombain » Sun May 15, 2016 9:54 am

Hi there....

I can confirm that it does NOT run on the AMD models. Well, at least the TVS-x63. Bummer. But thanks for all the hard work!


father_mande wrote:Hi,

normally yes :
connect to file manager using admin / your_password
add (check) option (show hide file on NAS)
select (it's same if user is admin)
/home
or /homes/admin
select .kodi then temp folder
... inside you can get kodi.log

Philippe.
NB my x53 have crashed ... but I am at 600 km ... so with delay to getting up again ...
NB1 I never test this on x63 (AMD CPU based) ... so perhaps it don't run ...

inspigr
New here
Posts: 9
Joined: Wed Jan 28, 2015 12:51 am

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by inspigr » Wed May 18, 2016 7:38 pm

Hi Philippe,

Thank you for your hard work.
I would like to ask you, if you plan any upgrade (i use v1-16.1).
Best wishes,

Nikolas

gsharaf
First post
Posts: 1
Joined: Thu Apr 16, 2015 6:19 pm

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by gsharaf » Sat May 21, 2016 3:26 am

father_mande wrote:Hi,
Mfudge wrote:OK, there is no .kodi folder.
I do see other hidden folders, .qsync and .oracle.jre.usage
Regards,
Matthew


I have to see ... because now only some tests based on console can help ...

unfortunately I don't have a x63 to analyse ... it's out of my ressources ... and it's NOT my responsibility to enter in a user system (sorry but for me it's a frontier ... )

Philippe.
Please stay tuned I will try to be back with some (but difficult) actions to do ...


Philippe,
I have a TS-251 and I have the same issue where mykodi16_1 doesn't launch. It looks like you are trying to store the KODI config files in "/share/homes/admin/.kodi", which doesn't exist on my machine. The below command does the trick ;)

mkdir -p /share/homes/admin/.kodi

Thanks for your package, I appreciate your work!
Cheers

User avatar
bitstreamout
Starting out
Posts: 23
Joined: Tue Jun 21, 2016 1:09 am
Location: Germany

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by bitstreamout » Tue Jun 21, 2016 4:55 am

Just tried kodi 16.1 (which seems to be a 16.1-rc1) with the cec libraries and insmod cdc-acm.ko in the HD Station chroot of an HS-215+ ... there is no DTS emmbedded in WAV anymore, the logs show something like

Code: Select all

22:39:43 T:139998490867712 WARNING: could not find codec parameters for /share/Multimedia/Music/Soundtrack/Erich Kunzel (Cincinnati Pops Orchestra)/Big Picture [DTS]/Soundtrack_Erich Kunzel (Cincinnati Pops Orchestra)_Big Picture [DTS]_24_Kunzel - Bovine Barnstorm.wav


playing via DLNA to AV receiver and also DLNA/SMB/NFS to oppo bluray works. The old kodi 14 had also played this by using HDM1. The trick is to pass the WAV stream simply as LPCM_BE16 through the HDMI1 and the rest is done by the AV receiver. I've found .kodi/userdata/guisettings.xml with <audiooutput>...</audiooutput> but changes are ignored herein.

Also playing an ablum via HDMI1 works flawless for FLAC audio ... but if I try to do the same for one FLAC audio file the menu does not show the HDMI1 but only the PAplayer and the DLNA clients in the LAN.

Beside this the frequence graphic addon screen saver from kodi 14 is also gone ;)

User avatar
bitstreamout
Starting out
Posts: 23
Joined: Tue Jun 21, 2016 1:09 am
Location: Germany

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by bitstreamout » Wed Jun 22, 2016 4:02 am

Stopping kodi and do it by hand

Code: Select all

aplay /share/CACHEDEV1_DATA/Multimedia/Music/Soundtrack/Erich\ Kunzel\ \(Cincinnati\ Pops\ Orchestra\)/Big\ Picture\ \[DTS\]/Soundtrack_Erich\ Kunzel\ \(Cincinnati\ Pops\ Orchestra\)_Big\ Picture\ \[DTS\]_01_Mission\ Impossible.wav 
Playing WAVE '/share/CACHEDEV1_DATA/Multimedia/Music/Soundtrack/Erich Kunzel (Cincinnati Pops Orchestra)/Big Picture [DTS]/Soundtrack_Erich Kunzel (Cincinnati Pops Orchestra)_Big Picture [DTS]_01_Mission Impossible.wav' : Signed 16 bit Little Endian, Rate 44100 Hz, Stereo

simply works. The resuting LPCM from the wav is IEC60958 and the data stream therein is IEC61937 (http://www.epanorama.net/documents/audio/spdif.html) to explain why this works.

User avatar
bitstreamout
Starting out
Posts: 23
Joined: Tue Jun 21, 2016 1:09 am
Location: Germany

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by bitstreamout » Wed Jun 22, 2016 4:58 am

Hmm ... the KODI 14.2 from HD Station does MulitChannel PCM, that it does transform the DTS stream from the original WAV into an MulitChannel LPCM
HS-251+

User avatar
oyvindo
Experience counts
Posts: 1145
Joined: Tue May 19, 2009 2:08 am
Location: Norway, Oslo

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by oyvindo » Thu Jun 23, 2016 12:52 am

Philippe,
I see now that Kodi 16.0.2 ( 2016/03/29 ) is available in App center.
What is the difference between 16.0.2 and your 1-16.1 ?
ImageImageImageImage

User avatar
bitstreamout
Starting out
Posts: 23
Joined: Tue Jun 21, 2016 1:09 am
Location: Germany

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by bitstreamout » Thu Jun 23, 2016 11:46 pm

father_mande wrote:Hi bitstreamout,

Did you use the Kodi16 named mykodi16 (so it's generated by me) or the official kodi16 from QNAP
in my case it's always possible I forgot a library (kodi have require library need to work ... but also load extra libraries when it run ... not listed in the table of requested libraries)
BUT normally in the log (before the lines you write ... a specific message is added like ... load xxx : unknown file or can't open it ... with the library name ...


;) ... I've tested out both the kody14 from QNAP (that there is a kodi16(.02) from QNAP I was not aware) and your mykodi16.

another test possible (in my version) is to set (or unset) AE_ENGINE=ALSA in the start_up script
with ALSA you can have a better support and quality then with pulseaudio ... but with some restrictions ... BUT if aplay can play the file forcing ALSA (then choice the HDMI output in the list of audio output) solve generally the problem ..

If you use Kodi16 from QNAP ... just open a ticket in helpdesk site ... and wait

Philippe.


Thanks a lot, that is indeed a good tip with the AE_ENGINE as the pulseaudio of ubuntu 14.04 is a poor one. Nevertheless the old kernel 3.12.6 could also a problem as the alsa part is also an old one. Here on my OpenSUSE Leap 42.1 alsa does know about passthrough aka IEC61937 which indeed is an old spec as I can remember the old days back of VDR plugin bitstreamout ;)

The aplay of alsa simply let the wav drop onto the HDMI ... the question is if (my)kodi16 does detect the magic 16bit words of the IEC61937 specs and tries to ''solve'' this but is missing the appropiate filter to a) read the DTS data from the LPCM stream and b) decode it as multi channel LPCM or repack it in an other stereo LPCM accordingly to IEC61937 ... but for I've no knowledge and maybe it is simply a bug in the code.
HS-251+

User avatar
bitstreamout
Starting out
Posts: 23
Joined: Tue Jun 21, 2016 1:09 am
Location: Germany

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by bitstreamout » Fri Jun 24, 2016 12:51 am

Ha ... kodi16 from QNAP has exactly the same problem ;)
Beside this, I've add the AE_ENGINE=ALSA in the .qpkg/mykodi16/opt/kodi-16.1/bin/kodi I guess as in the boot script only the command pipe of the HD station will be qeued
HS-251+

User avatar
bitstreamout
Starting out
Posts: 23
Joined: Tue Jun 21, 2016 1:09 am
Location: Germany

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by bitstreamout » Fri Jun 24, 2016 12:56 am

The AE_ENGINE=ALSA does not help :arrow:
HS-251+

User avatar
bitstreamout
Starting out
Posts: 23
Joined: Tue Jun 21, 2016 1:09 am
Location: Germany

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by bitstreamout » Fri Jun 24, 2016 2:38 am

... AE_SINK seems the match in the binary ... without ALSA there is only pulseaudio :)

Alsa it self has trouble with rear and side channels:

Code: Select all

root@dataslide:/share/CACHEDEV1_DATA/.qpkg# pasuspender -- speaker-test -r 192000 -Dplughw:CARD=PCH,DEV=3 -c8 

speaker-test 1.0.27.2

Playback device is plughw:CARD=PCH,DEV=3
Stream parameters are 192000Hz, S16_LE, 8 channels
Using 16 octaves of pink noise
Rate set to 192000Hz (requested 192000Hz)
Buffer size range from 16 to 4096
Period size range from 8 to 2048
Using max buffer size 4096
Periods = 4
was set period_size = 1024
was set buffer_size = 4096
 0 - Front Left
 4 - Center
 1 - Front Right
 7 - Side Right
 7 - Side Right
 6 - Side Left
 6 - Side Left
 5 - LFE
^CTime per period = 23.272931
Got SIGINT, exiting.
root@dataslide:/share/CACHEDEV1_DATA/.qpkg#


Sometime I see Rear Left and Rear Right but in that case I hear nothing
HS-251+

User avatar
bitstreamout
Starting out
Posts: 23
Joined: Tue Jun 21, 2016 1:09 am
Location: Germany

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by bitstreamout » Fri Jun 24, 2016 3:09 am

Ahh .. jep, kernel code does tell more: the correct line is

Code: Select all

speaker-test -r 192000 -Dhdmi:CARD=PCH,DEV=0 -c 8 -m FL,FC,FR,RR,RRC,RLC,RL,LFE

also the AV receiver does talk with alsa:

Code: Select all

root@dataslide:/share/CACHEDEV1_DATA/.qpkg# cat /proc/asound/card0/eld#2.0
monitor_present         1
eld_valid               1
monitor_name            DENON-AVRHD
connection_type         HDMI
eld_version             [0x2] CEA-861D or below
edid_version            [0x3] CEA-861-B, C or D
manufacture_id          0xee11
product_id              0x42
port_id                 0x0
support_hdcp            0
support_ai              1
audio_sync_delay        0
speakers                [0x5f] FL/FR LFE FC RL/RR RC RLC/RRC
sad_count               7
sad0_coding_type        [0x1] LPCM
sad0_channels           8
sad0_rates              [0x1ee0] 32000 44100 48000 88200 96000 176400 192000
sad0_bits               [0xe0000] 16 20 24
sad1_coding_type        [0x2] AC-3
sad1_channels           6
sad1_rates              [0xe0] 32000 44100 48000
sad1_max_bitrate        640000
sad2_coding_type        [0x7] DTS
sad2_channels           6
sad2_rates              [0x6c0] 44100 48000 88200 96000
sad2_max_bitrate        1536000
sad3_coding_type        [0x9] DSD (One Bit Audio)
sad3_channels           6
sad3_rates              [0x40] 44100
sad4_coding_type        [0xa] E-AC-3/DD+ (Dolby Digital Plus)
sad4_channels           8
sad4_rates              [0xc0] 44100 48000
sad5_coding_type        [0xb] DTS-HD
sad5_channels           8
sad5_rates              [0x1ec0] 44100 48000 88200 96000 176400 192000
sad6_coding_type        [0xc] MLP (Dolby TrueHD)
sad6_channels           8
sad6_rates              [0x1ec0] 44100 48000 88200 96000 176400 192000
HS-251+

User avatar
bitstreamout
Starting out
Posts: 23
Joined: Tue Jun 21, 2016 1:09 am
Location: Germany

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by bitstreamout » Fri Jun 24, 2016 4:59 pm

OK ... after reading http://kodi.wiki/view/PulseAudio#Multichannel_Mode I guess that the build environment in the (stripped?) xUbuntu 14.04 is missing some newer libaries as well as the headers and/or that kodi is trimmed to detect a internal/local DSP which in fact is in my setup the remote DSP of the AV receiver as the Intel audio chip of the HS-215+ does not have any DSP AFAICS.

For pulseaudio I' now using a local rule

Code: Select all

cat /etc/udev/rules.d/95-local-pulseaudio.rules# Local udev rule to get HDMI digital surround passthrough
ATTRS{vendor}=="0x8086", ATTRS{device}=="0x0f04", ENV{PULSE_PROFILE_SET}="/etc/pulse/extra-hdmi.conf"

together with a modified version of /usr/share/pulseaudio/alsa-mixer/profile-sets/extra-hdmi.conf

Code: Select all

[General]
auto-profiles = yes

[Mapping hdmi-stereo]
device-strings = hdmi:%f
description = Digital Stereo (HDMI)
paths-output = hdmi-output-0
channel-map = front-left,front-right
priority = 4
direction = output

[Mapping hdmi-surround-40]
description = Digital Quadrophonic (HDMI)
device-strings = hdmi:%f
paths-output = hdmi-output-0
channel-map = front-left,front-right,rear-left,rear-right
priority = 1
direction = output

[Mapping hdmi-surround-51]
description = Digital Surround 5.1 (HDMI)
device-strings = hdmi:%f
paths-output = hdmi-output-0
channel-map = front-left,front-center,front-right,rear-left,rear-right,lfe
priority = 2
direction = output

[Mapping hdmi-surround-51]
description = Digital Surround 7.1 (HDMI)
device-strings = hdmi:%f
paths-output = hdmi-output-0
channel-map = front-left,front-center,front-right,rear-left,rear-left-center,rear-right-center,rear-right,lfe
priority = 3
direction = output
HS-251+

User avatar
bitstreamout
Starting out
Posts: 23
Joined: Tue Jun 21, 2016 1:09 am
Location: Germany

Re: [Com. QPKG kodi 1-16.1 ALL PVR / Visu] for HD_Station 3.1 + libs

Post by bitstreamout » Sat Jun 25, 2016 9:35 pm

Hi,

just played a lot around and found that the following changes in pulseaudio configuration does help to support passthrough, in
/etc/pulse/default.pa:

Code: Select all

### Automatically load driver modules depending on the hardware available
.ifexists module-udev-detect.so
load-module module-udev-detect tsched=0
.else
### Use the static hardware detection module (for systems that lack udev support)
load-module module-detect
.endif

where I have added the "tsched=0" :) in /etc/pulse/daemon.conf I'm using

Code: Select all

enable-shm = yes
shm-size-bytes = 0

high-priority = yes
nice-level = -11

realtime-scheduling = yes
realtime-priority = 5

enable-remixing = no
enable-lfe-remixing = no
resample-method = src-sinc-best-quality

together with an /etc/asound.conf:

Code: Select all

defaults.pcm.dmix.rate 96000
pcm.hdmi0 {
        type hw
        card=0
        device=3
}
pcm.hdmi_direct {
        type route
        slave {
                pcm hdmi0
        }
        slave.channels 8
        ttable.0.0 1
        ttable.4.4 1
        ttable.1.1 1
        ttable.6.2 1
        ttable.2.6 1
        ttable.3.7 1
        ttable.7.3 1
        ttable.5.5 1
}

with this I can play WAV/DTS even with pulseaudio as well as MultiChannel PCM.
Last but not least the new /etc/pulse/extra-hdmi.conf

Code: Select all

[General]
auto-profiles = yes

[Mapping hdmi-stereo]
#device-strings = hdmi:0 dmix:0,3 plughw:0,3 hw:0
#device-strings = hw:0,3 hdmi:0
device-strings = hdmi:0,0
description = Digital Stereo (HDMI)
paths-output = hdmi-output-0
channel-map = front-left,front-right
priority = 2
direction = output

[Mapping hdmi-surround40]
description = Digital Quadrophonic (HDMI)
device-strings = hdmi:0,0
paths-output = hdmi-output-0
channel-map = front-left,front-right,rear-left,rear-right
priority = 1
direction = output

[Mapping hdmi-surround51]
description = Digital Surround 5.1 (HDMI)
device-strings = hdmi:0,0
paths-output = hdmi-output-0
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe
priority = 3
direction = output

[Mapping hdmi-surround71]
description = Digital Surround 7.1 (HDMI)
device-strings = hdmi:0,0
paths-output = hdmi-output-0
channel-map = front-left,front-right,rear-left,rear-right,front-center,lfe,side-left,side-right
priority = 4
direction = output

which enables pulseaudio due the /etc/udev/rules.d/95-local-pulseaudio.rules

Code: Select all

# Local udev rule to get HDMI digital surround passthrough
ATTRS{vendor}=="0x8086", ATTRS{device}=="0x0f04", ENV{PULSE_PROFILE_SET}="/etc/pulse/extra-hdmi.conf"

to create the passthrough capable hdmi-stereo.

Nontheless, kodi 16.1 does not support DTS in WAV anymore:

Code: Select all

14:37:12 T:139926528387072   DEBUG: Loading settings for /share/Multimedia/Music/Soundtrack/Erich Kunzel (Cincinnati Pops Orchestra)/Big Picture [DTS]/Soundtrack_Erich Kunzel (Cincinnati Pops Orchestra)_Big Picture [DTS]_01_Mission Impossible.wav
14:37:12 T:139926528387072   DEBUG: Open - probing detected format [dts]
14:37:12 T:139926528387072   DEBUG: Open - avformat_find_stream_info starting
14:37:12 T:139926528387072 WARNING: could not find codec parameters for /share/Multimedia/Music/Soundtrack/Erich Kunzel (Cincinnati Pops Orchestra)/Big Picture [DTS]/Soundtrack_Erich Kunzel (Cincinnati Pops Orchestra)_Big Picture [DTS]_01_Mission Impossible.wav
14:37:12 T:139926528387072   ERROR: Init: Error creating demuxer
HS-251+

User avatar
bitstreamout
Starting out
Posts: 23
Joined: Tue Jun 21, 2016 1:09 am
Location: Germany

Re: [Com. QPKG kodi 2-16.1 ALL PVR / Visu / audio] for HD_Station 3.1 + libs

Post by bitstreamout » Mon Jun 27, 2016 4:05 am

Thanks a lot, just managed here to set up a virtual ubuntu 14.04 LST also including the official repositories of the team-xbmc ppa. After the expansion of the dependencies for kodi 16.1 I had include some packages like ffmpeg and libcap as the first bootstrap+configure had shown even after success some missing packages/features at the end with `no'. I have seen that the very first configure had build the libav* libraries *before* those missed packages become part of the build environment ... maybe some of the sub configure scripts of the libav* libraries simply missed e.g. ffmpeg or other things here which would require to run a make distclean :?: ... OK this is only an idea/guess as I had no time to check my build due lack of time
HS-251+

Locked

Return to “Community Apps”