Click here to Skip to main content
16,011,527 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to play a video using VLC in C#.
The code is as below,

private void ButtonPlayVideo(object sender, RoutedEventArgs e)
{

Vlc.DotNet.Core.Medias.MediaBase media
= new Vlc.DotNet.Core.Medias.LocationMedia("rtsp://IP address:8554/live.ts");

media.AddOption(":sout=#transcode{vcodec=theo,vb=800, scale=1,acodec=flac,ab=128,channels=2,samplerate=44100}:std{access=file,mux=ogg, dst=D:\\Videos\\Demo.mp4}");

myVlcControl.Media = media;
myVlcControl.Play();
}

When I play this video with the same address , directly from VLC (using option Open Network Stream) it runs successfully. But when I try to play from c# code , its not running. Also ,my VLC log is showing all buffering is complete.

Whats going wrong.Please help?


Thanks in advance.
Posted
Comments
gggustafson 15-May-14 12:49pm    
See "nVLC" (http://www.codeproject.com/Articles/109639/nVLC)

1 solution

Add authentication like this:

C#
rtsp://richard:myPassword@[camera-address]


Original answer.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900