View Full Version : XviD comp test with .NET
stax76
29th November 2002, 00:12
does anybody know how to make a XviD comp test. Here is my crashing .NET code
Regards,
Dolemite
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim br As New IO.BinaryReader(IO.File.OpenRead("E:\test files\MTV 30MB\MTV.stats"))
Dim x As Integer
Dim Bits As Integer
Dim Frames As Integer = (br.BaseStream.Length - 4) / 68
br.ReadInt32()
For x = 0 To Frames
Bits += br.ReadInt32()
br.ReadBytes(56)
br.ReadDouble()
Next
br.Close()
MessageBox.Show((Bits / Frames) / (640 * 480))
End Sub
stax76
29th November 2002, 02:18
I think I got it
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim br As New IO.BinaryReader(IO.File.OpenRead("E:\test files\MTV 30MB\MTV.stats"))
Dim x As Integer
Dim Bytes As Integer
Dim Frames As Integer = ((br.BaseStream.Length - 4) / 68) - 1
br.ReadInt32()
For x = 0 To Frames
Bytes += br.ReadInt32()
br.ReadBytes(64)
Next
br.Close()
MessageBox.Show(((Bytes * 8) / Frames) / (640 * 480))
End Sub
stax76
29th November 2002, 03:23
there must be something wrong because I got always the same value don't matter if there is a lot action or not, or gives the XviD codec always the same value?
Regards,
Dolemite
stax76
29th November 2002, 10:30
I'm sorry, everything is OK, I simply forgot to replace the path of my testfile, ouch :o
TheUnforgiven
30th November 2002, 20:51
congratulations dolemite, i see its finally done ;)
stax76
1st December 2002, 00:20
thanks, I've got already new problems...
Does anybody know some good .NET tutorials that enable me to code a track bar for a player? I don't want the ordinary windows forms look.
Emp3r0r
1st December 2002, 23:40
Can you create a screenshot of what you have in mind?
stax76
2nd December 2002, 01:41
I mean a bar where you can set the position with a mouse which players like Zoom Player have, I can't event get mouse events on the form that displays the video
Emp3r0r
2nd December 2002, 01:58
well I got code for doing that and I plan on cleaning and releasing the source to dvd2xcd during the next few days which should be some help to you.
Emp3r0r
3rd December 2002, 05:39
DVD2XCD has seeking and I released the code, check out http://forum.doom9.org/showthread.php?s=&threadid=34778
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.