how to stream video from vlc in c#
class Program
{
static void Main(string[] args)
{
FileInfo file = new FileInfo(@"C:\Users\Jman\VideoMaker.avi");
var currentDirectory = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
// Default installation path of VideoLAN.LibVLC.Windows
var libDirectory =
new DirectoryInfo(Path.Combine(currentDirectory, "libvlc", IntPtr.Size == 4 ? "win-x86" : "win-x64"));
using (var mediaPlayer = new Vlc.DotNet.Core.VlcMediaPlayer(libDirectory))
{
var mediaOptions = new[]
{
":sout=#rtp{sdp=rtsp://192.168.1.162:8008/test}",
":sout-keep"
};
//mediaPlayer.SetMedia(new Uri("http://hls1.addictradio.net/addictrock_aac_hls/playlist.m3u8"),
// mediaOptions);
mediaPlayer.SetMedia(file, mediaOptions);
mediaPlayer.Play();
Console.WriteLine("Streaming on rtsp://192.168.1.162:8008/test");
Console.WriteLine("Press any key to exit");
Console.ReadKey();
}
}
}
Also in C#:
- how to say or in c#
- show double in textbox c#
- Assets/Scripts/Snake.cs(177,25): error CS1061: Type `Snake.SnakeBodyPart' does not contain a definition for `SetGridPostion' and no extension method `SetGridPostion' of type `Snake.SnakeBodyPart' could be found. Are you missing an assembly reference?
- unity list length
- cc# sort list with list if ids
- c# pull request
- visual studio C# hintergrund bild ändern
- string to uint c#
- Could not load file or assembly 'Ubiety.Dns.Core, Version=2.2.1.0
- get random number c#
- while loop in c#
- unity draw wire square
- Int64
- c# keyvaluepair
- c# implement a superclass in subclass
- c# transform
- how to add a componet to a gameobject throgh code unity
- c# new thread
- unity create gameobject
- unity move character
- unity round vector 3 to nearest integer
- how to join array indexes with comma in c#
- see if two string arrays are equal c#
- c# string replace comma with newline