October 3, 2014, 12:43 pm
Hi,
I'm looking for any guidance on creating a proper position seeker using a trackbar control. I don't quite understand the logic behind it.
↧
Hi,
I've figured out what the problem was. It was related to the video scaling factor. If the scaling factor is set to a number, then you'll not be able to render it as the original size.
↧
↧
October 9, 2014, 12:29 pm
no many .
I create 20 instance of vlccontrol but when i save that some of frames dropped and length of video files decreased.
if you have a solution please help me.
here is my code :
Vlc.DotNet.Core.VlcContext.StartupOptions.AddOption("--network-caching=1000");
Vlc.DotNet.Core.VlcContext.StartupOptions.AddOption("--no-skip-frames");
Vlc.DotNet.Core.VlcContext.StartupOptions.AddOption("--no-video-title");
Vlc.DotNet.Core.VlcContext.StartupOptions.AddOption("--live-caching=20000");
Vlc.DotNet.Core.VlcContext.Initialize();
const int num = 16;
Vlc.DotNet.Core.Medias.LocationMedia[] media = new Vlc.DotNet.Core.Medias.LocationMedia[num];
Vlc.DotNet.Forms.VlcControl[] cap = new Vlc.DotNet.Forms.VlcControl[num];
private void button1_Click(object sender, EventArgs e)
{
for (int i = 0; i < num; i++)
{
media[i] = new Vlc.DotNet.Core.Medias.LocationMedia
("rtsp://192.168.192.40:554/ch0_unicast_firststream");
media[i].AddOption(":sout=#std{access=file,mux=ps,dst=d:\\tmp\\" + i.ToString() + ".mp4}");
cap[i] = new Vlc.DotNet.Forms.VlcControl();
cap[i].Play(media[i]);
}
}
↧
October 12, 2014, 1:23 pm
That function only saves PNG files. Rename your file.
Make sure there isn't an already existing file in there. Delete it if you want to have a new one.
↧
October 12, 2014, 1:24 pm
You can create the PNG file and then convert it with another function to JPG.
↧
↧
October 12, 2014, 1:26 pm
These functions work great to get a frame...
/// <summary>
/// Draw the video box into an image
/// </summary>
/// <param name="vlc"></param>
/// <returns></returns>
public static void Get_Frame(Vlc.DotNet.Forms.VlcControl vlc)
{
try
{
if (File.Exists(Temp_Frame_Filename))
{
File.Delete(Temp_Frame_Filename);
}
vlc.TakeSnapshot(Temp_Frame_Filename, (uint)vlc.VideoProperties.Size.Width, (uint)vlc.VideoProperties.Size.Height);
}
catch
{
}
}
private void vlcControl1_SnapshotTaken(Vlc.DotNet.Forms.VlcControl sender, Vlc.DotNet.Core.VlcEventArgs<String> e)
{
}
↧
October 12, 2014, 1:30 pm
Rated 5 Stars (out of 5) - Nice for quick playback features. The takesnapshot function is useful as well. Thanks!
↧
October 12, 2014, 1:48 pm
ecoharpo wrote:
This worked for me mruce, I click on a button and the current frame is displayed in image1.
Hi ecoharpo, the vlc control does not have a VideoSource element, what code are you using? I also tried to get the BitmapSource to work but the .NET Framework 3.5 seems to be missing, in spite of Microsoft saying it's included...
http://msdn.microsoft.com/en-us/library/system.windows.media.imaging.bitmapsource(v=vs.90).aspx
How did you add all of those into your code?
Thanks
↧
October 12, 2014, 2:55 pm
↧
↧
October 14, 2014, 5:22 am
VLC versions 2.1.0 onwards seem to break the library's 'Play' facility - I'm getting a debug logging window when I run my application, which suggests that VLC is initialising/starting up fine in the background, but the Play command does nothing. The same code is functional for VLC version 2.0.3, leading me to believe that perhaps there's been a breaking change to the way subsequent versions initialise their play mechanism. Is anyone else experiencing problems, or is it just me?
↧
October 18, 2014, 1:32 pm
I know this is old, but for those finding this in Google like myself, unfortunately the answer is no. calls to the ".dll" are hard coded, and even if you change that, or make symlinks, it relies too heavily on kernel32 direct calls to run correctly in Mono.
↧
October 19, 2014, 4:28 am
Hi,
I have a mkv file with subtitle file in one folder (first file is movie.mkv, and second is movie.srt). When I play file by myVlc.Play(myVlc.medias[0]) subtitles are displayed on screen but VideoProperties.SpuCount properties is 0 why? And how can I disable displaying this subtitle?
↧
October 19, 2014, 6:04 am
Hi,
I have a mkv file with subtitle file in one folder (first file is movie.mkv, and second is movie.srt). When I play file by myVlc.Play(myVlc.medias[0]) subtitles are displayed on screen, how can I disable displaying this subtitle?
I have a second question too.
If in mkv container are some subtitles like for example eng, ger and pol how can I get list of subtitles and how can I switch between them?
↧
↧
October 21, 2014, 6:33 am
player1 = new VlcControl(); this code get error Необработанное исключение типа "System.AccessViolationException" в Vlc.DotNet.Forms.dll
↧
October 21, 2014, 9:41 am
Important Notice!
The project has moved to GitHub: Vlc.DotNet! The current version hosted there is this one with a few minor improvements. A new one is being developed.
Project Description
The VlcDotNet libraries provide the audio/video control of the VLC Media Player for Windows Forms, WPF, and Silverlight 5. Now you can stream audio and video in C# and VB.NET!
You can see how to use it on the Documentation page.
![image image]()
Format Compatibility
VlcDotNet has the same compatibility as VLC Media Player.
See here for the list of supported formats.
News
The new version is available here.
April 18, 2014:
- The new version adds and corrects many features :
- Correction : #7743 - Not all DLLs unloaded on Dispose
- Correction : #7687 - PInvokeStackImbalance with .NET 4
- Correction : Difference between source and release
April 19, 2012:
- I'm focusing on the WinForms control and I'm working on a new implementation for it which:
- Doesn't need to invoke the UI thread on each Vlc action and events
- Can now provide long action on Vlc media position changed event (next same event will be synchronize with the current position)
- Will provide the new implementation of logging with the future Vlc versions
- More stability
- ...
- If you have any requests on the WinForms control, feel free to let me know
- Also, for documentations and samples, I'm looking for some screenshots of POC with Vlc.DotNet
- Many thanks for your help!
Nov 22, 2011:
- The new version contains Silverlight 5 library: Vlc.DotNet.Silverlight. A sample could be tested here
- The new version adds and corrects many features :
- Correction : Reinitialize some variables
- Deprecate : Logging API, since VLC 1.2 (08/20/2011)
- Add subitem in LocationMedia (for Youtube videos, ...)
- Update WPF sample to use Youtube videos
- Many others corrections
July 20, 2011:
- Change in MediaBase class :
- Removed 'Media' prefix on events
- Added Metadatas
- Changed TrackInfos properties
- Fixed freeze on stop
- Fixed Memory leaks for WPF control
- Added ErrorHandling
- Few fixes
June 29, 2011:
- Few bugfixes and memory leak fixes available on latest source code (no new version for the moment)
May 17, 2011:
- A lot of additions and corrections... View changes on download page.
May 11, 2011:
- Correction : WPF application crash/stop bug
- Correction : WPF OutOfMemory due to BitmapSource
- WPF Sample : Viewport3D sample :-)
May 10, 2011:
- Add Audio Introps for media player
- Add AudioProperties to VlcControl :
- Add VideoProperties to VlcControl :
- Correction : Error on retrieving Vlc version
- Correction: Change in the Vlc function "libvlc_set_exit_handler" to be only available with Vlc 1.2
May 09, 2011:
May 06 2011:
- The new version will be available next Monday!
April 19 2011:
- Hi everybody, I've got a very good news... After few months of work on different projects, I'm resuming the VideoLan DotNet project. And the bestnews is that the new WPF and also the WinForm, controls work very well. But be patient...
- Changes since last version :
-
- Rewrote source (yet another time :-)
- Bug correction of AccessViolationexception on Winform
- Bug correction of "MDA Warning"
- Removed password of assembly signing key
- Why not a In-memory snapshot
- Compatibility with all verions of videolan >= 1.1.0
- Enable to define the libvlc.dll / libvlccore.dll and plugins directories. They could be on different locations and also in the default vlc directory.
- Enabled overlay for WPF control
- If you have any suggestions, I could put them in the future version. I think I'll put my current dev. version in the beginning of May, so I'll need some people to test this version when I put it on codeplex.
Don't worry, be happy for the next version :)
Participation
- I am looking for a helper to develop with me, so if you would like to participate, send patches or join me.
- I'm looking for a logo for Vlc.DotNet, so if you have some time to create one, send me it.
↧
November 6, 2014, 7:18 am
Hi,
I am doing streaming from one computer to another computer. How do I change the speed of the playback?
I tried using vlcControl.Rate = 0.25f, but it doesn't work. The video playback speed did not change even though the rate reflects 0.25f.
Can the playback speed be change while doing streaming? How can I do that?
Please help!
Thanks in advance.
↧
November 9, 2014, 11:42 pm
Hi everybody and a lot of thanks to the great team who supports and creates this amazing project.
I would like to know when a motion-detection is found and in which camera.
I see (using VLCDotNet DLLs) that the Motion-Detection feature is activated according to the main log ("started" and "stopped"). But I can not see the lines about each detection found like I use to do in the Videolan application... I tried even to set the LogProperties to "debug" (to see the messages inside) but it remains always as "none".
Any idea or trick?
Thanks in advance.
↧
↧
November 11, 2014, 7:36 am
Hi!
I have problem with vlc API - i haven't idea about implementing video-from-screens task.
Googling was not very helpful for me, so i try to find answers here.
I've already compile WPF example with playing video. It all ok but now i need to find way to create my own video from screenshots.
Thanks!
↧
November 13, 2014, 9:24 am
↧
November 14, 2014, 8:13 am
Hi, I am new here but I am having trouble with getting the seek functionality to work right. I have a trackbar (trkCurrentPosition), and a label (lblCurrentTime) to show the current time in the video. Whenever the video is paused, the time is always returned as "00:00:00", so I added a refresh(), play(), and pause() to make it get the time correctly but this is a hack and it is buggy. Also the mouseUp() handler is not always caught apparently, since the video plays sometimes when the mouse is released. Any help would be greatly appreciated. Thanks!
Private Sub trkCurrentPosition_MovePointer(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles trkCurrentPosition.MouseDown, trkCurrentPosition.MouseMove
' Works in tandem with the scroll handler so that the video is paused on the start of the move of the trackbar
Dim dblValue As Double
Dim strCurrTime As String
'Make sure the left button is pressed
If e.Button = Windows.Forms.MouseButtons.Left Then
' Stop the timer so that timer event code is not run while mousing the trackbar control
tmrVideo.Stop()
If IsPlaying Then
pauseVideo()
End If
' Move the trackbar indicator to where the mouse pointer is
dblValue = (Convert.ToDouble(e.X) / Convert.ToDouble(trkCurrentPosition.Width)) * (trkCurrentPosition.Maximum - trkCurrentPosition.Minimum)
If dblValue > 100.0 Then dblValue = 100.0 ' Sometimes the track can go past 100%
trkCurrentPosition.Value = Convert.ToInt32(dblValue)
plyrVideoPlayer.Position = trkCurrentPosition.Value / 100.0
plyrVideoPlayer.Refresh()
plyrVideoPlayer.Play()
plyrVideoPlayer.Pause()
strCurrTime = plyrVideoPlayer.Time.ToString
lblCurrentTime.Text = strCurrTime
End If
End Sub
Private Sub trkCurrentPosition_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles trkCurrentPosition.MouseUp
' Works in tandem with the scroll handler so that the video is set to continue playing (if it was playing) after the scroll event
pauseVideo()
tmrVideo.Start()
End Sub
Public Function pauseVideo() As Boolean
' Pause the video, change the icon to show it is paused
' Returns True/False for success. Only returns false if exception thrown.
Try
If IsPlaying Then
plyrVideoPlayer.Pause()
pctVideoStatus.BackgroundImage = My.Resources.Pause_Icon_Inverse
AddHandler PauseEvent, AddressOf myFormLibrary.frmVideoMiner.playerPaused
RaiseEvent PauseEvent(Nothing, Nothing)
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
Return False
End Try
Return True
End Function
↧