Decode H.264 with VLC in C# using VS2008
Posted: 25 Oct 2010 20:04
Hello everyone ,
im trying to stream H.264 MP4 from VLC player and decode the video in a client Vs2008 Winform in C#.
I finaly got libVLC to compile and run in windows forms (C#) . I'm using vlc 0.08.6c win32. but i still cannot display the encoded signal on the client side.
my project is setup as the following :
1) Computer(A) -server side- ( sending ): im just using the VLC player to encode a video to H.264 MP4 over UDP. i set the destination with the client IP and port number. the ouput string is :
":sout=#transcode{vcodec=h264,vb=0,scale=0,acodec=mp4a,ab=128,channels=2,samplerate=44100}:udp{dst=128.119.111.20:9510} :no-sout-rtp-sap :no-sout-standard-sap :sout-keep"
2) computer(B) - Client side - (receiving) : i have C# windows forms with the following code :
I think my problem is in the option string. what should i have in my option string ? can someone help me based on the output string on the server side ? if this works then i will share my project with anyone who wants it it is a simple one but i think it is worth posting .
im trying to stream H.264 MP4 from VLC player and decode the video in a client Vs2008 Winform in C#.
I finaly got libVLC to compile and run in windows forms (C#) . I'm using vlc 0.08.6c win32. but i still cannot display the encoded signal on the client side.
my project is setup as the following :
1) Computer(A) -server side- ( sending ): im just using the VLC player to encode a video to H.264 MP4 over UDP. i set the destination with the client IP and port number. the ouput string is :
":sout=#transcode{vcodec=h264,vb=0,scale=0,acodec=mp4a,ab=128,channels=2,samplerate=44100}:udp{dst=128.119.111.20:9510} :no-sout-rtp-sap :no-sout-standard-sap :sout-keep"
2) computer(B) - Client side - (receiving) : i have C# windows forms with the following code :
Code: Select all
LibVlc.LibVlc vlc = new LibVlc.LibVlc();
vlc.initialize();
vlc.VideoOutput() = pictureBox1;
vlc.PlayListclear();
string[] options = new string[]" I THINK I HAVE THE WRONG SETTINGS IN HERE "
vlc.Addtarget("udp://9510",options);
vlc.Play();