搜索 社区服务 统计排行 帮助
  • 3010阅读
  • 46回复

[求助]卡拉OK的字幕怎样做

楼层直达
级别: 工作组
注册时间:
2003-08-26
在线时间:
13小时
发帖:
6600
只看该作者 15楼 发表于: 2004-07-27
写出来没用……要你们都能用才行

催片请点此处: http://bbs.popgo.org/bbs/read.php?tid=502402&displayMode=1#19103164
级别: 新手上路
注册时间:
2001-11-21
在线时间:
0小时
发帖:
264
只看该作者 16楼 发表于: 2004-07-27
这种好用吗?
我用VB来写个吧

级别: 工作组
注册时间:
2003-08-26
在线时间:
13小时
发帖:
6600
只看该作者 17楼 发表于: 2004-07-27
既然有vb的了,那我用php来试试看……

催片请点此处: http://bbs.popgo.org/bbs/read.php?tid=502402&displayMode=1#19103164
级别: 新手上路
注册时间:
2001-11-21
在线时间:
0小时
发帖:
264
只看该作者 18楼 发表于: 2004-07-27
可以了,舍入时间费了好大劲……
稍后放出

Dialogue: 0,0:00:33.22,0:00:37.10,Default,,0,0,0,,{\K153}....{\K26}季{\K28}節{\K28}は{\K29}ず{\K24}れ{\K34}の{\K33}beach {\K33}side
Dialogue: 0,0:00:37.46,0:00:40.60,Default,,0,0,0,,{\K26}夜{\K25}に{\K23}隱{\K41}れ{\K198}た...
Dialogue: 0,0:00:43.59,0:00:46.07,Default,,0,0,0,,{\K33}君{\K46}の{\K70}橫{\K63}顏{\K36}は
Dialogue: 0,0:00:46.53,0:00:50.10,Default,,0,0,0,,{\K41}何{\K53}を{\K23}み{\K32}つ{\K43}め{\K30}て{\K35}る{\K48}の{\K51}?
Dialogue: 0,0:00:52.20,0:00:54.83,Default,,0,0,0,,{\K75}僕{\K31}ら{\K30}は{\K43}何{\K60}一{\K24}つ
Dialogue: 0,0:00:55.41,0:00:57.07,Default,,0,0,0,,{\K23}知{\K25}る{\K27}こ{\K28}との{\K33}な{\K30}い
Dialogue: 0,0:00:57.07,0:00:58.96,Default,,0,0,0,,{\K19}未{\K32}來{\K31}の{\K70}為{\K37}に
Dialogue: 0,0:00:59.97,0:01:01.47,Default,,0,0,0,,{\K72}手に{\K78}入れたり
Dialogue: 0,0:01:01.53,0:01:03.64,Default,,0,0,0,,{\K135}投げ出した{\K76}りして
Dialogue: 0,0:01:04.25,0:01:08.47,Default,,0,0,0,,{\K71}儚{\K38}く{\K54}誘{\K33}う{\K42}行{\K59}方{\K30}め{\K33}ざ{\K24}し{\K37}て
Dialogue: 0,0:01:08.73,0:01:09.78,Default,,0,0,0,,{\K46}Flying {\K59}Gone
Dialogue: 0,0:01:10.91,0:01:12.61,Default,,0,0,0,,{\K19}夢{\K23}見{\K55}る{\K38}樣{\K34}に
Dialogue: 0,0:01:13.16,0:01:15.08,Default,,0,0,0,,{\K23}墮{\K29}ち{\K45}て{\K26}ゆ{\K34}く{\K34}の
Dialogue: 0,0:01:15.36,0:01:17.25,Default,,0,0,0,,{\K41}君{\K54}の{\K50}中{\K43}へ
Dialogue: 0,0:01:17.65,0:01:19.59,Default,,0,0,0,,{\K34}恐{\K32}れ{\K54}な{\K44}い{\K30}で
Dialogue: 0,0:01:19.99,0:01:21.70,Default,,0,0,0,,{\K40}傷{\K49}つ{\K27}い{\K27}た{\K27}ら
Dialogue: 0,0:01:21.94,0:01:22.70,Default,,0,0,0,,{\K20}き{\K31}っ{\K25}と
Dialogue: 0,0:01:22.88,0:01:26.08,Default,,0,0,0,,{\K23}切{\K16}な{\K18}い{\K51}優{\K21}し{\K21}さ{\K23}を{\K24}抱{\K21}い{\K23}て{\K42}い{\K37}る
Dialogue: 0,0:01:26.53,0:01:27.97,Default,,0,0,0,,{\K40}Flying {\K49}Fall {\K55}Down
Dialogue: 0,0:01:28.75,0:01:30.69,Default,,0,0,0,,{\K15}羽{\K16}ば{\K18}た{\K61}さ{\K28}な{\K29}が{\K27}ら
Dialogue: 0,0:01:31.02,0:01:32.90,Default,,0,0,0,,{\K34}墮{\K21}ち{\K47}て{\K25}ゆ{\K26}く{\K34}の
Dialogue: 0,0:01:33.15,0:01:35.12,Default,,0,0,0,,{\K40}君{\K60}の{\K60}傍{\K37}へ
Dialogue: 0,0:01:35.39,0:01:36.95,Default,,0,0,0,,{\K43}何{\K47}も{\K26}な{\K40}い
Dialogue: 0,0:01:37.09,0:01:39.49,Default,,0,0,0,,{\K21}明{\K37}日{\K28}が{\K23}く{\K45}る{\K24}瞬{\K28}間{\K34}は
Dialogue: 0,0:01:39.83,0:01:41.38,Default,,0,0,0,,{\K33}君{\K33}に{\K21}出{\K29}會{\K21}え{\K17}た
Dialogue: 0,0:01:41.62,0:01:43.51,Default,,0,0,0,,{\K20}奇{\K23}跡{\K24}胸{\K29}に{\K21}た{\K43}い{\K29}て
Dialogue: 0,0:01:44.28,0:01:47.57,Default,,0,0,0,,{\K24}ね{\K53}むらせ{\K251}て......

级别: 版主
注册时间:
2002-04-23
在线时间:
3小时
发帖:
7693
只看该作者 19楼 发表于: 2004-07-28
vb还是vba...真不简单^.^

身份 :我是坏人:D
目标 :收齐高达系列:p
请多多支持ftp区啊(顺便edonkey, mirc吧)

偶的业余嗜好:


暴走模式->
icc
级别: 版主
注册时间:
2001-11-21
在线时间:
0小时
发帖:
3079
只看该作者 20楼 发表于: 2004-07-28
不错不错,支持一下^^
级别: 新手上路
注册时间:
2001-11-21
在线时间:
0小时
发帖:
264
只看该作者 21楼 发表于: 2004-07-28
ftp://agt:wt@218.89.28.48/karaokvb6.exe

ftp://agt:wt@218.89.28.48/karaokvb7.exe

原本是用的vb.net,后来想到很多人都没装.net,所以还是改回了用VB6来做

级别: 工作组
注册时间:
2003-08-26
在线时间:
13小时
发帖:
6600
只看该作者 22楼 发表于: 2004-07-28
引用
最初由 wangh 发布
原本是用的vb.net,后来想到很多人都没装.net,所以还是改回了用VB6来做
源代码公开吗?……

催片请点此处: http://bbs.popgo.org/bbs/read.php?tid=502402&displayMode=1#19103164
级别: 新手上路
注册时间:
2001-11-21
在线时间:
0小时
发帖:
264
只看该作者 23楼 发表于: 2004-07-28
引用
最初由 MeteorRain 发布
源代码公开吗?……

OK,直接贴了
__________________________________________

Public Class FormMain
Inherits System.Windows.Forms.Form
Private cDialHead As String = "Dialogue: 0,"
Private cDialText As String = ",Default,,0,0,0,,"
Private OutText(1000) As String

#Region " Windows 窗体设计器生成的代码 "

Public Sub New()
MyBase.New()

'该调用是 Windows 窗体设计器所必需的。
InitializeComponent()

'在 InitializeComponent() 调用之后添加任何初始化

End Sub

'窗体重写 dispose 以清理组件列表。
Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
If disposing Then
If Not (components Is Nothing) Then
components.Dispose()
End If
End If
MyBase.Dispose(disposing)
End Sub

'Windows 窗体设计器所必需的
Private components As System.ComponentModel.IContainer

