VB.net Video file only playing music in windows media player

332 Views Asked by At
If My.Computer.FileSystem.FileExists(My.Computer.FileSystem.SpecialDirectories.Temp & "\vid.mp4") Then
            AxWindowsMediaPlayer1.Visible = True
            AxWindowsMediaPlayer1.URL = My.Computer.FileSystem.SpecialDirectories.Temp & "\vid.mp4"

        Else
            My.Computer.Network.DownloadFile("mywebsite.tk/vid.mp4", My.Computer.FileSystem.SpecialDirectories.Temp & "\vid.mp4")
            Dim sizeInBytes As String = FileLen(My.Computer.FileSystem.SpecialDirectories.Temp & "\vid.mp4")
checksize:
            Threading.Thread.Sleep(500)
            If sizeInBytes.StartsWith("1455") Then
                MsgBox("Succesfully downloaded. Click ok to install.")
                AxWindowsMediaPlayer1.Visible = True
                AxWindowsMediaPlayer1.URL = My.Computer.FileSystem.SpecialDirectories.Temp & "\vid.mp4"
            Else
                GoTo checksize
            End If
        End If

    End Sub
End Class

The video is not playing, it just plays some visualizers and the music.

It shows this:

1

There are 1 best solutions below

0
numchrun On

have had the same problem and there were codecs missing.