2018年12月19日星期三

如何提取处理YouTube视频中的字幕

经查阅验证,发现以下该链接,可以在线下载视频中的字幕,简洁有效,遂记录:





http://downsub.com/



此外,还有一个软件叫4K Video Downloader,不过暂时没用过,先记录一下:



下载的字幕文件为.srt格式,用记事本、nodepad++都可以打开,尝试了一下Word,也可以打开。打开之后发现存在很多无关的信息,如时间轴之类的,额,对于我这个编程小白,强大的替换功能呀:



以下步骤摘自点击打开链接:



1、用word打开srt文件,将两个连续的段落标记(^p^p)替换为+,将一个段落标记替换为=,再将+替换为段落标记,这样srt文件就成为每行显示一句字幕的格式。


2、全选,然后表格---转换---将文字转换为表格,分割标记选择=。选择完=后,上方列数将自动识别文档中的列数,如为3列,则删除头两列,剩下的就是单纯的字幕文字。再把表格转换为文本,分隔符选择段落标记。。若为7列,则删除1、2、5、6列,转换为文本,再用替换的方式去除多余的段落标记。保存即可。


若存在时间轴,可去除。方法:编辑——替换(可以在打开word时直接按CTRL+F),在查找框输入


00:^#^#:^#^#,^#^#^# --> 00:^#^#:^#^#,^#^#^#^p替换框空白,全部替换即可。


具体流程截图参考:去掉字幕文件里的时间轴信息


在网上也找到一个用c++实现的小程序,贴个链接以供参考:


C++实现转换Srt字幕文件为Txt纯文本(Srt转txt,方便打印)


---------------------

作者:sunmingliu



2 条评论:

  1. Do you need to increase your credit score?
    Do you intend to upgrade your school grade?
    Do you want to hack your cheating spouse Email, whatsapp, Facebook, instagram or any social network?
    Do you need any information concerning any database.
    Do you need to retrieve deleted files?
    Do you need to clear your criminal records or DMV?
    Do you want to remove any site or link from any blog?
    you should contact this hacker, he is reliable and good at the hack jobs..
    contact : cybergoldenhacker at gmail dot com

    回复删除

  2. I can’t say much but with my experience through divorce, I had no one until I met hackingsetting50@gmail.com online then I contacted him, surprisingly he helped me hack into my partner's phone and all his social media platforms and i can now access everything and even documented and printed stuffs to show as evidence , now I’m happy with my kids and working for Riches. I hope this helps anyone in need.

    Thanks.

    回复删除

注意:只有此博客的成员才能发布评论。

Also Read: