VLC Element for WPF

Microsoft Windows specific usage questions
Forum rules
Please post only Windows specific questions in this forum category. If you don't know where to post, please read the different forums' rules. Thanks.
publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: VLC Element for WPF

Postby publicENEMY » 28 Aug 2008 11:50

replacing the old version of libvlc.dll still results in video being rendered in another window. i tried resetting vlc setting by executing "C:\Program Files\VideoLAN\VLC\vlc.exe" --reset-config --reset-plugins-cache --save-config vlc:quit but the results still the same.

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: VLC Element for WPF

Postby publicENEMY » 28 Aug 2008 12:31

i found the problem. missing VLC.WPF.VlcPlugin.dll. when i try build the solution, VLC.WPF.VlcPlugin isnt build. cant find it.

dragonslayer
New Cone
New Cone
Posts: 5
Joined: 21 Aug 2008 11:50

Re: VLC Element for WPF

Postby dragonslayer » 28 Aug 2008 14:56

Okok, I solved my previous problem, I just excluded the MediaBridgeSourceFilter and the VLC.WPF.VLCPlugin and it compiles and runs.

So I started to create the program I wanted to have : A Videomatrix with x*y VLC Windows in a WPF Grid.
Therefore I put the VLC Control into a Usercontrol with some other fancy stuff, rounded corners, Mirroring, Shadows etc.pp.

It compiles, starts and displays the 4 Controls I want. But when I start a video it will shows up in the Videoplayer which has been created last.
That means I create 4 VLC Instances on the same form. I start the video on the first instance and the video displays on the last Instance. I start the second, and it also shows up in last, ...

Do you have any idea?

BenZC
Blank Cone
Blank Cone
Posts: 10
Joined: 04 May 2007 12:45

Re: VLC Element for WPF

Postby BenZC » 28 Aug 2008 17:57

Yeah,

the current version is only designed for one instance, cause the VideoOutputController, which is a static unique class, can only have one video output. So the last created VlcElement, which sets the video output in the VideoOutputController class, will display the video.

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: VLC Element for WPF

Postby publicENEMY » 29 Aug 2008 07:11

tips.

1. if anyone having problem compiling because of missing streams.h, install directshow base classes first. and link to your development environment. http://msdn.microsoft.com/en-us/library ... S.85).aspx and http://www.fungileo.com/?p=4
2. manually copy libvlc.dll and plugins folder from videolan installation folder to the executable folder(hope you understand)
3. msvc* and register.exe files in VLC Renderer 0.1 folder is used for registering DShowMediaBridge.ax. keep all this file in the same folder(including DShowMediaBridge.ax).
4. remember to copy VLC.WPF.VlcPlugin.dll to the plugins folder. the same plugins folder in step 2.

just ask if you dont understand.

by the way, i do have problem that i hope someone have the answers.

1. i dont know what i did but suddenly (at home with no internet connection) when i play video using directshow, the screen just go black. but plays fine when using bitmapbuffer(indicate that videolan settings is correct. the problem most likely lies with directshow/videorenderer etc)
2. i tried re-registering DShowMediaBridge.ax thousand times but still not work.
3. today, i go to work and have internet access, the video plays flawlessly. does vlc element requires internet access?

hopefully someone can shed some light here.

by the way, i do have some suggestions here.
1. all project output to the default folder. post build process should copy the required files.
2. instead of
#using "..\..\bin\Debug\VLC.WPF.VideoOutputController.dll"
why not
#using "..\VLC.WPF.VideoOutputController\VLC.WPF.VideoOutputController.dll"
in file module.h under VLC.WPF.VideoOutputController folder
im suggesting this because if im trying to build a release, then the application would never found the required dll as it will only be built under debug.

plus, could anyone explain the dependencies between library, what it does and maybe some info, because i would like to clean the project a bit. making it more easier to work with and easier to debug.

thank you.

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: VLC Element for WPF

Postby publicENEMY » 29 Aug 2008 08:48

i figured out the solution for the 'black screen video in directshow'. it is because the DShowMediaBridge.ax and VLC.WPF.VlcPlugin.dll should be release build.

theres annoying dialog window telling me that these DShowMediaBridge.ax and VLC.WPF.VlcPlugin.dll does not contain debug information everytime i build and run.

thanks

dragonslayer
New Cone
New Cone
Posts: 5
Joined: 21 Aug 2008 11:50

Re: VLC Element for WPF

Postby dragonslayer » 31 Aug 2008 23:40

the current version is only designed for one instance, cause the VideoOutputController, which is a static unique class, can only have one video output. So the last created VlcElement, which sets the video output in the VideoOutputController class, will display the video.
Arr, that's a real pitty!
(How ) can this be solved?

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: VLC Element for WPF

Postby publicENEMY » 04 Sep 2008 06:56

i want to report a bug.

when i try clicking play button multiple time frequently (in project VLC.WPF.Client), the position slider stops responding. debugging shows that VLC_Element.Watcher.VideoPosition in Watcher_WatcherCallback returns a NaN.


plus i added in VlcWatcher.cs

Code: Select all

//publicENEMY public TimeSpan WatcherInterval { get { return watcherTimer.Interval; } set { watcherTimer.Interval = value; } }
I believe, being able to tune the ticker is handy.

i also add this in VlcClient.xaml.cs

Code: Select all

private void buttonBrowse_Click(object sender, RoutedEventArgs e) { OpenFileDialog openFileDialog = new OpenFileDialog(); if (openFileDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { Source.Text = openFileDialog.FileNames[0]; string[] safeFileNames = openFileDialog.SafeFileNames; } }
makes it easier for selecting files to play

thank you.

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: VLC Element for WPF

Postby publicENEMY » 04 Sep 2008 08:42

sometime when i use Play2(), the position is not correct. so the position slider does not move. is there anything i have to keep in mind when using Play2()?

thank you.

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: VLC Element for WPF

Postby publicENEMY » 05 Sep 2008 06:37

the built in watcher have some kind of bugs. sometimes it refuses to start. hence the position slider not working. better use own dispathcer timer instead

thanks

cybercockroach
Blank Cone
Blank Cone
Posts: 19
Joined: 11 Jul 2008 03:35

Re: VLC Element for WPF

Postby cybercockroach » 11 Sep 2008 12:53

Is it possible to get the series of images(may be Bitmap) before render to Target window by using the C# wrapper?or Is there another way to do something like that under Windows Form?
because i would like to do some image processing before images go to Target window.

Thanks

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: VLC Element for WPF

Postby publicENEMY » 18 Sep 2008 10:40

i dont know why, but everytime im offline, vlcelement doesnt show the video. only sound.

thanks.

BenZC
Blank Cone
Blank Cone
Posts: 10
Joined: 04 May 2007 12:45

Re: VLC Element for WPF

Postby BenZC » 15 Oct 2008 22:18

Hi everyone,

I want to answer some questions, you had post in the past:
sometime when i use Play2(), the position is not correct. so the position slider does not move. is there anything i have to keep in mind when using Play2()?
The Play2() method is a dirty workaround for a libvlc 0.8.6 bug. If a conetnt finished in libvlc 0.8.6 and you clear the playlist, add a new target to it and invoke play(), it will play the last content and not the current one (although the playlist has only 1 item!). The only way I've managed to solve it, was to invoke play() and after some waiting cycles (e.g. 100 ms) restart the content by invoke stop() and play() again -> after that the right content will be played. So it could be that some other issues can be appear by doing it that way.
Hope that this workaround isn't necessary anymore, if I switch to the new libvlc 0.9.x.

If anyone has seen a good working wrapper for the new ibvlc 0.9.x, it would be very helpful, if he posts it here. So I can easily switch it and can release a new version, which already works with the new vlc version 0.9.x.
BenZC wrote:the current version is only designed for one instance, cause the VideoOutputController, which is a static unique class, can only have one video output. So the last created VlcElement, which sets the video output in the VideoOutputController class, will display the video.

Arr, that's a real pitty!
(How ) can this be solved?
Just now I've created a version, which allows a variable count of instances of the vlc element. Works good, but I have to do some performance tests, before I can release it.

Thank you all for your support.

Best regards,
BenZC

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: VLC Element for WPF

Postby publicENEMY » 16 Oct 2008 08:28

Its good to hear that VLC element for wpf project is not dead. i have use wpf element for my project and it works great(although there are some issues here and there). and the news that you are working on updating it for latest release of vlc really makes my day.

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: VLC Element for WPF

Postby publicENEMY » 16 Oct 2008 10:08

it would be nice if we can add command line options in vlc element for wpf.

instead of using
vlc.AddTarget(source);

use
vlc.AddTarget(source, options);

we can do this by checking for number of arguments in VlcElement.Source. if its more than 1, it would be vlc.AddTarget(source, options);

thank you

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

VlcElement.Source with option enhancements

Postby publicENEMY » 16 Oct 2008 12:24

i would like to submit code to enhance the already great vlcelement.

this is because, i would like to provide command line enhancement to the vlcelement.source.

Code: Select all

public string Source { get { return source; } set { source = value; vlc.PlaylistClear(); char[] delimiterChars = { ' ', }; string[] words = Source.Split(delimiterChars, StringSplitOptions.RemoveEmptyEntries); if (words.Length>1) { string[] options = new string[words.Length-1]; for (int i=1; i<words.Length; i++) { options[i-1] = words[i]; } vlc.AddTarget(words[0], options); } else { vlc.AddTarget(source); } } }
replace code in the vlcelement.xaml.cs with the prev code.

this way, you can provide command line options to the vlcelement.source

example

vlcelement.source = "rtsp://localhost:554/a :rtsp-caching=2000 :start-time=30";

thank you very much

publicENEMY
Cone that earned his stripes
Cone that earned his stripes
Posts: 104
Joined: 14 May 2007 05:04
Location: Malaysia

Re: VLC Element for WPF

Postby publicENEMY » 24 Oct 2008 06:24

hi BenZC?

is the new vlcelement will be release? do you need any help?

thanks?

atomas
New Cone
New Cone
Posts: 1
Joined: 04 Dec 2008 11:45
VLC version: 0.9.6
Operating System: Windows + Linux
Contact:

Re: VLC Element for WPF

Postby atomas » 04 Dec 2008 11:50

Hi BenZC!

First of all, thx for you great work :)
Just now I've created a version, which allows a variable count of instances of the vlc element. Works good, but I have to do some performance tests, before I can release it.
Is there a chance to get the version that allows more instances of the vlc element? I would be more than happy testing it ;)

cheers!

mohamnag
Blank Cone
Blank Cone
Posts: 11
Joined: 12 Mar 2009 16:04

Re: VLC Element for WPF

Postby mohamnag » 16 Apr 2009 17:25

Hi everyone,
Is the project dead?
I wanted to use vlc with WPF, can anyone show me a start point?

am70
Blank Cone
Blank Cone
Posts: 12
Joined: 25 Apr 2009 06:02

Re: VLC Element for WPF

Postby am70 » 29 Apr 2009 02:45

I would also love a version of VLC Renderer that supports multiple instances.

However, it appears that this project is dead. BenZC, are you still around??

Andrew


Return to “VLC media player for Windows Troubleshooting”

Who is online

Users browsing this forum: No registered users and 56 guests