当前位置: 首页 > news >正文

海南省建设网站首页竞价代运营公司

海南省建设网站首页,竞价代运营公司,wordpress 七牛镜像,做平台推广怎么找客户自己喜欢收藏电影,有时网上能找到的中文字幕文件都不满足自己电影版本。在自己下载的压制版电影中已内封非中文srt字幕时,可以选择自己将srt的时间轴转为ass并替换ass中的时间轴。自己在频繁 复制粘贴改格式的时候想起可以用Python代码完成转换这一操作&…

自己喜欢收藏电影,有时网上能找到的中文字幕文件都不满足自己电影版本。在自己下载的压制版电影中已内封非中文srt字幕时,可以选择自己将srt的时间轴转为ass并替换ass中的时间轴。自己在频繁
复制粘贴改格式的时候想起可以用Python代码完成转换这一操作,借助ChatGPT并自己稍作修改后用代码实现了。自己测试可用。

没指定srt文件的路径,使用前首先需要将srt后缀先改为txt文本格式,代码默认输入为“input.txt”,输出“output.txt”。运行时待转换的txt文件需要和py文件在同一目录内。
 

import redef convert_timecode(line):if "-->" in line:# Split the line into two parts using the arrowparts = line.strip().split(" --> ")# Process each part separatelynew_parts = []for i, part in enumerate(parts):if i == 0:# For the first timecode, insert a comma between the first two characterspart = part[0] + "," + part[1:]else:# For the second timecode, remove the first characterpart = part[1:]# Remove the last digit from the milliseconds parthours, minutes, seconds_milliseconds = part.split(":")seconds, milliseconds = seconds_milliseconds.split(",")milliseconds = milliseconds[:-1]  # Remove the last digit# Replace the last colon before the milliseconds part with a dotnew_part = f"{hours}:{minutes}:{seconds}.{milliseconds}"new_parts.append(new_part)# Join the parts back together using a commanew_line = ",".join(new_parts)return new_line + "\n"else:# If the line doesn't contain an arrow, return it unchangedreturn line# Replace 'input.txt' with the name of your input file, and 'output.txt' with the name of your output file.
with open('input.txt', 'r', encoding='utf-8') as infile, open('output.txt', 'w', encoding='utf-8') as outfile:for line in infile:outfile.write(convert_timecode(line))

不过还是需要手动对照翻译复制粘贴进行调轴,就是比以前手动改时间轴格式方便了些。不知道有没有一键将srt直接按照格式转为ass的软件,甚至实现普通字幕改特效字幕。

转换前srt格式时间轴

转换后ass格式时间轴

http://www.zhongyajixie.com/news/22657.html

相关文章:

  • 网站开发需求表网站的优化公司
  • 网站如何建设名称网络营销渠道
  • 柳州做网站人员百度竞价运营
  • 西渡网站建设seo外链发布技巧
  • 网站排名优化建设互联网销售模式
  • photoshop怎么做网站排名nba
  • 一流本科专业建设网站dw友情链接怎么设置
  • 嘉祥网站建设哪家便宜系统优化的方法
  • 我来做煮官方网站百度竞价推广的优势
  • vmware做网站步骤百度付费推广有几种方式
  • 驻马店市住房和城乡建设局网站首页百度收录快的发帖平台
  • 电力行业做的好的招投标网站武汉seo网站优化
  • 公司网站维护怎么做站长工具查询域名
  • 找做外墙油漆网站精品成品网站入口
  • 怎么做正规网站吗什么时候友情链接
  • 鹤壁做网站多少钱网站seo主要是做什么的
  • 网站分站作用最近的新闻热点
  • 石家庄网站制作公司哪家好免费网络推广平台有哪些
  • 做网站主页上主要放哪些内容长沙网站开发制作
  • 招聘网站如何做运营写手代写平台
  • 成人学历提升大专大概要多少钱网站关键词优化办法
  • 网站公安局备案 教程优秀品牌策划方案
  • 做soho要不要注册网站如何搭建网站
  • 开网站做外贸seopeixun com cn
  • 第三方网站建设平台郑州百度推广开户
  • 电商网站建设方案深圳搜索排名优化
  • 做景区网站建设的公司深圳关键词
  • 汉化主题做网站正规电商平台有哪些
  • 怎么查网站备案域名备案如何进行网络营销推广
  • 常用来做网站首业的是seo网站优化培