用TAW4导入外挂srt字幕无反应
版主你好!我下载了一个MKV文件和相应的SRT中文字幕文件,用MKVtoolnix4.3查看过,里面只有一个视频和一个音频文件。于是我试着用TAW4导入MKV,在字幕编辑里导入下载的同名的srt字幕文件,却没反应,见附图我在论坛里找到“[已解决 求助,用TAW4,为什么不认srt字幕?”一文,用记事本打开并仔细检查了我的字幕文件,只在最前面少了一个数字1,其它都符合你说的规范,我加上“1”后存盘,重新导入,但是在TAW的字幕编辑里还是无法显示字幕。
请帮忙!先谢!
附字幕文件
已经测试,发现每行字末尾均多出数个空格,删除后即可正常导入。附修改后的字幕文件:
楼主回复神速,感激啊!兄弟! IsaacZ 发表于 2012-2-7 14:44 static/image/common/back.gif
已经测试,发现每行字末尾均多出数个空格,删除后即可正常导入。附修改后的字幕文件:
每行末尾都多出空格,快速删除那么多空格,一定有简便方法了,老大能不能点拨一下? 直接用记事本的替换就行了,我试了一次。或者用其他srt编辑器打开并另存。 伤心的笔 发表于 2012-2-7 21:47 static/image/common/back.gif
直接用记事本的替换就行了,我试了一次。或者用其他srt编辑器打开并另存。
直接用记事本替换的话,需要小心不能删除了时间轴之间和英文单词之间的空格。 lijianwen 发表于 2012-2-7 21:31 http://bbs.dianbo.org/static/image/common/back.gif
每行末尾都多出空格,快速删除那么多空格,一定有简便方法了,老大能不能点拨一下?
我是利用Microsoft Word来做这个工作的。平常对文档进行规格化时,积累制作了几个宏,其中一个宏可以在瞬间将多个空格变成一个空格,另一个宏可以瞬间替换所有行首和行尾的空格,将字幕文本复制进入Word,点两下就完成空格消除了。复制回来保存为srt文件即可。
录制的宏,在Word的VB编辑器中显示如下:
第一个:多个空格变1个空格
Sub 多个空格变1个空格()
'
' 多个空格变1个空格 Macro
' 宏 "多个空格变1个空格" 在 2003-4-21 由 IsaacZ 录制并修改
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " "
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = " "
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = ""
.Replacement.Text = " "
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
另一个:清理行首行尾空格与制表符
Sub 清理行首行尾空格与制表符()
'
' 清理行首行尾空格与制表符 Macro
' 宏“删除行首行尾空格”在 2003-4-5 由 IsaacZ 录制并修改
'
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = "^p "
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = " ^p"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "^l "
.Replacement.Text = "^l"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = " ^l"
.Replacement.Text = "^l"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "^p^t"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
With Selection.Find
.Text = "^t^p"
.Replacement.Text = "^p"
.Forward = True
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchByte = True
.CorrectHangulEndings = False
.MatchAllWordForms = False
.MatchSoundsLike = False
.MatchWildcards = False
.MatchFuzzy = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
End Sub
IsaacZ 发表于 2012-2-7 22:11 static/image/common/back.gif
我是利用Microsoft Word来做这个工作的。平常对文档进行规格化时,积累制作了几个宏,其中一个宏可以在瞬 ...
谢谢版主解答,有学到了一招。
记得以前chnxn有个编写CUE的帖子中,也提到搜索特定字符,快速修改的方法。平时用极少用word,这次动手实践一下,加深印象,方便以后使用。 IsaacZ 发表于 2012-2-7 22:02 static/image/common/back.gif
直接用记事本替换的话,需要小心不能删除了时间轴之间和英文单词之间的空格。
我试过一次了,完全可以。 伤心的笔 发表于 2012-2-8 08:15 http://bbs.dianbo.org/static/image/common/back.gif
我试过一次了,完全可以。
如果是中文字幕,可以用记事本直接删除所有空格,然后恢复“-->”左右的空格为即可(替换【-->】为【 --> 】)。
如果是英文字幕,则不可直接删除所有空格,这样会丢失英文单词间的空格。针对英文字幕,可以用 Editplus 之类的文本编辑器,利用正则表达式功能,将【 \n】替换为【\n】,就可以删除所有行尾空格,行尾有多个空格就多次替换,直到搜索结果为0。如图:
页:
[1]
2