VLC player is not supporting UDP protocal request sent to API
Posted: 03 Oct 2023 12:36
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.
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.