Project

General

Profile

Scan tables: I made a script

Added by Chris G about 4 years ago

Hi. I have made a script that generates scan tables from a popular sat website.
The tables are accepted in TVH, I can select them in predefined muxes, but they always fail to scan.

This is what TVH tells me failed to tune [e=Invalid argument]

If I manually create the same mux with the exact same settings it works though.

Perhaps the format and/or naming of my tables is the issue?

Here is an example with only one mux to make things easier...

[CHANNEL]
    DELIVERY_SYSTEM = DVBS
    FREQUENCY = 10714250
    POLARIZATION = HORIZONTAL
    SYMBOL_RATE = 22000
    INNER_FEC = 5/6
    MODULATION = QPSK
    INVERSION = AUTO

That is the complete contents of the file and the file is named "28.2E". It is in a folder named "dvb-s" which I point TVH at under the general settings.

Can anyone suggest why this isn't working? Manually creating the exact same mux works as expected. Using scan tables from https://git.linuxtv.org/dtv-scan-tables.git/log work also.

What am I missing?

Thanks,
Chris


Replies (6)

RE: Scan tables: I made a script - Added by Chris G about 4 years ago

king of sat is the site that my script gets the ini files from. I then convert them to scan table format but TVH doesn't like them.
If TVH supported ini format that would be sweet.

Here is the scrip I made... Maybe someone can see the problem?


#!/bin/bash

urls=$(lynx --dump -nonumbers -listonly https://en.kingofsat.net/satellites.php | grep dl.php?)

mkdir -p $PWD/dvb-s/
rm -f $PWD/dvb-s/*

for url in $urls
do
    url=$(echo $url | sed 's/fkhz=0/fkhz=1/')
    wget -O tmp.ini -P $PWD/ $url
    pos=$(grep -m1 "2=" $PWD/tmp.ini | sed 's/.*=//' | tr -cd '[:alnum:]._-')
    sed -i 's/[[:digit:]].*=//g' $PWD/tmp.ini
    sed -i 's/^[ \t]*//' $PWD/tmp.ini
    awk -v FS=, 'NF>=6' $PWD/tmp.ini > tmp && mv tmp $PWD/tmp.ini
    while read mux
    do
        frq=$(echo $mux | awk -v FS=, '{print $1}')
        pol=$(echo $mux | awk -v FS=, '{print $2}')
        sym=$(echo $mux | awk -v FS=, '{print $3}')
        fec=$(echo $mux | awk -v FS=, '{print $4}' | sed 's/./&\//g' | sed 's/\/*$//')
        del=$(echo $mux | awk -v FS=, '{print $5}')
        mod=$(echo $mux | awk -v FS=, '{print $6}')
        if [ $pol == "H" ]
        then
            pol=HORIZONTAL
        elif [ $pol == "V" ]
        then
            pol=VERTICAL
        elif [ $pol == "R" ]
        then
            pol=RIGHT
        elif [ $pol == "L" ]
        then
            pol=LEFT
        fi
        if [ $del == S2 ]
        then
            del=DVBS2
        else
            del=DVBS
        fi
        if [ $mod == "8PSK" ]
        then
            mod="PSK/8" 
        fi

    echo "[CHANNEL]
    DELIVERY_SYSTEM = $del
    FREQUENCY = $frq
    POLARIZATION = $pol
    SYMBOL_RATE = $sym
    INNER_FEC = $fec
    MODULATION = $mod
    INVERSION = AUTO

    " >> $PWD/dvb-s/$pos
    done < $PWD/tmp.ini
    rm $PWD/tmp.ini
done

Chris

RE: Scan tables: I made a script - Added by Dave Pickles about 4 years ago

Here is a sample from the scan tables distributed with TVHeadend:

[CHANNEL]
        DELIVERY_SYSTEM = DVBS
        FREQUENCY = 11817000
        POLARIZATION = VERTICAL
        SYMBOL_RATE = 27500000
        INNER_FEC = 2/3
        MODULATION = QPSK
        INVERSION = AUTO

Yours is missing some zeros...

RE: Scan tables: I made a script - Added by saen acro about 4 years ago

@ Dave Pickles this is dvbapi v5 format
there is not so big diference except this format is larger

[CHANNEL]
        DELIVERY_SYSTEM = DVBS
        FREQUENCY = 11817000
        POLARIZATION = VERTICAL
        SYMBOL_RATE = 27500000
        INNER_FEC = 2/3
        MODULATION = QPSK
        INVERSION = AUTO

is equal to
1=11817,V,27500,23,DVB-S,QPSK

RE: Scan tables: I made a script - Added by Flole Systems about 4 years ago

It's not about the format, it's about a parameter being wrong (the symbol rate to be more specific).

RE: Scan tables: I made a script - Added by Chris G about 4 years ago

Thanks for the replies guys...
You are correct, them symbol rate needs the extra 0's. Its strange because when manually adding a mux, it doesn't matter.

EDIT: This is the change I made SYMBOL_RATE = "$sym"000

    (1-6/6)