LibVlcSharp: Cloning output video?

This forum is about all development around libVLC.
bitbat
New Cone
New Cone
Posts: 2
Joined: 31 Jan 2020 15:26

LibVlcSharp: Cloning output video?

Postby bitbat » 31 Jan 2020 15:37

Hi there,

I have a small WPF app that uses LibVlcSharp.WPF and it's VideoView to show media on a second screen.
I now want a "preview" window on my main screen. Currently I do this with a second VideoView, but this doesn't work well on all cases (details on request if needed).

Is there a simple way to "clone" the output of the main VideoView and show it in a second control? Even with a lower framerate would be sufficient.

Thanks for you input!
bitbat

mfkl
Developer
Developer
Posts: 740
Joined: 13 Jun 2017 10:41

Re: LibVlcSharp: Cloning output video?

Postby mfkl » 03 Feb 2020 05:26

Clone video filter (clone)
Duplicate your video to multiple windows and/or video output modules
--clone-count=<integer> Number of clones
Number of video windows in which to clone the video.
--clone-vout-list=<string> Video output modules
You can use specific video output modules for the clones. Use a
comma-separated list of modules.
This looks like something approaching what you are seeking. https://wiki.videolan.org/VLC_command-line_help/

Another approach would be with sout #duplicate, like https://github.com/ZeBobo5/Vlc.DotNet/issues/438

The tricky part will probably be to use the window created by VLC and make it a WPF VideoView so you can integrate it properly in your app.
For simplicity, if your preview control does not need to be synched to the main playback view, I'd use a separate mediaplayer and VideoView altogether.
https://mfkl.github.io

bitbat
New Cone
New Cone
Posts: 2
Joined: 31 Jan 2020 15:26

Re: LibVlcSharp: Cloning output video?

Postby bitbat » 12 Feb 2020 14:15

I'd use a separate mediaplayer and VideoView altogether
That's what I'm doing for now, but as the second instance should be a controlling view of whats playing on the "main screen" that is not quite what I had in mind.\
I'll try to find a better solution, going to have a look at the sout option.

Thanks for your input and sorry for the late reply :/


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 20 guests