Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

video flickers and mouse freeze when streaming video #655

Open
sheldoncooper1 opened this issue Jul 9, 2020 · 7 comments
Open

video flickers and mouse freeze when streaming video #655

sheldoncooper1 opened this issue Jul 9, 2020 · 7 comments

Comments

@sheldoncooper1
Copy link

I have an issue about Vlc.DotNet.

Hİ,

When ı try to stream video with a device over directshow, the mouse gets stuck and flickering occurs every 10 seconds on the screen. When ı want to use a Yadif filter, this frequency increases, although it decreases to a minimum with Bob,but it is not completely resolved. I dont have a problem when ı try to get images with vlc on the same hardware.

  • Vlc.DotNet version : Vlc.DotNet.Forms 3.1.0 Vlc.DotNet.Core 3.1.0 Vlc.Dot.Core.Interops 3.1.0
  • Vlc.DotNet project used : (WinForms)
  • libvlc version : (x86) + VideoLAN.LibVLC.Windows -Version 3.1.0 via nuget packages for windows
  • .net version : 4.7.2
  • Project language : C#
  • Project build architecture : AnyCPU
  • Operating system : Windows 7

public void StartCamera(string strCameraName,UserControl userControl)
{
VlcControl vlcControl=new VlcControl();
vlcControl.BeginInit();
vlcControl.BackColor = System.Drawing.Color.Black;
vlcControl.Dock = System.Windows.Forms.DockStyle.Fill;
vlcControl.Name = "vlcControl";
vlcControl.Size = new System.Drawing.Size(944, 501);
vlcControl.TabIndex = 0;
vlcControl.Text = "vlcControl1";
vlcControl.VlcLibDirectoryNeeded +=vlcControl_VlcLibDirectoryNeeded;
vlcControl.VlcMediaplayerOptions = new string[] { "--deinterlace=on", "--video-filter=deinterlace", "--deinterlace-mode=yadif" ,"live--caching=1"};

vlcControl.EndInit();

userControl.Add(vlcControl);

vlcControl.SetMedia(@"dshow://", ":dshow-vdev="+strCameraName);
ThreadPool.QueueUserWorkItem(obj=>vlcControl.Play());
}

private void vlcControl_VlcLibDirectoryNeeded(object sender, Vlc.DotNet.Forms.VlcLibDirectoryNeededEventArgs e)
{
var currentAssembly = Assembly.GetEntryAssembly();
var currentDirectory = new FileInfo(currentAssembly.Location).DirectoryName;
// Default installation path of VideoLAN.LibVLC.Windows
e.VlcLibDirectory = new DirectoryInfo(Path.Combine(currentDirectory, "libvlc", IntPtr.Size == 4 ? "win-x86" : "win-x64"));
}

  • [yes ] I confirm that my issue doesn't happen in VLC itself.
@jeremyVignelles
Copy link
Collaborator

Could you please host your solution( or a minimal repro project) on github so that I can try myself?

Your live-caching parameter should be written as --live-caching

Does it work with the same options with the VLC command line?

@sheldoncooper1
Copy link
Author

I dont try on vlc command line but ı try with vlc interface. I used minimal sample with the one above. Yes ı writed it wrong here but my code is correct(--live-caching)

@jeremyVignelles
Copy link
Collaborator

Then try with VLC first and if it doesn't flicker, then please upload a repo on github so I can try.
If it does the same(which I highly suspect), then find why it does work with the interface, but that's a problem for VLC, not for Vlc.DotNet

@sheldoncooper1
Copy link
Author

sheldoncooper1 commented Jul 9, 2020

I tried vlc a lot but it doesnt flicker, ı tried another vlc wrapper for. Net, there is nothing wrong again. I usedhttps://github.com/ZeBobo5/Vlc.DotNet/tree/develop/src/Samples/Samples.WinForms.Minimal sample only the deinterlace filter difference. The only difference is the code on above. I Just create vclcontrol in my code not designer.

@jeremyVignelles
Copy link
Collaborator

I mean the VLC command line.
I don't have much time to look at your problem, but I'm trying my best to give you pointers.
Please try.

@sheldoncooper1
Copy link
Author

Ofcourse i will try it. Thanks for your quick reply and support. I am really pleased.

@sheldoncooper1
Copy link
Author

deneme.zip
Here is my simple app to try. I dont see anything different on VLC command line.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants