Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Tvheadend and Bouquets

Options
  • 08-04-2018 12:31pm
    #1
    Registered Users Posts: 14,009 ✭✭✭✭


    Is it possible to generate from within tvheadend, a bouquet which reflects the 'manually set up' channel listing presently in use?

    The tvheadend help page provides this info
    The fastscan bouquets are pre-defined in the configuration tree. These bouquets must be manually enabled to let Tvheadend to subscribe and listen to the specific MPEG-TS PIDs.

    You may import your own bouquet using enigma2 (.tv) formatted files.

    OK, I can import a bouquet but I cannot locate any further information on generating one.

    It would be very nice to have such a bouquet to store for later use on whatever device I might decide to use or test.

    Any ideas? Did I miss something simple?


Comments

  • Closed Accounts Posts: 4,456 ✭✭✭The high horse brigade




  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951



    Thank you much!

    I will see what I can extract and if it will import into tvheadend.

    regards.


  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    No luck last night .... cannot find detailed and explicit instructions of what steps are needed, or indeed what the entries in the file should look like.

    I will continue to look ..... but if anyone has any suggestions ........ please do :)


  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    Well I finally made progress ...... after I realised how stupid I was being! :o

    I was adminning the server over the LAN but I had the bouquet file saved on my PC and it was not being shared to the server, so it could not find the file!

    I began working on it using a tvheadend server on my own PC, and have the bouquet file working there.

    My thanks to The high horse brigade for the bouquet files he provided.
    I am creating one of my own from that information.

    I did not realise how simple the file syntax was until now. All very logical and simple really. Each entry is similar to these two.
    #SERVICE 1:0:19:1b1d:802:2:11a0000:0:0:0:
    #DESCRIPTION BBC One HD
    #SERVICE 1:0:19:1b1f:802:2:11a0000:0:0:0:
    #DESCRIPTION BBC One NI HD
    #SERVICE 1:0:19:1b1c:802:2:11a0000:0:0:0:
    #DESCRIPTION BBC Two HD
    

    Big question ...... is there somewhere a list of the 'Service' info for each channel? I am missing a few channels and would like to add them, if I can get the 'Service' info. I know of three at present but there are likely more
    Sony Crime
    Sony Crime +1
    ITV +1

    I am listing FTA channels only, and no Sky channels.

    If anyone can point me in the right direction for that info I would be grateful.

    Thanks.


  • Closed Accounts Posts: 4,456 ✭✭✭The high horse brigade


    Service info is usually saved in lamedb after a channel scan, the bouquets just call channels from this db


  • Advertisement
  • Registered Users Posts: 1,417 ✭✭✭Dr4gul4


    John, could you impart some wisdom my way on this, How do you load the .tv files in to tvheadend, I know you can manually create within it, and technically point said create to a location, smb share etc, but for not making much head way after that.


  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    Dr4gul4 wrote: »
    John, could you impart some wisdom my way on this, How do you load the .tv files in to tvheadend, I know you can manually create within it, and technically point said create to a location, smb share etc, but for not making much head way after that.

    Log into tvheadend web page at
    http://<IP address of device>:9981
    and go to
    Configuration - Channel/EPG - Bouquets
    Select 'Add' which brings up a window to set up a new bouquet.

    You drag & drop the bouquets.tv file into the box "External URL" and select your preferred options for the rest of the boxes.
    If you have this new bouquet "Enabled" and set to 'Auto map to channel' then the channels listed in the bouquets.tv file will be added to your channel list.
    As I found out the bouquets.tv file should be stored on the device itself.
    The channels will be listed in the order they appear in the bouquets.tv file.
    "Channel number offset" allows you to specify the starting number of the first bouquet channel ...... this is useful where you have Saorview channels listed first, so enter maybe 30 here to ensure no duplicate numbers are used.

    That is about as much as I have learned so far ...... and is of course open to correction as all this is new to me. ;)


  • Registered Users Posts: 1,417 ✭✭✭Dr4gul4


    Log into tvheadend web page at
    http://<IP address of device>:9981
    and go to
    Configuration - Channel/EPG - Bouquets
    Select 'Add' which brings up a window to set up a new bouquet.

    You drag & drop the bouquets.tv file into the box "External URL" and select your preferred options for the rest of the boxes.
    If you have this new bouquet "Enabled" and set to 'Auto map to channel' then the channels listed in the bouquets.tv file will be added to your channel list.
    As I found out the bouquets.tv file should be stored on the device itself.
    The channels will be listed in the order they appear in the bouquets.tv file.
    "Channel number offset" allows you to specify the starting number of the first bouquet channel ...... this is useful where you have Saorview channels listed first, so enter maybe 30 here to ensure no duplicate numbers are used.

    That is about as much as I have learned so far ...... and is of course open to correction as all this is new to me. ;)


    Drag and Drop :( Ahh jaysus ... Never would have realised that at all


  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    Service info is usually saved in lamedb after a channel scan, the bouquets just call channels from this db

    Yes but where the channel is not listed in this file where do I get the info?

    I am really looking for a reference list giving this info for all channels available. What is in the lamedb is not a complete list, but those that are generated in the device, from what I can tell.

    Is there such a list?

    EDIT:
    For instance Sony Crime and Sony Crime +1 are not listed in your lamedb or lamedb5 files that I can find.


  • Registered Users Posts: 1,417 ✭✭✭Dr4gul4


    Log into tvheadend web page at
    http://<IP address of device>:9981
    and go to
    Configuration - Channel/EPG - Bouquets
    Select 'Add' which brings up a window to set up a new bouquet.

    You drag & drop the bouquets.tv file into the box "External URL" and select your preferred options for the rest of the boxes.
    If you have this new bouquet "Enabled" and set to 'Auto map to channel' then the channels listed in the bouquets.tv file will be added to your channel list.
    As I found out the bouquets.tv file should be stored on the device itself.
    The channels will be listed in the order they appear in the bouquets.tv file.
    "Channel number offset" allows you to specify the starting number of the first bouquet channel ...... this is useful where you have Saorview channels listed first, so enter maybe 30 here to ensure no duplicate numbers are used.

    That is about as much as I have learned so far ...... and is of course open to correction as all this is new to me. ;)


    Drag and Drop, seems to open the file in chrome, Perhaps the contents of said file ? altho I think i follow you when you say the files must also exist in the Tx3 server also ... Just not sure where to store them ,, :confused::confused:


  • Advertisement
  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    Dr4gul4 wrote: »
    Drag and Drop, seems to open the file in chrome, Perhaps the contents of said file ? altho I think i follow you when you say the files must also exist in the Tx3 server also ... Just not sure where to store them ,, :confused::confused:

    Maybe this will help ....

    I opened the Tanix using SMB from my PC and in there I created a new directory under 'Userdata', called Bouquets.

    I dragged and dropped my new bouquets.tv files into that location.

    Next I opened an ssh session with the Tanix and confirmed the actual path of one of the files to be correct, by displaying its contents in the terminal .......
    # cat /storage/.kodi/userdata/Bouquets/bbc.tv
    #NAME   - -  Free To Air
    #SERVICE 1:64:1:0:0:0:0:0:0:0:
    #DESCRIPTION 28.2E -- Free To Air --
    #DESCRIPTION -- BBC --
    #SERVICE 1:0:19:1b1d:802:2:11a0000:0:0:0:
    #DESCRIPTION BBC One HD
    #SERVICE 1:0:19:1b1f:802:2:11a0000:0:0:0:
    #DESCRIPTION BBC One NI HD
    #SERVICE 1:0:19:1b1c:802:2:11a0000:0:0:0:
    #DESCRIPTION BBC Two HD
    #SERVICE 1:0:19:22e3:80d:2:11a0000:0:0:0:
    #DESCRIPTION BBC Four HD
    #SERVICE 1:0:19:1b29:802:2:11a0000:0:0:0:
    #DESCRIPTION BBC RB HD
    #SERVICE 1:0:1:18f6:7fd:2:11a0000:0:0:0:
    #DESCRIPTION BBC RB1
    

    As you are aware the actual path is not displayed when viewing over SAMBA so it can become a little confusing.

    When I set up the new bouquets in tvheadend on the Tanix, I used the path above and just changed the name of the .tv file to suit the new bouquet.
    file:///storage/.kodi/userdata/Bouquets/<file>.tv

    Hope that helps.


  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    I am getting a bit desperate here as I cannot find anything on line that lists the Service Information Data like this
    #SERVICE 1:0:19:1b1d:802:2:11a0000:0:0:0:
    #DESCRIPTION BBC One HD

    Neither do I know how to generate such information from within tvheadend.

    If anyone has any ideas please share ...... I am out of them ATM. :(


  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    Tvheadend does have the ability to show the SID.
    It already uses that info in the picon associated with each channel.
    I used that info to get both the Sony Crime channels, that I had been missing, into my bouquet file.

    Still no luck finding a comprehensive list of SIDs for the Astra 28.2E channels.


  • Moderators, Technology & Internet Moderators, RicherSounds.ie Moderator Posts: 2,505 Mod ✭✭✭✭The Ritz


    Hi,

    I appreciate that you're very expert at this but would you be able to extract the SIDs from Lyngsat - https://www.lyngsat.com/Astra-2E-2F-2G.html ?

    If I have the wrong end of the stick here, say so, I've no shame !!


    Cheers,

    Ritz.


  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    The Ritz wrote: »
    Hi,

    I appreciate that you're very expert at this but would you be able to extract the SIDs from Lyngsat - https://www.lyngsat.com/Astra-2E-2F-2G.html ?

    If I have the wrong end of the stick here, say so, I've no shame !!


    Cheers,

    Ritz.

    Heck I'm no expert at this. I am just blundering my way around trying to get things working as I would like. :)

    Thanks for the suggestion ...... I will have a look and see if the info is available from there ;)


  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    This is the type of info I want to get
    1_0_1_22E3_80D_2_11A0000_0_0_0   bbc four
    
    This is what is on that page you linked to
    BBC Four (19-04)	&#65532; 6316	5200	5201 Eng
    

    Maybe there is some correlation but if so I don't see it, but if someone else does I hope they post.


  • Moderators, Technology & Internet Moderators, RicherSounds.ie Moderator Posts: 2,505 Mod ✭✭✭✭The Ritz


    The Lyngsat site includes an SID (for BBC Four its 6316) - I didn’t register the format quoted in your earlier post which I guess is unrelated.

    Good luck with the search.

    Ritz.


  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    The Ritz wrote: »
    The Lyngsat site includes an SID (for BBC Four its 6316) - I didn’t register the format quoted in your earlier post which I guess is unrelated.

    Good luck with the search.

    Ritz.

    I am unsure, but what I 'think' is that I am looking for

    Service Information Data (SID)

    and what we see usually is

    Service ID which is the number on the Lyngsat page.

    I expect they are related, but have no idea in what manner :)


  • Registered Users Posts: 1,417 ✭✭✭Dr4gul4


    I am unsure, but what I 'think' is that I am looking for

    Service Information Data (SID)

    and what we see usually is

    Service ID which is the number on the Lyngsat page.

    I expect they are related, but have no idea in what manner :)

    I've been tricking with the bouquets file, and found that using Dreamboxedit, I can load the lamedb5 File ( locally on my win 10 machine ) , from there I can review each service via the Show/edit details, and reveal the assoicated Service ID ...

    In theory... It's a rought one, but you maybe able to build up your own Bouquet from it..


  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    Dr4gul4 wrote: »
    I've been tricking with the bouquets file, and found that using Dreamboxedit, I can load the lamedb5 File ( locally on my win 10 machine ) , from there I can review each service via the Show/edit details, and reveal the assoicated Service ID ...

    In theory... It's a rought one, but you maybe able to build up your own Bouquet from it..

    Thanks, I don't have Windows so that option is out.

    I have devised a way to get the Service Info I need.
    If using picons, each picon has the service ID as its name (in slightly different format but no problem).

    So what I have done is this

    curl http://<IP ADDY>:9981/api/channel/list

    which produces a list of channels with
    Key and Ch. Name associated

    Each channel has a bouquet file under tvheadend/channel/config which is named with the 'Key' and has in its file the related picon name.

    So by comparing the 'Keys' and extracting the Channel Name from one and the relevant picon name (Service Info Data) from the other, I saved them both to an E2 style bouquet.tv file.

    The only thing I have not achieved is the correct order of the channels in the bouquet file.

    I still don't know how much information can be stored in an E2 bouquet file.
    For instance can the channel number be inserted?

    I still have some way to go to get this as good as I need it to be, but I am well on the way it seems.

    For the moment I have broken the single bouquet up into smaller files which are much easier manage manually to get the channels in the order I want.
    I have them separate into such as
    Saorview,
    BBC,
    ITV,
    Sports,
    News etc.
    I can then specify in what order those bouquets are listed which gets me an acceptable compromise for the present.

    The key to the whole thing was coming across a post that listed some accessible pages in tvheadend which between them have the info I wanted.
    https://github.com/primaeval/script.tvguide.fullscreen/issues/88
    I suspect there are other pages I am unaware of, one of which quite likely has the info all together ........ IF I only knew what that was. :)


  • Advertisement
  • Closed Accounts Posts: 4,456 ✭✭✭The high horse brigade


    Dreamboxedit can run in wine. I use it on Fedora


  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    Dreamboxedit can run in wine. I use it on Fedora

    Thanks ...... but I do not have WINE installed and am highly unlikely to install it.
    Hopefully I can get what I need with a simple BASH script.


  • Registered Users Posts: 980 ✭✭✭Kenny Powers




  • Registered Users Posts: 172 ✭✭PureIsle


    error

    Post edited by PureIsle on


  • Registered Users Posts: 14,009 ✭✭✭✭Johnboy1951


    I have just noticed that I never did post my solution in this thread .... mea culpa ....... better late than never? ..... hopefully!


    I run this on my network connected Linux PC and it produces a bouquet file for all those channels I have already manually mapped. I can then arrange the channels in the file as I wish them to be displayed. I delete the manual mappings and instead use the generated file.


    Once I save the re-arranged file it can be used whenever I wish without any further work.


    If I make changes to the channels - new channels available or channels no longer available - all I need do is edit the file and use the edited file.


    #!/bin/bash
    #
    # This only works where picons are used
    # If icons are used then the output is useless
    #
    FILE="$HOME/Downloads/MyBouquets/March2022_Bouquet"
    ADDY="192.168.1.22" # where '22' is the address of the tvh server
    echo "#NAME My Free To Air Bouquet
    #DESCRIPTION -- List All Channels --" > $FILE.tv
    # This is the command that extracts the needed info to create an Enigma Type Bouquet for TVHeadend
    # and adds the info to the file.
    curl http://$ADDY:9981/api/channel/grid?limit=999 | sed 's|},{|}\n\n{|g' | sed 's|"name":|#DESCRIPTION |g' | sed 's|"icon":"picon://|#SERVICE |g' | cut -d ',' -f4,5,6 | sort -n -k2 -t :| sed '/./,$!d' | sed 's|.png||g' | sed 's|"||g' | sed 's|_|:|g' | awk -F, '{print $1" "$3}' | sed 's|#|\n#|g'   >> $FILE.tv
    exit
    




Advertisement