[TOOL] OSCAM picon generator script based on your E2 picons

There are 38 replies in this Thread which was already clicked 26,254 times. The last Post () by s3n0.

    • Official Post

    Hi,


    This script allows you to create picons in .tpl format this will allow you to display picons in the OScam Webif (tab USERS).
    This script will use your Enigma2 picons (.png format) et your oscam.srvid file to create the .tpl format picons.


    You need to first to edit the script to configure it according to your needs:
    (use a Unix/Linux compatible editor for it)


    PathToPiconPNG="/media/usb/picon"
    PathToOscamSrvid="/etc/tuxbox/config/oscam.srvid"
    PathToPiconTPL="/media/usb/piconTPL"
    PathToTmp="/tmp"


    PathToPiconPNG: mention the path to your Enigma2 picons
    Most of the time can be: "/media/usb/picon" or "/media/hdd/picon" or "/media/cf/picon" or "/usr/share/enigma2/picon"


    PathToOscamSrvid: specify the complete path to access your oscam.srvid file (including file name!)


    PathToPiconTPL: give here the destination folder for the .tpl picons (this folder will be created if it doesn't exist)


    PathToTmp: the temporary folder to use, normally you shouldn't change it.


    Script created by Pr2 for streamboard.tv


    When picons are created, you need to enable the 'show picons' option in OScam and specify the .tpl picon path in your oscam.conf:


    Code
    [webif]
    httpshowpicons                = 1
    httptpl                       = Path_To_Picon_TPL


    Normally "Path_To_Picon_TPL" is the one defined in the variable: PathToPiconTPL


    You need to restart OScam to have the picons properly displayed in the USERS tab.


    To install:
    Download the attached pack somewhere on an USB key or on your PC.
    Then in telnet:
    go to the folder with the file and type:


    Code
    tar -xvzf OscamPiconsTpl-*.tgz


    Enjoy!


    Pr2 for streamboard.tv
    (signature is part of this script, message to cut&past specialists who often forgot to include it but put their own instead).

  • hello
    I'm trying to create picon for Oscam to no avail, you can have a detailed guide for the creation and configuration files?
    thanks

  • Hi,


    I don't understand your question, if picon is not available, create it for Enigma2 and use my script to convert it to Oscam picon format.
    Format for Enigma2 picon is PNG 8 bits, format 100x60 pixels.


    If you ask for the naming convention used in E2 the easiest way is to assign the picon your create with Dreamboxedit to the channel so the picon will be properly renamed by DreamboxEdit.


    Another way to find the naming convention is to add the channel in a favourite (userbouquet file) and edit it to check what it's "internal" name.


    Pr2

  • Has anybody used this script? I know it works because people have reported it to be very useful but for the life of me I cant get it to work..


    I have tried it on both VU+ & Ubuntu. In both cases it went through all the .png picons reporting "encoded with base64" but in the output directory all i get is .tpl files 22bytes in size containing


    Code
    data:image/png;base64


    but no image data..


    I have openssl installed


    Any ideas?




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • I'm sorry if I make some preliminary,
    picon is an image that represents the channel logo, here you can find the ones you want LYNGSAT LOGO - Satellite Broadcast Logos
    picon is used to show channel logo on information bar of decoder when changing channel,
    in this case you need a particular format png to be called as the service reference channel
    79305874f9daa8ce618249e7.png 1_0_1_213F_3070_13E_820000_0_0_0.png
    picon png can be created from image, or you can find ready-made


    picon png format can be converted into tpl format, tpl is the format required to view the image in webif
    you can find picon tpl ready searching on Google or build your own
    there are 2 ways to convert their: OscamPiconsTPL , picon_encode
    OscamPiconsTPL
    follow the instructions in README.txt, I've tried it and it works well, is very important to have oscam.srvid updated and corresponding picon.png
    picon_encode
    is a software that automatically converts from picon.png to picon.tpl


    At this point, I apologize for having dwelt extensively on the subject, Here we continue to discuss OscamPiconsTPL,
    if you feel it appropriate, we can deepen picon TPL on a specific post
    thanks for your attention

    together we grow - ferdi

  • Quote

    OscamPiconsTPL
    follow the instructions in README.txt, I've tried it and it works well, is very important to have oscam.srvid updated and corresponding picon.png


    Thanks for the reply m8 but what you have said does not deal with my question.
    I am only interested in this script. I have followed the readme to the letter.
    I have all the picons in png format & I have latest oscam.srvid file..
    I am not sure about base64 on my test machines but I deffo have openssl which according to the readme should suffice.


    Thankyou




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • Hi,


    How do you define the variables in the script, please cut and paste the values here?
    Moreover openssl is ONLY used when base64 doesn't exist at all on the system, so in your case I guess that it is base64 which is used.
    Try:


    Code
    base64 --help


    To see if it is installed and working.


    Pr2

  • Thanks for the reply m8, I am eager to get your script working.. Here is the output from

    Code
    base64 --help


    Output from Ubuntu 12 Server




    Output from VU+





    Also m8, I must confess I have Zero knowledge of base64 on linux




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • Hi,


    Thanks but I didn't ask you to post this base64 output, so it seems that base64 is working on your system, I ask you this:


    "How do you define the variables in the script, please cut and paste the values here?"


    Please ensure that you set the / at the end of the path that you define in the variables, like mentionned in the default values.
    script should work for you since it works for others with similar configuration, I develop the script on Ubuntu 12.04... it has been tested on several different system.


    Do you use a valid Unix editor to edit it and change the variables values?


    It would also be interesting to post and output of the script when you run it.
    You can easily redirect the script output to a file:


    Code
    ./OscamPiconsTPL.sh > /tmp/logTPL.txt


    You can also try to install the package dos2unix and run it on the script:


    Code
    dos2unix ./ OscamPiconsTpl.sh


    Then try again the script.


    Can the user that you use write to the /tmp directory?


    Pr2

  • Quote

    How do you define the variables in the script, please cut and paste the values here?


    Here is how I setup variables on ubuntu:


    PathToPiconPNG="/var/OscamPicon/picon/"
    PathToOscamSrvid="/usr/local/etc/oscam.srvid"
    PathToPiconTPL="/var/OscamPicon/piconTPL"
    PathToTmp="/tmp/"




    Quote

    Please ensure that you set the / at the end of the path that you define in the variables, like mentionned in the default values.
    script should work for you since it works for others with similar configuration, I develop the script on Ubuntu 12.04... it has been tested on several different system.


    Yes m8, all setup as asked in attached README.txt & using up-to-date ubuntu 12.04




    Quote

    Do you use a valid Unix editor to edit it and change the variables values?


    Yes, I used Notepad++




    Quote

    It would also be interesting to post and output of the script when you run it.
    You can easily redirect the script output to a file:


    Running now with Log set to temp...


    here is the log...
    logTPL.rar



    Quote

    You can also try to install the package dos2unix and run it on the script:


    Code
    dos2unix ./ OscamPiconsTpl.sh


    Same result after converting file to Unix format m8, all files 22 bytes..




    NOTE: I am not sure if this is relevant, but the picon set I am currently using for this test is:
    Picons for Enigma and XVDR


    But I have tried other sets from my VU+ also


    Here is a sample of the .tpl files created
    Sample output .tpl files.rar


    Thanks for your help m8, really hope we can get to the bottom of this...




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • M8, problem sorted, It was me being a twat..


    When I tried to run the script originally I got "Bad substitution" error so I changed..


    Bash
    #!/bin/sh


    to

    Bash
    #!/bin/bash


    and the script executed..


    When I re-examined the script, I found that I had added

    Bash
    #!/bin/bash


    rather than replace

    Bash
    #!/bin/sh


    All is now working, sorry for wasting your time m8 & great script..




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • Hi,


    Great to heard that the script is working for you too now, but normally you don't have to change the shebang (#!/bin/sh), the script is written to work in "standard shell" not in "bash" since afaik bash is not available on STB, and scripting language is somehow different between bash and sh, so I not even sure that this script will work in bash (not tested).


    If you need to change #!/bin/sh to #!/bin/bash to have it working than you have probably a mess up in the shell in your Linux distro.


    Pr2

  • Quote

    so I not even sure that this script will work in bash (not tested).


    It does work perfect for me in bash


    Quote

    If you need to change #!/bin/sh to #!/bin/bash to have it working than you have probably a mess up in the shell in your Linux distro.


    I will look into it m8, Im relevantly new to linux (1 Year) so still learning..
    Strangly enough though m8, I tested it on 2 different fresh ubuntu 12.04 installs (x86 & x64) and #!/bin/sh would not work on either..
    But I am very pleased to have it working now.
    Also m8, I hope to see you here a bit more often, your expertise is most appreciated..
    Thank you for your time and great script.


    TF




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • pr2


    Hi m8, I'm back but this is just a minor problem :laugh:


    I have the script working a treat now m8 but I have come across a few small problems when running it on picon sets with multiple CAID's


    Here is an example


    N0va Sports
    1_0_1_1581_C92_3_EB0000_0_0_0.png


    0963:Sly Sports 2
    1_0_1_1581_7EA_2_11A0000_0_0_0.png




    The N0va Sports .png gets encoded and renamed to:


    IC_0963_1581.tpl



    I am not 100% sure but this could be caused by Satellite BG no longer being in operation on 23.5E..




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • Hi,


    This is not a bug, the problem is that SID should be unique on the same satellite (even if it is not always the case) so if you receive multiple satellites you will have multiple time the same SID for different channels!


    OScam never take into account the name space (in red) only the SID (in green), the name space give the satellite position and so can avoid such problem:


    1_0_1_1581_C92_3_EB0000_0_0_0.png


    1_0_1_1581_7EA_2_11A0000_0_0_0.png


    So I have no way to make the distinction between both and the way OScam is working doesn't provide any solution for it.
    So l am looking for the CAID (in blue) based on the SID so if there are multiple entries the script can override on picon by another one.


    IC_0963_1581.tpl


    You have the same problem for the TV channel name displayed in OScam it will either show you: N0va Sports or S*** Sport 2 depending on the latest one in your oscam.srvid file... sorry there is no automatic solution for it.
    If the CAID are different, run the script with special oscam.srvid per satellite (and not all the services in the same file), so it will find the right CAID linked to the SID for this satellite. But if CAID are the same, you will have to choose yourself which picon to keep!


    00EB0000 = 23.5 E
    011A0000 = 28.2 E


    If 23.5E is no longer valid clean up your oscam.srvid


    Pr2

  • Ok m8, I understand what you are saying..


    For now, I will generate one CAID at a time..


    One solution to this particular rare problem might be to add a check to the script where the CAID is generated from the namespace before the script looks to the oscam.srvid file for renaming..
    Would this be a complicated process to implement?




    All your problems have been solved countless times before so try the search box before you post!!
    Please do not Request help by PM, use the main forum so Everyone can benefit from the answers.

  • Hi,


    I retrieve the CAID from the oscam.srvid file based on the SID, in the oscam.srvid I have no reference to the namespace so this is not a solution.


    Picons have the satellite position in there name thanks (namespace, like explained above) so you can run the script several time with a proper oscam.svrid for each satellite that you receive, this will gives you a better result with less fake positive.
    But if you still have common files after that, you will have to choose.


    Pr2

OSCam Support Forum

Configs, discussion, downloads and guides for OSCam Softcam.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!