How can I get the duration of a video using mediainfo.dll? VB.NET

0

I am trying mediainfo.dll but I notice that there is little information so I look for two things, first an example of how to get the duration of a video and if they have any link with the documentation that I can share about mediainfo.dll.

    
asked by Fabrizio Piminchumo 05.12.2017 в 22:20
source

1 answer

0

It uses WMP.DLL which is the multi-format windows player which will tell you the duration between other data and you can play it if you want, it is added as a user control by the COM Components.

It is added from the Controls menu by clicking the right button of the mouse, you have to go "Choose elements" once there add "Windows Media Player" of the "COM Components" Section and once this is done load this Function. ..

Public Function GetDuracionArchivo(ByVal FilePath As String) As String
    On Error Resume Next

    With AxWindowsMediaPlayer1
        .settings.autoStart = False
        .URL = FilePath
        '.Ctlcontrols.stop()
        GetDuracionArchivo = .currentMedia.durationString
    End With

End Function
    
answered by 29.05.2018 в 16:41