Quantcast
Channel: VideoLan DotNet for WinForm, WPF
Viewing all 471 articles
Browse latest View live

New Post: AddOption Rotate Video stream

$
0
0
Hi, it does not appear this control is developed any more.. I also encountered the problem with rotating the video, and the only way I was able to accomplish it with this library, is this approach:
  • save current video position
  • stop video, unload, destroy vlc control
  • recreate vlc control, with an additional "--video-filter=transform --transform-type=<angle>" startup parameter
  • reload video, scroll to saved position
  • resume playing
This works.. even though is hacky as can be, you can rotate the video and it only causes a short black flicker 0.5-1s because the video has to load again.

I've read and experienced that most advanced options of VLC player are not supported by the library at runtime at all. If someone knows a better way of doing it.. please let me know :)

New Post: Play video from memory stream or byte array

$
0
0
You should try named pipe for that.

pipe server side code handle the memory stream and write byte[] to pipe
vlcControl should be the client side.


----serverside-----
first a thread to create a
        NamedPipeServerStream PipeServer =  new NamedPipeServerStream("nameofpipe", PipeDirection.Out);
        PipeServer.WaitForConnection();

        //when connected, there should be a loop to continous write byte[] to pipe server stream.
        PipeServer.Write(data1, 0, data1.Length);
----clientside-----
VlcVideoPlayer is an instance of VlcControl. Just notice the path:
        MediaBase media = new PathMedia(@"stream://\\\.\pipe\inesaVideo");
        VlcVideoPlayer.Media = media;
        VlcVideoPlayer.Play();
----other questions-----------
some time when I stop playing, VlcControl just halt....

New Post: Play video from memory stream or byte array

$
0
0
This is working, but with some troubles. Video goes well a few seconds, and after that starts lagging. I think the problem is that the pipe transfer rate is too high, and VLC cannot play it. If I do Thread.Sleep(200) over the write cycle it helps, but this is not a solution. Any idea how to handle this?

New Post: Only Recording

$
0
0
I am trying to use this library to record an incoming stream over RTSP. I can make this work using a WPF application, this is no problem. However, I want to do this in a class library which will ultimately run in a service rather than an application.

Can this be done without a reference to the PresentationFramework, or the Winforms equivalent? Is this library only for the presentation layer?

Thanks

New Post: axvlc.dll

$
0
0
I have a problem with register axvlc.dll with vb.net 2008
i can't add videolan on my project i try a regsvr32 c:\xx\axvlc.dll
but vb sayd that system.reflection.reflectiontypeloadexception and not add axvlc.dll at my proejct
i need help!!!
thank you
bye

New Post: Cannot get library to work in VB.net

$
0
0
i have this problem but not run?
you can help me ?
i use vb.net 2008
i have necessary with vlc net use with video e mp3 e radio internet
thank you
i don't understand what you mind in second post
you ahave a new file? for vb.net?
i can download it?
bye

New Post: NullReferenceException

New Post: Problem with Playing Audio CD

$
0
0
Hi Everyone,

I am trying to play an Audio CD with the VlcControl, but without any luck. Video is working fine (Also DVD) and even audio files, but the CD Audio does not.
I am using : vlcControl1.Media = new LocationMedia("cdda:///D:"); (Where D: is my CD).
it only work when i am using the option: VlcContext.StartupOptions.AddOption("--cdda-track=1");
but this only play that specific track and no other.

Please, Pretty please with sugar on top, I need help...

Reopened Task: VlcLogOptions.Verbosities.Debug doesn't exist (Must update doc) [6177]

$
0
0
I'm following the WPF example having copied the dlls and referenced in my project and have copied the code from; http://vlcdotnet.codeplex.com/wikipage?title=Wpf
 
However I get the following error;
Error 1 'Vlc.DotNet.Core.VlcLogOptions' does not contain a definition for 'Verbosities'
 
I've noticed VlcLogOptions.Verbosities.Debug associated classes. Intellisense shows nothing.

Reopened Issue: Message=%1 is not a valid Win32 application [6132]

$
0
0
What the heck is this?
 
System.ComponentModel.Win32Exception was unhandled
Message=%1 is not a valid Win32 application
Source=Vlc.DotNet.Core.Interops
ErrorCode=-2147467259
NativeErrorCode=193
StackTrace:
at Vlc.DotNet.Core.Interops.LibVlcInteropsManager.InitVlcLib(String libVlcDllsDirectory)
at Vlc.DotNet.Core.Interops.LibVlcInteropsManager..ctor(String libVlcDllsDirectory)
at Vlc.DotNet.Core.VlcContext.Initialize()
at AmsiosCE.Program.Main() in C:\Users\wojcik\Documents\Visual Studio 2010\Projects\AMSIOS - VLC\MediaMapCE\Program.cs:line 28
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
 
Oh,, and what happened to FileMedia and VolumeLevel? Can't play a file or tell it how loud not to play it? :^p

Reopened Issue: Application not shuts down Correctly [6130]

$
0
0
Hello
 
I work with the Source Code 62051, on a Windows 7 64Bit.
 
If i start the Player play a movie and close the Windows Form application.
It not gets closesd fully. It hangs.
 
When i break the Debug i see it Hangs on the Line:

VlcContext.InteropManager.MediaPlayerInterops.Stop.Invoke(VlcContext.HandleManager.MediaPlayerHandles[this]);
in the File VlcControl.Common function public void Stop();
 
However if i stop the movie before i close the app it closes fully and goes back to Visual Studio.
 
I tried to fix the issue with a FormClose/Closing Event without any luck. If i try to stop the movie there the same Problem happens, i guess some Reference is not there anymore.
 
Second Thing:
 
Had to fix the Take_Snapshot function in Order to compile. Otherwise it is working fine.
 
public void TakeSnapshot(string filePath, uint width, uint height)
{
if (VlcContext.InteropManager != null &&
VlcContext.InteropManager.MediaPlayerInterops != null &&
VlcContext.InteropManager.MediaPlayerInterops.VideoInterops.TakeSnapshot.IsAvailable)
{
Dispatcher.BeginInvoke(DispatcherPriority.Background,
(Action)(() => VlcContext.InteropManager.MediaPlayerInterops.VideoInterops.TakeSnapshot.Invoke(VlcContext.HandleManager.MediaPlayerHandles[this], 0, StringToByteArray(filePath), width, height)));
}
}
private byte[] StringToByteArray(string str)
{
System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
return enc.GetBytes(str);
}
 
Third:
 
When will the In Memory Snapshot function appear?
 
Forth:
 
vlcControl1.IsSeekable is missing.
vlcControl1.CanPause is missing.
 
Best Regrads and keep up that good Work
Really like the Api soon i use WPF as well to test that thing out :)

New Post: thank you!!!!!

$
0
0
now run !!!!!!!! thank you very much
how to create a visual control ? in form1?

New Post: CPU Usage

$
0
0
Hi everyone,

I am connecting with vlcPlayerControl to a network stream with below codes, but after connection to our IP camera my CPU usage increase to 70-80%.

Do you have any suggestion ?
try
                {
                    if ((this.vlcPlayerControl.IsDisposed) || (this.vlcPlayerControl == null))
                    {
                        this.vlcPlayerControl = new VlcPlayerControl();
                        this.vlcPlayerControl.Initialize();
                        this.vlcPlayerControl.Visible = true;
                    }
                    if (!this.vlcPlayerControl.IsInitialized)
                    {
                        this.vlcPlayerControl.Initialize();
                    }
                    
                    MediaInput input = new MediaInput(MediaInputType.NetworkStream, "rtsp://192.168.0.1/stream1");

                    this.vlcPlayerControl.Visible = true;
                    
                    if ((VlcPlayerControlState.Idle == this.vlcPlayerControl.State) || (VlcPlayerControlState.Paused == this.vlcPlayerControl.State))
                    {
                        this.vlcPlayerControl.Play(input);
                    }
                }
                catch (Exception e1)
                {
                    MessageBox.Show("Error : " + e1.ToString());
                }

New Comment on "Wpf"

$
0
0
Correct XAML must have the VLC control as a child of the Grid element otherwise the VLC control dimensions will be wrong: {{ <Grid x:Name="parentGrid" Grid.Row="0"> <Wpf:VlcControl x:Name="myVlcControl" /> ... }} Having the VLC control in the XAML is good for a test prototype, for production code however, the VLC control should only be added as code-behind, to catch XAML run time exceptions (and recover) when the VLC control cannot be found: {{ VlcControl vlcPlayer = new VlcControl(); // Add the VLC control to the grid to give it dimensions. // However VLC does not paint on its control geometry // instead it paints on its "VideoSource" image parentGrid.Children.Add(vlcPlayer); // WPF dark magic ahead: run-time interpreted data binding // When the VLC video changes (is loaded for example), the grid displays the new video image Binding vlcBinding = new Binding("VideoSource"); vlcBinding.Source = vlcPlayer; // VLC paints into a WPF image Image vImage = new Image(); vImage.SetBinding(Image.SourceProperty, vlcBinding); // The WPF image is used by a WPF brush VisualBrush vBrush = new VisualBrush(); vBrush.TileMode = TileMode.None; vBrush.Stretch = Stretch.Uniform; vBrush.Visual = vImage; // The WPF brush is used by the grid element background parentGrid.Background = vBrush; }}

New Post: position

$
0
0
Hello i want to know the end of file of mp3 for change it at finish in vb.net
i sorry for english
thank you

New Post: clear all item

$
0
0
hello i have a problem for delete all items on vlcdotnet
i try in vb.net
medias.clear
but not delete all list of old mp3
how i to clean all list?
thank you

New Post: clear item vlcdotnet please help

$
0
0
i have this problem
i add file to file list of vlc but not clear
the old file in the new folder list
i post the code in vb.net
BenstartMyHomeNormale.Mp3RadioInternet.Medias.Clear() ' this function not run
        BenstartMyHomeNormale.ListBox1.Items.Clear()
        Dim i As Integer
        i = positionmusic
        BenstartMyHomeNormale.Mp3RadioInternet.Medias.Clear()
        For i = PosizioneMenuFileMusica To totalfilemusic
            Dim File As MediaBase = New Vlc.DotNet.Core.Medias.PathMedia((MusicaOrigineList(PosizioneCursoreCartellaMusica) & "\" & MusicaFileList(i))) ' declare new file

            BenstartMyHomeNormale.Mp3RadioInternet.Medias.Add(File) ' add new file function run
            BenstartMyHomeNormale.ListBox1.Items.Add(MusicaOrigineList(PosizioneCursoreCartellaMusica) & "\" & MusicaFileList(i))
        Next
        BenstartMyHomeNormale.Mp3RadioInternet.Play() ' function run
but not delete the old file list if i recall this code two times
i sorry for english

New Post: NullReferenceException

$
0
0
i think i found a error in vlc.medias.clear
function for clear all list not run
you can check medias.add
medias.play
medias.next
medias.previuos

medias.clear
please?
thank you
please you can send me email with compiled code at mikibenx@hotmail.it?

New Post: Need to rotate video display in VlcControl

$
0
0
Someone get this answer?
i have the same issue...
there was can not find Crop Geometry

New Post: Need to rotate video display in VlcControl

$
0
0
I never got this answered, I just ended up calling FFMPEG directly and handling rotation/display myself.
Viewing all 471 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>