Moin.. habe mich mal an einer Bitrate berechnung versucht.. nur leider Spuckt er mir da nur blötsin raus.. hat evt. jemand Ahnung ?
Length = 01:59:24 fps = 25.000
Code
Private Function Calc_Bitrate(ByVal Length As String, ByVal fps As Double) As Boolean
Dim LengthArray As Array
Dim Calc_H As Long
Dim Calc_M As Long
Dim Calc_S As Long
Dim duration As Long
Dim Frames As Long
Dim Overhead As Double
Dim video_size As Long
Dim target_size As Long
Dim Compensat As Double
Dim final_bitrate As Long
Dim Audio_size As Long
LengthArray = Split(Length, ":", -1, 2)
Calc_H = 3600 * LengthArray(0)
Calc_M = 60 * LengthArray(1)
Calc_S = LengthArray(2)
duration = (Calc_H + Calc_M) + Calc_S
Frames = CInt(duration * fps)
Overhead = CInt((Frames + (duration * 1000) / 64) * 16 / 1024)
If (outputsize.Text = "700 MB") Then
target_size = 700 * 1024
ElseIf (outputsize.Text = "DVD-5") Then
target_size = 4400 * 1024
ElseIf (outputsize.Text = "DVD-9") Then
target_size = 8000 * 1024
ElseIf (outputsize.Text = "2x DVD-9") Then
target_size = 15900 * 1024
End If
Audio_size = Replace(audiosize.Text, " MB", "", 1, -1, 2)
Audio_size = Audio_size * 1024
video_size = target_size - Audio_size - Overhead
Compensat = CInt((24 * fps) / 125)
final_bitrate = CInt((video_size * 8 * 128) / (duration * 125) + Compensat)
bitrate.Text = final_bitrate
End Function
Alles anzeigen