Stretch video to dimensions of picturebox
Posted: 30 Dec 2009 08:05
hi
I am making a VLC streaming windows application with c#.NET using LibVLC.
I used a dot net wrapper.
I am projecting VLC's Vedio output to a picture box "pboxScreen"
My problem is that I want to stretch my video to dimensions of picture box.
I want my video to self-adjust and enlarge as to completely fit in the container(picturebox).
How can I do that?
here is the code that I am currently using:-
I tried :-
pboxScreen.SizeMode = PictureBoxSizeMode.StretchImage;
but it didn't work!
I am a new to VLC development!
please help!
thank you
sincerely,
Antriksh Mathur
I am making a VLC streaming windows application with c#.NET using LibVLC.
I used a dot net wrapper.
I am projecting VLC's Vedio output to a picture box "pboxScreen"
My problem is that I want to stretch my video to dimensions of picture box.
I want my video to self-adjust and enlarge as to completely fit in the container(picturebox).
How can I do that?
here is the code that I am currently using:-
Code: Select all
IPAddress[] addresslist = Dns.GetHostAddresses(Dns.GetHostName());
vlc = new LibVlc(false, 5);
pboxScreen.SizeMode = PictureBoxSizeMode.StretchImage;
pboxScreen.Image = Image.FromFile("c:\\testerror.bmp");
vlc.Initialize();
vlc.VideoOutput = pboxScreen;
string[] options = { ":sout=#transcode{vcodec=mp4v,vb=1024,scale=1,acodec=mpga,ab=192,channels=2}:duplicate{dst=display,dst=std{access=http,mux=ts,dst=" + addresslist[0].ToString() + ":" + txtPort.Text + "}}" };
vlc.Play();
I tried :-
pboxScreen.SizeMode = PictureBoxSizeMode.StretchImage;
but it didn't work!
I am a new to VLC development!
please help!
thank you
sincerely,
Antriksh Mathur