How to make more than three radio streams such as 10 ?
  • Hello Airtime heard that you can make as many threads but can `t find where edit the table or configuration might not explained to the man how to do this?
  • 14 Comments sorted by
  • to add another stream


    in /usr/share/airtime/public/js/airtime/preferences/streamsetting.js
    change setPseudoAdminPassword:

    function setPseudoAdminPassword(s1, s2, s3, s4) {
    if (s4) {
    $('#s4_data-admin_pass').val('xxxxxx');
    setPseudoAdminPassword(data.s1, data.s2, data.s3, data.s4);
    setPseudoAdminPassword(json.s1_set_admin_pass, json.s2_set_admin_pass, json.s3_set_admin_pass, json.s4_set_admin_pass);

    change /usr/share/airtime/application/controllers/ApiController.php:

    $streams = array("s1", "s2", "s3", "s4");


    change /usr/share/airtime/application/controllers/PreferenceController.php

    $s4_data = array();
    } elseif (strpos($v[0], "s4_data") !== false) {
        $s4_data[$matches[1]] = $v[1];
        $values["s4_data"] = $s4_data;
        $s4_set_admin_pass = !empty($values["s4_data"]["admin_pass"]);
        "s4_set_admin_pass"=>$s4_set_admin_pass,
       
    and in getAdminPasswordStatusAction()

    modify the loop        

    for ($i=1; $i<=4; $i++) {


    add in /usr/lib/airtime/pypo/bin/liquidsoap_scripts

    add this

    s4_connected = ref ''
    s4_namespace = ref ''

    and this

    if s4_enable == true then
        if s4_output == 'shoutcast' then
            s4_namespace := "shoutcast_stream_4"
        else
            s4_namespace := s4_mount
        end
        server.register(namespace=!s4_namespace, "connected", fun (s) -> begin log("#{!s4_namespace}.connected") !s4_connected end)
        output_to(s4_output, s4_type, s4_bitrate, s4_host, s4_port, s4_pass,
                    s4_mount, s4_url, s4_name, s4_genre, s4_user, s, "4",
                    s4_connected, s4_description, s4_channels)
    end


    and change this

    fun (s) -> begin log("streams.connection_status") "1:#{!s1_connected},2:#{!s2_connected},3:#{!s3_connected}" end)

    in

    fun (s) -> begin log("streams.connection_status") "1:#{!s1_connected},2:#{!s2_connected},3:#{!s3_connected},4:#{!s4_connected}" end)

    ON Databese
    On cc_pref table change 'num_of_streams' value in 4
    On cc_stream_setting add this line



     s4_channels        | string
     s4_genre           | string
     s4_mount           | string
     s4_output          | string
     s4_port            | integer
     s4_type            | string
     s4_user            | string
     s4_host            | string
     s4_pass            | string
     s4_admin_pass      | string
     s4_admin_user      | string
     s4_bitrate         | integer
     s4_liquidsoap_error| string
     s4_name            | string
     s4_description     | string
     s4_url             | string
     s4_enable          | boolean

    if I remember good it's all
    Post edited by Giuseppe Cristofaro at 2014-09-15 09:47:17


  • On cc_pref table, look for 'num_of_streams' and change the value.



    if you change the num_of_streams on the cc_pref table liquidsoap not working, I have this problem
  • Interesting question !
  • Where do i find cc_pref table ?


  • On cc_pref table, look for 'num_of_streams' and change the value.



    if you change the num_of_streams on the cc_pref table liquidsoap not working, I have this problem


    I seem to have the same issue, i have adjusted all the files and triple checked the data inputs to be the same as above post but when i try saving the additional options per stream, the server ignores the updated info and doesn't store it in the database ? Only the following settings seem to save ?

    :










  • removed*
    Post edited by mikeibc at 2014-04-13 15:23:53
  • Still can't get this to work?

    I notice that the additional stream settings for the new stream don't get saved to the database or the liquidsoap.cfg

    The first 3 streams connect and stream fine but the fourth gives this error
    Can not connect to the streaming server
    Problem with Liquidsoap...
  • Hi all,

    since I need to setup more than 3 output streams, I've tried this solution but apparently without any success.
    I've edited the files as suggested and also modified the tables on the db according to the post.
    Do I have to restart airtime in order to see the changes?
    My airtime version is 2.5.1.

    Thank you in advance
    Flavio
  • Hi,
    May be this is irrelevant, but why don't you try to modify liquidsoap script to add more streams using your main source?

    Fred
    Etheractis - Digital Online Media
    http://www.etheractis.fr/?-Radio-
  • Flavio said:



    That's indeed a way to approach the problem, but I would prefer to do have all the stream in the airtime interface. 

    That would be easier to administer, especially if you need to change something after some time, you don't have find all the "pieces" around :)

    Flavio


    IMO, proceeding like this is complex and would be relevant only if you need to change your settings every day.
    Further, you'll need to analyze how each new version of Airtime works, and duplicate/modify your extensions consequently.
    On the other hand, you can hardcode your regular stream settings (i.e. 128kps MP3,...), those that will never change, in Liquidsoap script, and keep the webUI settings for those that you need to customize oftenly.
    It's just a few lines to duplicate and taylor to your needs.

    Fred
    Etheractis - Digital Online Media
    http://www.etheractis.fr/?-Radio-
  • This is a start may or may not work ,and may or maybe not tested for this version

    https://forum.sourcefabric.org/discussion/comment/34497#Comment_34497

    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • This is a start may or may not work ,and may or maybe not tested for this version

    https://forum.sourcefabric.org/discussion/comment/34497#Comment_34497
    Anyone reading this a find it funny about my grammar , I make no apology ,Go get a translator.
    "The Problem with education today is that it takes a university degree to switch on a light bulb"
    "You learn from your mistakes but wise people learn from others mistakes avoid Making mistakes there is not sufficient rooms to make them"
    "Innuendo","If's","Assumptions" and "Fear" are for politician.Who,What,where,When and How are for those seeking knowledge and care about Humanity.
    "I might be in Mud but that does not Make me a Wild Hog(pig)"
    “Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius — and a lot of courage to move in the opposite direction.”
    "The only thing that remains constant is change itself"
    May the force be with you,until our path or destiny bring us in tandem.
  • Vote Up-1Vote Down FlavioFlavio
    Posts: 2Member

    Hi,
    May be this is irrelevant, but why don't you try to modify liquidsoap script to add more streams using your main source?

    Fred



    That's indeed a way to approach the problem, but I would prefer to do have all the stream in the airtime interface. 
    That would be easier to administer, especially if you need to change something after some time, you don't have find all the "pieces" around :)

    Flavio
  • Hi Roman,

    On cc_pref table, look for 'num_of_streams' and change the value.

    Thank you.