I
I
Ilya2016-12-16 21:13:13
Multithreading
Ilya, 2016-12-16 21:13:13

How to transfer an mp3 file to IceCast?

I wrote a link to the libshout.dll (x86) library and I want to upload an mp3 file to the server. In principle, everything is connected correctly, but I don’t understand how to transfer the stream to the server. Using your assembly and set of libraries . Project archive

class Program
{
    static Libshout icecast;

    static void Main(string[] args)
    {
        icecast = new Libshout();
        icecast.setProtocol(0);
        icecast.setHost("127.0.0.1");
        icecast.setPort(8000);
        icecast.setPassword("hackme");
        icecast.setFormat(Libshout.FORMAT_MP3);
        icecast.setPublic(true);
        icecast.setName("radio");
        icecast.setMount("/live");
        icecast.open();

        if (icecast.isConnected())
            Console.WriteLine("Connect!");
        else Console.WriteLine(icecast.GetError());

        //как-то передать поток

        Console.ReadKey(true);
        icecast.close();

    }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question