ABOUT ME

-

Today
-
Yesterday
-
Total
-
  • ASUS 공유기(RT-AC68U) tvheadend 설치
    잡다한 주제/기타 and 미분류 2017. 11. 27. 14:56

    벚꽃난님의 블로그가 사라져서 Archiving 된 링크의 글을 블로그로 옮겨 놨습니다.

    -----------------------------------------------------------------------


    * 스왑 설정 (미설정 시 관리자 페이지 접속 불가)

    4번 참조



    * 공유기 옵션 변경

    LAN -> IPTV

    멀티캐스트 라우팅 (IGMP Proxy) -> 사용

    효과적인 멀티 캐스트 전달 활성화 (IGMP Snooping) -> 사용



    1. tvheadend 설치 (4.2.2 버전 첨부)

    *첨부한 tvheadend 설치 (네트워크 삼바를 이용해 /opt (entware 폴더)로 이동)

    opkg install /opt/tvheadend_4.2.2-1_armv7soft.ipk

    nano /opt/etc/init.d/S71tvheadend

    -----------------------------------------------------------------------------

    ARGS="-C -f -u username (공유기 접속 아이디) -g root -c /opt/etc/tvheadend --nobackup"

    -----------------------------------------------------------------------------


    * 방화벽 설정

    nano /jffs/scripts/firewall-start

    --------------------------------------------

    #!/bin/sh

    iptables -I INPUT -p tcp --dport 9981 -j ACCEPT
    iptables -I INPUT -p tcp --dport 9982 -j ACCEPT

    --------------------------------------------

    service restart_firewall


    * 실행

    /opt/etc/init.d/S71tvheadend start


    * 접


     
    2. tvheadend 설정

    * IP 주소 추출


    * 채널 등록


    m3u 파일 URL  :  file://opt/example.m3u


    3. 시스템 시간 설정

    opkg install zoneinfo-asia

    ln -sf /opt/share/zoneinfo/Asia/Seoul /etc/localtime

    nano /opt/etc/init.d/S00timezone

    --------------------------------------------------

    #!/bin/sh

    start() {
        ln -sf /opt/share/zoneinfo/Asia/Seoul  /etc/localtime
    }

    stop() {
        rm -rf /etc/localtime
    }

    case "$1" in
        start)
            start
            ;;
        stop)
            stop
            ;;
        restart)
            stop
            start
        ;;
        *)
        echo "Usage: $0 {start|stop}"
        ;;
    esac

    --------------------------------------------------

    chmod +x /opt/etc/init.d/S00timezone


    4. EPG 설정


    Configuration -> Channel / EPG -> EPG Grabber Modules -> External: XMLTV -> Enabled 체크 -> Save
    (옵션이 안보이면 Configuration -> General -> User interface level -> Expert -> Save)

    opkg install python-light python-pip python-requests python-lxml

    pip install beautifulsoup4


    * EPG 실행

    epg2xml.py, epg2xml.json, Channel.json 파일을 윈도우 네트워크 삼바를 이용해 /opt/ (entware 폴더)로 이동

    python /opt/epg2xml.py -i SK or KT or LG -s /opt/etc/tvheadend/epggrab/xmltv.sock


    * EPG 스케줄 등록

    echo "" >> /jffs/scripts/services-start
    echo "sh /opt/etc/tvheadend/xmltv" >> /jffs/scripts/services-start
    echo "cru a UpdateEPG \"0 0 */1 * * /opt/etc/tvheadend/xmltv\"" >> /jffs/scripts/services-start

    nano /opt/etc/tvheadend/xmltv

    --------------------------------------------------------------

    #!/bin/sh 

    python /opt/epg2xml.py -i SK or KT or LG -s /opt/etc/tvheadend/epggrab/xmltv.sock

    --------------------------------------------------------------

    chmod +x /opt/etc/tvheadend/xmltv

    sh /opt/etc/tvheadend/xmltv


    5. 녹화 설정

    Configuration -> Recording

    ----------------------------------------------------

    Recording system path: /mnt/sda1/movie (외장 SSD/HDD 경로) 
    Filename character set: UTF-8
    Format string: $t.$e.%F.HDTV.TS.1080p.$x
    Use Windows-compatible filenames: check

    ----------------------------------------------------


    6. 클라이언트 설정


    KODI or tvhclient 클라이언트 사용







    댓글