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

This forum is about all development around libVLC.
Veresh
New Cone
New Cone
Posts: 8
Joined: 03 Mar 2012 14:58

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

Postby Veresh » 03 Mar 2012 15:39

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:

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

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

Postby RSATom » 03 Mar 2012 16:51

http://wiki.videolan.org/Media_resource_locator
or short answer: you need add "file:///" at the beginning of the file path...

Veresh
New Cone
New Cone
Posts: 8
Joined: 03 Mar 2012 14:58

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

Postby Veresh » 03 Mar 2012 17:55

i must change from?
axVLCPlugin21.playlist.add(ofd.FileName, ofd.SafeFileNames, null);
to ?
axVLCPlugin21.playlist.add("file:///"+ofd.FileName, ofd.SafeFileNames, null);

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

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

Postby RSATom » 03 Mar 2012 18:21

yes

Veresh
New Cone
New Cone
Posts: 8
Joined: 03 Mar 2012 14:58

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

Postby Veresh » 03 Mar 2012 18:30

sorry, but not work

Veresh
New Cone
New Cone
Posts: 8
Joined: 03 Mar 2012 14:58

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

Postby Veresh » 03 Mar 2012 19:39

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);

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

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

Postby RSATom » 04 Mar 2012 02:10

axVLCPlugin21.playlist.add("file:///C/Films/Delay_nogi_2_dvdrip.avi", ofd.SafeFileNames, null);

Veresh
New Cone
New Cone
Posts: 8
Joined: 03 Mar 2012 14:58

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

Postby Veresh » 06 Mar 2012 06:49

thank you

swizz_weasel
New Cone
New Cone
Posts: 4
Joined: 04 Mar 2015 11:23

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

Postby swizz_weasel » 04 Mar 2015 11:29

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.

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

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

Postby RSATom » 04 Mar 2015 11:32


swizz_weasel
New Cone
New Cone
Posts: 4
Joined: 04 Mar 2015 11:23

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

Postby swizz_weasel » 04 Mar 2015 15:43

There are no Events in the DebugView-ListView when I let my C#-Programm run. Am I doing something wrong?

Thanks, swizz_weasel

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

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

Postby RSATom » 04 Mar 2015 15:44

Did you run your program under debugger?

swizz_weasel
New Cone
New Cone
Posts: 4
Joined: 04 Mar 2015 11:23

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

Postby swizz_weasel » 05 Mar 2015 09:58

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".

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

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

Postby RSATom » 05 Mar 2015 15:39

Try start your application without Visual Studio, then you should see something in Debug View

swizz_weasel
New Cone
New Cone
Posts: 4
Joined: 04 Mar 2015 11:23

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

Postby swizz_weasel » 05 Mar 2015 16:18

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

RSATom
Big Cone-huna
Big Cone-huna
Posts: 513
Joined: 24 Nov 2011 06:55
Operating System: Windows/Linux/OsX
Location: Russia, Tomsk

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

Postby RSATom » 05 Mar 2015 16:26

I'm afraid them not related to vlc... So I have only one idea - activex not loading at all...


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 64 guests