FFMPEG konvertiert nur ersten 10 - 15 Minuten!

  • VB.NET

    FFMPEG konvertiert nur ersten 10 - 15 Minuten!

    Hey Leute ich wollte mir eben schnell einen simplen FLV to MP3 Converter bauen, damit ich die Vids im Auto hören kann!

    Aber ich weiß nicht mehr weiter...
    Es funktioniert alles ohne Probleme, nur er stoppt zwischen 10 - 15 Min Spielzeit...
    Das Lied geht um die 90 Minuten!

    VS bringt mir auch keinen Fehler...

    Hier der Grundcode:

    VB.NET-Quellcode

    1. Imports System.IO
    2. Imports System.Threading
    3. Public Class Form1
    4. Dim thread As New MethodInvoker(AddressOf fertig)
    5. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    6. Dim ofd As New OpenFileDialog
    7. With ofd
    8. .Filter = "FLV File (*.flv)|*.flv"
    9. End With
    10. If ofd.ShowDialog = Windows.Forms.DialogResult.OK Then
    11. TextBox1.Text = ofd.FileName
    12. End If
    13. End Sub
    14. Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    15. Dim sfd As New SaveFileDialog
    16. With sfd
    17. .Filter = "MP3 File (*.mp3)|*.mp3"
    18. End With
    19. If sfd.ShowDialog = Windows.Forms.DialogResult.OK Then
    20. TextBox2.Text = sfd.FileName
    21. End If
    22. End Sub
    23. Private Sub fertig()
    24. Label1.Text = ""
    25. MessageBox.Show("Abgeschlossen")
    26. End Sub
    27. Public Sub Convert(ByVal input As String, ByVal output As String)
    28. Dim ff As New Process
    29. With ff
    30. .StartInfo.WindowStyle = ProcessWindowStyle.Hidden
    31. .StartInfo.FileName = Application.StartupPath & "\ffmpeg.exe"
    32. .StartInfo.UseShellExecute = False
    33. .StartInfo.CreateNoWindow = True
    34. .StartInfo.RedirectStandardError = True
    35. .StartInfo.RedirectStandardOutput = True
    36. End With
    37. ff.StartInfo.Arguments = (" -i """ & input & """ -sameq """ & output & """")
    38. ff.Start()
    39. Do Until ff.HasExited
    40. Loop
    41. ff.Close()
    42. End Sub
    43. Private Sub start()
    44. Convert(TextBox1.Text, TextBox2.Text)
    45. Me.Invoke(thread)
    46. End Sub
    47. Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
    48. Label1.Text = "Converting..."
    49. Dim th As New System.Threading.Thread(AddressOf start)
    50. th.Start()
    51. End Sub
    52. End Class