Page 1 of 1

Help me open and play video(code inside) C#

Posted: 03 Mar 2012 15:39
by Veresh
Hello. please help. because i try to play video( i know its very simple). but nothing to do
1 First - I connect Com component in Visual studio 2010
Image
http://xmages.net/storage/10/1/0/2/b/up ... 04f03a.jpg

2 From ToolBar i am moving VLC Activex Plugin and IE Web Plugin v2 to Form and Button(Open and play movie file)
Image
http://xmages.net/storage/10/1/0/f/7/up ... a37389.jpg

3 C# code
Image
http://xmages.net/storage/10/1/0/9/3/up ... f184e1.jpg

4 After click on button1 i am choosing avi file and click OK but movie not play, why?
Please help. i am beginner in VLN :oops:

Re: Help me open and play video(code inside) C#

Posted: 03 Mar 2012 16:51
by RSATom
http://wiki.videolan.org/Media_resource_locator
or short answer: you need add "file:///" at the beginning of the file path...

Re: Help me open and play video(code inside) C#

Posted: 03 Mar 2012 17:55
by Veresh
i must change from?
axVLCPlugin21.playlist.add(ofd.FileName, ofd.SafeFileNames, null);
to ?
axVLCPlugin21.playlist.add("file:///"+ofd.FileName, ofd.SafeFileNames, null);

Re: Help me open and play video(code inside) C#

Posted: 03 Mar 2012 18:21
by RSATom
yes

Re: Help me open and play video(code inside) C#

Posted: 03 Mar 2012 18:30
by Veresh
sorry, but not work

Re: Help me open and play video(code inside) C#

Posted: 03 Mar 2012 19:39
by Veresh
if i write - all good
axVLCPlugin21.playlist.add("http://fs157.www.ex.ua/get/15d8c3c65574 ... '%20HD.flv" , ofd.SafeFileNames, null);

but if i write - not work
axVLCPlugin21.playlist.add("file://C/Films/Delay_nogi_2_dvdrip.avi", ofd.SafeFileNames, null);

Re: Help me open and play video(code inside) C#

Posted: 04 Mar 2012 02:10
by RSATom
axVLCPlugin21.playlist.add("file:///C/Films/Delay_nogi_2_dvdrip.avi", ofd.SafeFileNames, null);

Re: Help me open and play video(code inside) C#

Posted: 06 Mar 2012 06:49
by Veresh
thank you

Re: Help me open and play video(code inside) C#

Posted: 04 Mar 2015 11:29
by swizz_weasel
What do I do wrong? My Video still doesn't play:

Code: Select all

axVLCPlugin21.playlist.add("file:///D:/MPEGHD422.mpg",null, null); axVLCPlugin21.playlist.play();
I tried it on several Machines but it works nowhere.

Re: Help me open and play video(code inside) C#

Posted: 04 Mar 2015 11:32
by RSATom

Re: Help me open and play video(code inside) C#

Posted: 04 Mar 2015 15:43
by swizz_weasel
There are no Events in the DebugView-ListView when I let my C#-Programm run. Am I doing something wrong?

Thanks, swizz_weasel

Re: Help me open and play video(code inside) C#

Posted: 04 Mar 2015 15:44
by RSATom
Did you run your program under debugger?

Re: Help me open and play video(code inside) C#

Posted: 05 Mar 2015 09:58
by swizz_weasel
Yes, I started my Programm by "Start debugging (F5)", startet subsequently the DebugView-App and tried then to play my Video in my running C#-App. Sometimes, DebugView brings me the following Message: "[20168] JIT-V : Initialize Thread: 362776 : Non-Virtualized".

Re: Help me open and play video(code inside) C#

Posted: 05 Mar 2015 15:39
by RSATom
Try start your application without Visual Studio, then you should see something in Debug View

Re: Help me open and play video(code inside) C#

Posted: 05 Mar 2015 16:18
by swizz_weasel
OK, now I get some more Messages:
[417024] [ERROR]:CallNamedPipe failed. Error=2
[74480] [ERROR]:CallNamedPipe failed. Error=2
[20168] JIT-V : Initialize Thread: 92128 : Non-Virtualized

Re: Help me open and play video(code inside) C#

Posted: 05 Mar 2015 16:26
by RSATom
I'm afraid them not related to vlc... So I have only one idea - activex not loading at all...