2

I am writing a simple windows based application show split a video and show the thumbnails in listview .

I found this code, but from here I need thumbnails instead of icons

Dim strFileSize As String = " "
Dim di As New IO.DirectoryInfo(SPath & "\" & FolderName)
Dim aryFi As IO.FileInfo() = di.GetFiles("*.*")
Dim fi As IO.FileInfo
For Each fi In aryFi
 Dim ico As Icon = Icon.ExtractAssociatedIcon(fi.FullName)
  ImageList1.Images.Add(ico)
  ListView1.Items.Add(fi.ToString, ImageList1.Images.Count - 1)
Next
G.L.P
  • 7,119
  • 5
  • 25
  • 41
TheTricker
  • 43
  • 10

1 Answers1

2

u have to take the thumbnails from each video in ffmpeg and start the process. my option is

 proc.StartInfo.FileName = System.IO.Path.Combine(Application.StartupPath, "ffmpeg.exe")
 proc.StartInfo.UseShellExecute = False
 proc.StartInfo.CreateNoWindow = True
 proc.StartInfo.WindowStyle = ProcessWindowStyle.Normal
 proc.StartInfo.RedirectStandardInput = True
 proc.EnableRaisingEvents = True
 For Each fi In aryFi
        proc.StartInfo.Arguments = " -i " + fi.FullName + " -vframes 1 " & (SPath & "\" & FolderName1 & "\") & fi.Name & "%d.jpg"
        proc.Start()
 Next

add the image in image list and show it

For Each files In filesList
ImageList1.Images.Add(Bitmap.FromFile(files))
Next
Satyajit
  • 141
  • 1
  • 12