Kodi Community Forum
HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: PVR & Live TV Support (https://forum.kodi.tv/forumdisplay.php?fid=167)
+---- Forum: Tvheadend (https://forum.kodi.tv/forumdisplay.php?fid=168)
+---- Thread: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS (/showthread.php?tid=141981)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - Smiggel - 2014-01-27

Found this on the wiki pages. Should this not work also?

http://forum.synology.com/wiki/index.php/How_to_Reset_the_Synology_System

According the the wiki you can press the reset button twice and then upload a system firmware. Old system partition will be overwritten.


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - aisman - 2014-01-27

~5-7 min to ensure that it does not start Smile


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - Smiggel - 2014-01-27

(2014-01-27, 13:13)aisman Wrote: ~5-7 min to ensure that it does not start Smile

Ok, thanks. :-)


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - aisman - 2014-01-27

(2014-01-27, 13:13)Smiggel Wrote: Found this on the wiki pages. Should this not work also?

http://forum.synology.com/wiki/index.php/How_to_Reset_the_Synology_System

According the the wiki you can press the reset button twice and then upload a system firmware. Old system partition will be overwritten.

no, its not works Smile


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - Smiggel - 2014-01-27

(2014-01-27, 13:14)aisman Wrote:
(2014-01-27, 13:13)Smiggel Wrote: Found this on the wiki pages. Should this not work also?

http://forum.synology.com/wiki/index.php/How_to_Reset_the_Synology_System

According the the wiki you can press the reset button twice and then upload a system firmware. Old system partition will be overwritten.

no, its not works Smile

Ok, will go for your method tonight. Thanks.


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - Smiggel - 2014-01-27

(2014-01-27, 12:25)aisman Wrote: 1. replace file /etc.defaults/*VERSION (for 5.0) from /etc/*VERSION (make shure /etc/*VERSION is for 4.3)

majorversion="4"
minorversion="3"
buildphase="release"
buildnumber="3810"
smallfixnumber="0"
builddate="2013/11/06"


Code:
cp /etc/*VERSION /etc.defaults/*VERSION
or via MC

don't reboot!

2. In web DSM manualy update 3810, then update-4 in control panel.
3. System will go to reboot, but it will be not start Smile its normal. Wait some time and turn of it.
4. Turn on NAS and via assist go to web DSM, choose "migration", install manualy 3810.pat, after boot install update-4 via web in control panel.

Just to be safe a few questions:

1. I have to replace the file contents first of /etc/*VERSION?
2. "In web DSM manualy update 3810, then update-4 in control panel." Is the system not going to say the sofware is the same? And what do you mean with "update-4"?


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - pepeEL - 2014-01-27

Can you help me...
I install on debian chroot this:
Code:
apt-get install build-essential automake autopoint python ncurses-dev libavcodec-extra-53 libswscale-dev libavformat-dev libavcodec-dev liburiparser-dev libssl-dev pkg-config zlib1g-dev gettext git curl libgc-dev libcurl4-openssl-dev -y

After that i do this:

Code:
root@Synology_DS713:/# pwd
/
root@Synology_DS713:/# cd home
root@Synology_DS713:/home# git clone https://github.com/tvheadend/tvheadend.git
Cloning into 'tvheadend'...
remote: Reusing existing pack: 29114, done.
remote: Counting objects: 14, done.
remote: Compressing objects: 100% (14/14), done.
remote: Total 29128 (delta 5), reused 8 (delta 0)
Receiving objects: 100% (29128/29128), 17.81 MiB | 665 KiB/s, done.
Resolving deltas: 100% (19596/19596), done.
root@Synology_DS713:/home# cd tvheadend
root@Synology_DS713:/home/tvheadend# ./configure --prefix=/usr --enable-bundle -             -disable-avahi
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
Checking support/features
  checking for cc execinfo.h ...                    ok
  checking for cc -mmmx ...                         ok
  checking for cc -msse2 ...                        ok
  checking for cc getloadavg ...                    ok
  checking for cc atomic64 ...                      ok
  checking for cc lockowner ...                     ok
  checking for py module gzip ...                   ok
  checking for bzip2 ...                            ok
  checking for pkg openssl  ...                     ok
  checking for cc linux/dvb/version.h ...           ok
  checking for pkg zlib  ...                        ok
  checking for pkg libcurl  ...                     ok
  checking for pkg liburiparser  ...                ok
  checking for pkg libavcodec <=55.0.0 ...          ok
  checking for pkg libavcodec >=52.96.0 ...         ok
  checking for pkg libavutil >=50.43.0 ...          ok
  checking for pkg libavformat <=55.0.0 ...         ok
  checking for pkg libavformat >=53.10.0 ...        ok
  checking for pkg libswscale >=0.13.0 ...          ok
  checking for cc sys/inotify.h ...                 ok
  fetching dvb-scan files ...                       /bin/bash: warning: setlocal             e: LC_ALL: cannot change locale (en_US.utf8)
ok

Compiler:
  Using C compiler:                        cc
  Build for arch:                          x86_64

Binaries:
  Using PYTHON:                            python

Options:
  cwc                                      yes
  v4l                                      no
  linuxdvb                                 yes
  iptv                                     yes
  tsfile                                   yes
  dvbscan                                  yes
  timeshift                                yes
  trace                                    yes
  imagecache                               yes
  avahi                                    no
  zlib                                     yes
  libav                                    yes
  inotify                                  yes
  curl                                     yes
  epoll                                    yes
  uriparser                                yes
  ccache                                   no
  bundle                                   yes
  dvbcsa                                   no
  kqueue                                   no
  execinfo                                 yes
  mmx                                      yes
  sse2                                     yes
  getloadavg                               yes
  atomic64                                 yes
  lockowner                                yes
  py_gzip                                  yes
  bin_bzip2                                yes
  ssl                                      yes
  dvbapi                                   yes
  inotify_h                                yes
  mpegts                                   yes
  mpegps                                   no

Packages:
  openssl                                  1.0.1e
  zlib                                     1.2.7
  libcurl                                  7.26.0
  liburiparser                             0.7.5
  libavcodec                               53.35.0
  libavutil                                51.22.1
  libavformat                              53.21.1
  libswscale                               2.1.0

Installation paths:
  Prefix:                                  /usr
  Binaries:                                ${prefix}/bin
  Libraries:                               ${prefix}/lib
  Data files:                              ${prefix}/share
  Man pages:                               ${datadir}/man

Final Binary:
  /home/tvheadend/build.linux/tvheadend

Tvheadend Data Directory:
  /usr/share/tvheadend

root@Synology_DS713:/home/tvheadend# make
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
CC              src/version.o
CC              src/main.o
CC              src/tvhlog.o
CC              src/idnode.o
CC              src/prop.o
CC              src/utils.o
CC              src/wrappers.o
CC              src/access.o
CC              src/dtable.o
CC              src/tcp.o
CC              src/url.o
CC              src/http.o
CC              src/notify.o
CC              src/file.o
CC              src/epg.o
CC              src/epgdb.o
CC              src/epggrab.o
CC              src/spawn.o
CC              src/packet.o
CC              src/streaming.o
CC              src/channels.o
CC              src/subscriptions.o
CC              src/service.o
CC              src/htsp_server.o
CC              src/htsmsg.o
CC              src/htsmsg_binary.o
CC              src/htsmsg_json.o
CC              src/htsmsg_xml.o
CC              src/misc/dbl.o
CC              src/misc/json.o
CC              src/settings.o
CC              src/htsbuf.o
CC              src/trap.o
CC              src/avg.o
CC              src/htsstr.o
CC              src/tvhpoll.o
CC              src/huffman.o
CC              src/filebundle.o
CC              src/config2.o
CC              src/lang_codes.o
CC              src/lang_str.o
CC              src/imagecache.o
CC              src/tvhtime.o
CC              src/descrambler/descrambler.o
CC              src/service_mapper.o
CC              src/input.o
CC              src/http/http_client.o
CC              src/fsmonitor.o
CC              src/api.o
CC              src/api/api_status.o
CC              src/api/api_idnode.o
CC              src/api/api_input.o
CC              src/api/api_channel.o
CC              src/api/api_service.o
CC              src/api/api_mpegts.o
CC              src/api/api_epg.o
CC              src/api/api_epggrab.o
CC              src/api/api_imagecache.o
CC              src/parsers/parsers.o
CC              src/parsers/bitstream.o
CC              src/parsers/parser_h264.o
CC              src/parsers/parser_latm.o
CC              src/parsers/parser_avc.o
CC              src/parsers/parser_teletext.o
CC              src/epggrab/module.o
CC              src/epggrab/channel.o
CC              src/epggrab/module/pyepg.o
CC              src/epggrab/module/xmltv.o
CC              src/plumbing/tsfix.o
CC              src/plumbing/globalheaders.o
CC              src/dvr/dvr_db.o
CC              src/dvr/dvr_rec.o
CC              src/dvr/dvr_autorec.o
CC              src/webui/webui.o
CC              src/webui/comet.o
CC              src/webui/extjs.o
CC              src/webui/simpleui.o
CC              src/webui/statedump.o
CC              src/webui/html.o
CC              src/webui/webui_api.o
CC              src/muxer.o
CC              src/muxer/muxer_pass.o
CC              src/muxer/muxer_tvh.o
CC              src/muxer/tvh/ebml.o
CC              src/muxer/tvh/mkmux.o
CC              src/input/mpegts/mpegts_input.o
CC              src/input/mpegts/mpegts_network.o
CC              src/input/mpegts/mpegts_mux.o
CC              src/input/mpegts/mpegts_service.o
CC              src/input/mpegts/mpegts_table.o
CC              src/input/mpegts/dvb_support.o
CC              src/input/mpegts/dvb_charset.o
CC              src/input/mpegts/dvb_psi.o
CC              src/input/mpegts/tsdemux.o
CC              src/epggrab/otamux.o
CC              src/epggrab/module/eit.o
CC              src/epggrab/support/freesat_huffman.o
CC              src/epggrab/module/opentv.o
CC              src/input/mpegts/linuxdvb/linuxdvb.o
CC              src/input/mpegts/linuxdvb/linuxdvb_adapter.o
CC              src/input/mpegts/linuxdvb/linuxdvb_frontend.o
CC              src/input/mpegts/linuxdvb/linuxdvb_network.o
CC              src/input/mpegts/linuxdvb/linuxdvb_mux.o
CC              src/input/mpegts/linuxdvb/linuxdvb_service.o
CC              src/input/mpegts/linuxdvb/linuxdvb_satconf.o
CC              src/input/mpegts/linuxdvb/linuxdvb_lnb.o
CC              src/input/mpegts/linuxdvb/linuxdvb_switch.o
CC              src/input/mpegts/linuxdvb/linuxdvb_rotor.o
CC              src/input/mpegts/linuxdvb/linuxdvb_en50494.o
CC              src/input/mpegts/linuxdvb/scanfile.o
CC              src/input/mpegts/iptv/iptv.o
CC              src/input/mpegts/iptv/iptv_mux.o
CC              src/input/mpegts/iptv/iptv_service.o
CC              src/input/mpegts/iptv/iptv_http.o
CC              src/input/mpegts/iptv/iptv_udp.o
CC              src/input/mpegts/tsfile/tsfile.o
CC              src/input/mpegts/tsfile/tsfile_input.o
CC              src/input/mpegts/tsfile/tsfile_mux.o
CC              src/timeshift.o
CC              src/timeshift/timeshift_filemgr.o
CC              src/timeshift/timeshift_writer.o
CC              src/timeshift/timeshift_reader.o
CC              src/dvr/dvr_inotify.o
CC              src/libav.o
CC              src/muxer/muxer_libav.o
CC              src/plumbing/transcoding.o
CC              src/descrambler/tvhcsa.o
CC              src/descrambler/cwc.o
CC              src/descrambler/capmt.o
CC              src/descrambler/ffdecsa/ffdecsa_interface.o
CC              src/descrambler/ffdecsa/ffdecsa_int.o
CC              src/descrambler/ffdecsa/ffdecsa_mmx.o
CC              src/descrambler/ffdecsa/ffdecsa_sse2.o
MKBUNDLE        bundle.c
CC              bundle.o
CC              tvheadend
root@Synology_DS713:/home/tvheadend# make install
/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8)
CC              tvheadend
install -d /usr/bin
install /home/tvheadend/build.linux/tvheadend /usr/bin/tvheadend
install -d /usr/share/man/man1
install /home/tvheadend/man/tvheadend.1 /usr/share/man/man1/tvheadend.1
for bundle in docs/html docs/docresources src/webui/static data/conf data/dvb-scan; d        o \
                mkdir -p /usr/share/tvheadend/$bundle ;\
                cp -Lr /home/tvheadend/$bundle/*  /usr/share/tvheadend/$bundle ;\
        done
find /usr/share/tvheadend -name .git -exec rm -rf {} \; &>/dev/null || /bin/true
root@Synology_DS713:/home/tvheadend#

And now how i can run TVHeadend and where it was install ? In /home i have only directory TVHEADEND(from git) and nothing else


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - aisman - 2014-01-27

I told you that if you don't want to create a user and do everything as root, then search in the root folder all its settings. How do you think it says: "--prefix=/usr"? And this:

Installation paths:
Prefix: /usr
Binaries: ${prefix}/bin
Libraries: ${prefix}/lib
Data files: ${prefix}/share
Man pages: ${datadir}/man


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - pepeEL - 2014-01-27

OK im sorry Smile
I am beginner user linux Smile

But in folder /root i have not tvheadend...
in /usr/bin and other i have some files from tvheadend. But where is it the files for example muxes and tuners... ? When i installed from your package deb on my old DS213 i have this file i /home/hts


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - aisman - 2014-01-27

oh my god!

Sorry, but I'm already tired to write the same thing, I'm sick of it. What I wrote earlier about "tvheadend" files in /etc/default and init.d? ".hts" folder in /root.

@Smiggel

I just installed 5.0 on 411j, checked tvheadend (works fine on DC) and successfully downgraded the firmware back.


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - Smiggel - 2014-01-27

(2014-01-27, 14:54)aisman Wrote: @Smiggel

I just installed 5.0 on 411j, checked tvheadend (works fine on DC) and successfully downgraded the firmware back.

Lucky for you it works on 5.0. Still have no clue what is causing the problem with HDHomerun and TVHeadend.

It's good news that you were also able to downgrade with the 411j. Big relief. :-) I will perform the downgrade tonight, when I am home. Thanks for the help so far. Will post the results tonight.


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - pepeEL - 2014-01-27

(2014-01-27, 14:54)aisman Wrote: oh my god!

Sorry, but I'm already tired to write the same thing, I'm sick of it. What I wrote earlier about "tvheadend" files in /etc/default and init.d? ".hts" folder in /root.


But i have not folder name HTS which is located in folder name root.


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - aisman - 2014-01-27

(2014-01-27, 13:38)Smiggel Wrote:
(2014-01-27, 12:25)aisman Wrote: 1. replace file /etc.defaults/*VERSION (for 5.0) from /etc/*VERSION (make shure /etc/*VERSION is for 4.3)

majorversion="4"
minorversion="3"
buildphase="release"
buildnumber="3810"
smallfixnumber="0"
builddate="2013/11/06"


Code:
cp /etc/*VERSION /etc.defaults/*VERSION
or via MC

don't reboot!

2. In web DSM manualy update 3810, then update-4 in control panel.
3. System will go to reboot, but it will be not start Smile its normal. Wait some time and turn of it.
4. Turn on NAS and via assist go to web DSM, choose "migration", install manualy 3810.pat, after boot install update-4 via web in control panel.

Just to be safe a few questions:

1. I have to replace the file contents first of /etc/*VERSION?
2. "In web DSM manualy update 3810, then update-4 in control panel." Is the system not going to say the sofware is the same? And what do you mean with "update-4"?

You have to replace file. When you do this, and eill go into the DSM to update - system will write what you mean 3810 Smile When you point the firmware file system 3810 -- will not like it, it will offer to download the update for 3810 (update-4), install it. It can even issue warnings, but in the end, when it downloads the update-4 for 3810, it will go to reboot, and then will not start, you have to wait, turn off, turn, and through migration assistant to do.


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - Smiggel - 2014-01-27

(2014-01-27, 15:12)aisman Wrote: You have to replace file. When you do this, and eill go into the DSM to update - system will write what you mean 3810 Smile When you point the firmware file system 3810 -- will not like it, it will offer to download the update for 3810 (update-4), install it. It can even issue warnings, but in the end, when it downloads the update-4 for 3810, it will go to reboot, and then will not start, you have to wait, turn off, turn, and through migration assistant to do.

Ok. I get it! :-) Thanks!


RE: HOW-TO Compile Tvheadend & HDHomerun on Synology NAS - pepeEL - 2014-01-27

Please help and dont be angry for me.