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

济南集团网站建设报价网络营销工作内容

济南集团网站建设报价,网络营销工作内容,wordpress page模板页,深圳做网站推广哪家好自己喜欢收藏电影,有时网上能找到的中文字幕文件都不满足自己电影版本。在自己下载的压制版电影中已内封非中文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.dinnco.com/news/54531.html

相关文章:

  • 中信建设有限责任公司校招珠海网站seo
  • pdf 网站建设产品软文代写
  • 网站 专题建设服务seo网站培训优化怎么做
  • 商务贸易网站建设广州百度seo排名
  • 企业电子商务网站的建设阶段新手怎么入行seo
  • 利用网站文件下载做推广广西南宁做网站的公司
  • php网站做cdnseo优化工具推荐
  • 目前最火的大型网游上海搜索引擎关键词优化
  • 短视频网站开发教程推销广告
  • 深圳网站建设在哪里找专业的seo外包公司
  • 镇江网站建设软件开发培训多少钱
  • 濮阳网站建设熊掌网络网站seo搜索引擎优化怎么做
  • 做水果网站首页的图片素材做公司网站
  • 学习做网页的网站网上引流推广怎么做
  • 网站设计是什么意思免费留电话的广告
  • 西昌网站建设公司seo公司排名教程
  • 小企业网站欣赏google竞价推广
  • 电商设计助理工作内容公司的seo是什么意思
  • 做商城网站带宽网站搜索排名
  • 网站建设文案模板seo编辑培训
  • 如何选择营销网站建设世界最新新闻
  • 网站推广一般在哪个网做中国营销网站
  • 用jsp做一网站的流程图万词优化
  • 佛山网站制作平台什么是网站
  • 珠海市斗门建设局网站网络广告策划案例
  • 东莞网站设计开发技能大赛百度怎么发布自己的广告
  • 阿雷网站建设公司营业推广名词解释
  • 外贸建站如何推广代做百度首页排名价格
  • 外贸谷歌网站推广河南网站优化
  • 网站后台如何更新seo扣费系统