'注意: 以下过程是 Windows 窗体设计器所必需的
'可以使用 Windows 窗体设计器修改此过程。
'不要使用代码编辑器修改它。
Friend WithEvents TextBoxIn As System.Windows.Forms.TextBox
Friend WithEvents SplitterMain As System.Windows.Forms.Splitter
Friend WithEvents PanelMain As System.Windows.Forms.Panel
Friend WithEvents TextBoxOut As System.Windows.Forms.TextBox
Private Sub InitializeComponent()
Me.TextBoxIn = New System.Windows.Forms.TextBox
Me.SplitterMain = New System.Windows.Forms.Splitter
Me.PanelMain = New System.Windows.Forms.Panel
Me.TextBoxOut = New System.Windows.Forms.TextBox
Me.PanelMain.SuspendLayout()
Me.SuspendLayout()
'
'TextBoxIn
'
Me.TextBoxIn.Dock = System.Windows.Forms.DockStyle.Top
Me.TextBoxIn.Location = New System.Drawing.Point(0, 0)
Me.TextBoxIn.Multiline = True
Me.TextBoxIn.Name = "TextBoxIn"
Me.TextBoxIn.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
Me.TextBoxIn.Size = New System.Drawing.Size(496, 160)
Me.TextBoxIn.TabIndex = 0
Me.TextBoxIn.Text = ""
'
'SplitterMain
'
Me.SplitterMain.Dock = System.Windows.Forms.DockStyle.Top
Me.SplitterMain.Location = New System.Drawing.Point(0, 160)
Me.SplitterMain.MinExtra = 64
Me.SplitterMain.MinSize = 64
Me.SplitterMain.Name = "SplitterMain"
Me.SplitterMain.Size = New System.Drawing.Size(496, 8)
Me.SplitterMain.TabIndex = 2
Me.SplitterMain.TabStop = False
'
'PanelMain
'
Me.PanelMain.Controls.Add(Me.TextBoxOut)
Me.PanelMain.Dock = System.Windows.Forms.DockStyle.Fill
Me.PanelMain.Location = New System.Drawing.Point(0, 168)
Me.PanelMain.Name = "PanelMain"
Me.PanelMain.Size = New System.Drawing.Size(496, 157)
Me.PanelMain.TabIndex = 5
'
'TextBoxOut
'
Me.TextBoxOut.Dock = System.Windows.Forms.DockStyle.Fill
Me.TextBoxOut.Location = New System.Drawing.Point(0, 0)
Me.TextBoxOut.Multiline = True
Me.TextBoxOut.Name = "TextBoxOut"
Me.TextBoxOut.ScrollBars = System.Windows.Forms.ScrollBars.Vertical
Me.TextBoxOut.Size = New System.Drawing.Size(496, 157)
Me.TextBoxOut.TabIndex = 5
Me.TextBoxOut.Text = ""
'
'FormMain
'
Me.AutoScaleBaseSize = New System.Drawing.Size(6, 14)
Me.ClientSize = New System.Drawing.Size(496, 325)
Me.Controls.Add(Me.PanelMain)
Me.Controls.Add(Me.SplitterMain)
Me.Controls.Add(Me.TextBoxIn)
Me.MinimumSize = New System.Drawing.Size(320, 320)
Me.Name = "FormMain"
Me.Text = "KaraOK"
Me.PanelMain.ResumeLayout(False)
Me.ResumeLayout(False)

End Sub

#End Region

Private Sub TextBoxIn_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBoxIn.TextChanged
Array.Clear(OutText, 0, 1000)
AzalText(TextBoxIn.Text)
OutTexts()
End Sub

Private Sub AzalText(ByVal inText As String)
Dim i As Integer
Dim pStr As Integer
Dim tST As Integer
Dim tED As Integer
Dim tStr As String
tST = 1
Do
tST = InStr(tST, inText, "karaoke.add")
If tST Then
pStr = InStr(tST, inText, "'") + 1
tStr = Mid$(inText, pStr, 8)
OutText(i) = cDialHead & "0:" & tStr
pStr = InStr(pStr + 10, inText, "'") + 1
tStr = Mid$(inText, pStr, 8)
OutText(i) = OutText(i) & ",0:" & tStr & cDialText
pStr = InStr(pStr + 10, inText, "'") + 1
tED = InStr(pStr, inText, ")")
If tED = 0 Then
tED = Len(inText)
End If
OutText(i) = OutText(i) & AzalSub(Mid$(inText, pStr, tED - pStr))
i = i + 1
tST = pStr
Else
Exit Do
End If
Loop
End Sub

Private Function AzalSub(ByVal inText As String) As String
Dim SubText() As String
Dim SubTimeText() As String
Dim SubTime() As Integer
Dim tST As Integer
Dim i As Integer
Dim pStr As Integer
Dim Chars As Integer
Dim tStr As String
tST = InStr(1, inText, ", '")
tStr = Mid(inText, tST + 3)
SubTimeText = Split(tStr, ",")
If SubTimeText.Length Then
ReDim SubText(SubTimeText.Length - 1)
ReDim SubTime(SubTimeText.Length - 1)
End If
Do
pStr = pStr + 1
If i > SubTimeText.Length - 1 Then Exit Do
tStr = (Mid(inText, pStr, 1))
If tStr = "[" Then
Chars = 1
GoTo passC
ElseIf tStr = "]" Then
Chars = 0
i = i + 1
GoTo passC
End If
If Chars Then
SubText(i) = SubText(i) & tStr
Else
SubText(i) = tStr
i = i + 1
End If
passC:
Loop While pStr < tST
For i = 0 To SubTime.Length - 1
SubTime(i) = Val(SubTimeText(i))
Next i
For i = 1 To SubTime.Length - 1
SubTime(i) = SubTime(i) + SubTime(i - 1)
Next i
For i = 0 To SubTime.Length - 1
SubTime(i) = SubTime(i) \ 10
Next i
Dim j As Integer
For i = 0 To SubTime.Length - 1
For j = i + 1 To SubTime.Length - 1
SubTime(j) = SubTime(j) - SubTime(i)
Next j
Next i
For i = 0 To SubTime.Length - 1
SubText(i) = "{\K" & (SubTime(i)) & "}" & SubText(i)
AzalSub = AzalSub & SubText(i)
Next i
End Function

Private Sub OutTexts()
Dim i As Integer
Dim tText As String
For i = 0 To 1000
tText = tText & OutText(i) & Chr(13) & Chr(10)
If Len(OutText(i)) = 0 Then Exit For
Next
TextBoxOut.Text = tText
End Sub
End Class

__________________________________________

vb.net和vb6的代码基本一样的,只是自己觉得vb.net用比较方便,做起来更快些

级别: 新手上路
注册时间:
2003-05-11
在线时间:
0小时
发帖:
242
只看该作者 24楼 发表于: 2004-07-28
wangh能寄到我e-mail里吗??????
toothlog@msn.com
toothlog@yahoo.com.cn
toothlog@ktxp.com

http://www.raremovieimages.com/movienews/LamChing-ying.jpg

我曾经说过,不到最后一刻我也不会知道最喜欢的女人是谁,不知道她现在在干什么呢?
天开始亮了,今天的天气看上去不错,不知道今天的日落会是怎么样的呢?


不知道从什么时候开始,在什么东西上面都有个日期,秋刀鱼会过期,肉罐头会过期,
连保鲜纸都会过期,我开始怀疑,在这个世界上,还有什么东西是不会过期的?


我听别人说这世界上有一种鸟是没有脚的,它只能够一直的飞呀飞呀,
飞累了就在风里面睡觉,这种鸟一辈子只能下地一次,那一次就是它死亡的时候。


我一直以为是我自己赢了,直到有一天看着镜子,才知道自己输了,
在我最美好的时候,我最喜欢的人都不在我身边。如果能重新开始那该多好啊!


每天,你都会和许多人擦肩而过,他们可能会成为你的朋友或是知己。
所以我从来没有放弃和任何人擦肩而过的机会。
有时候搞得自己头破血流,管他呢!开心就行了。
级别: 新手上路
注册时间:
2001-11-21
在线时间:
0小时
发帖:
264
只看该作者 25楼 发表于: 2004-07-28
引用
最初由 toothlog 发布
wangh能寄到我e-mail里吗??????
toothlog@msn.com
toothlog@yahoo.com.cn
toothlog@ktxp.com


OK,发到了toothlog@msn.com中

级别: 精灵王
注册时间:
2003-12-28
在线时间:
6小时
发帖:
3532
只看该作者 26楼 发表于: 2004-07-28
楼上某位8死族人说话语气好象TX某MM。。。。。- -
级别: 风云使者
注册时间:
2002-11-27
在线时间:
0小时
发帖:
7247
只看该作者 27楼 发表于: 2004-07-28
karaokvb6.exe
打开怎么就两空窗口....

FIGURE ON PLAN
级别: 工作组
注册时间:
2003-08-26
在线时间:
13小时
发帖:
6600
只看该作者 28楼 发表于: 2004-07-28
说一个你的程序的潜在的问题
看你算时间用的都是四舍五入吧
那么假如每个时间长都是295的话,是不是都会变成\K30?也就是慢了0.005秒吧……
那么假如我连续排1000个,最后一个就会慢5秒吧…………
虽然不是明显的错误,但是总是一个小小的缺陷……

催片请点此处: http://bbs.popgo.org/bbs/read.php?tid=502402&displayMode=1#19103164
级别: 精灵王
注册时间:
2004-07-26
在线时间:
18小时
发帖:
3730
只看该作者 29楼 发表于: 2004-07-28
引用
最初由 slsquare 发布
karaokvb6.exe
打开怎么就两空窗口....


把那个灰熊的语句复制进去,自动转换........



沉默是金................
懂得不多,就单单学会点人家传授的皮毛就一付不得了了的语气的,让人看了就只会觉得他是小丑~ 有本事自创一个有新意的理论..

高手不是挂在嘴上的~~ 挂在嘴上的叫高嘴
谦虚是美德~

  
¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤¤
  
========================================
免费诊测你的IP~~ :p :p (看不到说明有RPWT)
快速回复

限150 字节
上一个 下一个