Page 1 of 1

VLC player is not supporting UDP protocal request sent to API

Posted: 03 Oct 2023 12:36
by AnurajChandran
Hi,

Team

Subject:UDP request from VLC not able to connect with server API.

We are just trying to send a udp request from VLC media player to our server, but it was not received the server side communication. could you please find the C# source code(Server code) as below.

using (UdpClient udpClient = new UdpClient(listenPort))
        {
            udpClient.ToString();
            Console.WriteLine("Listening for video requests from VLC...");

           

            while (true)
            {
                // Wait for a request from VLC
                IPEndPoint clientEndPoint = (IPEndPoint)udpClient.Client.LocalEndPoint;
                var result1 = await udpClient.ReceiveAsync();
                var result = udpClient.Receive(ref clientEndPoint);
                // UdpReceiveResult result = await udpClient.ReceiveAsync();
                byte[] requestData = result;                
                string request = System.Text.Encoding.ASCII.GetString(requestData);

                Console.WriteLine("Request received from VLC: " + request);
            }
        }


Please find the below approaches followed by us:

1. Sending a udp request (udp://@127.0.0.1:49150/token1/token.mp4) from VLC player but this doesn't received in our server where stream needs to be transferred from server to play the video.

Note:
Instead of sending request from VLC, we created an client and tried to send a udp request from client to server, that has been received in server side communication.


Could you please any one help to resolve the issue.

Re: VLC player is not supporting UDP protocal request sent to API

Posted: 03 Oct 2023 22:26
by Rémi Denis-Courmont
I don't know what you expect to receive, but it does look like you are using a protocol that VLC simply does not support at all.

Re: VLC player is not supporting UDP protocal request sent to API

Posted: 04 Oct 2023 09:44
by Mohamad Anas
Hi @Remi,

We also facing the same issue like we have to receive a plain text through UDP from VLC that contains path of the video file from there we will return the stream to VLC where the video can be played.
So what are the steps needs to be followed in VLC to send a UDP request that contains a plain text.

Re: VLC player is not supporting UDP protocal request sent to API

Posted: 04 Oct 2023 12:11
by Mohamad Anas
I need a guidance on how to send UDP request from VLC media player to my Server created using C# code
@Remi Can you assist me on this?

Re: VLC player is not supporting UDP protocal request sent to API

Posted: 04 Oct 2023 13:04
by Rémi Denis-Courmont
Same question, same answer.