admin管理员组文章数量:1605612
杜比视界免费播放器
杜比视界一般结构是DV.mp4这样子,如: 月光骑士Moon.Knight.S01E01.2022.DSNP.WEB-DL.2160p.HEVC.DV.DDP-Xiaomi.mp4
具体表现为迅雷内置播放器播放全片泛绿色,媒体播放器播放全片泛绿色。优酷播放器、爱奇艺播放器等无法解析或全片泛绿色。
比如这样子:
恒星播放器可以看杜比视界,但是收费!
其实win10 win11自带的媒体播放器就可以做到免费观看,就是需要装一下一两个不要钱的官方插件
第一个插件hevc
Microsoft Appsdd
第二个插件dolby
Microsoft Apps
装好其中一个就可以去掉绿色泛黄。另一个功能是画质优化之类的吧就。
srt字幕时间轴时间修改
媒体播放器没有字幕轴调整功能,非常不人性化,所以看杜比的字幕只能自己调整。art本质上差不多就是个文本文件而已,批量修改一下时间就可以了。
我做的是针对我看的美剧字幕调整,暂时没有考虑大于一小时的字幕调整。如有需要可以自己加上这方面。输入变量为原字幕文件名,新字幕文件名,修改弹幕轨迹时间(可以为正也可以为负)。
import re
def change_time(tm, changeminute):
rec = repile('\d\d:(?P<d1>.*?):(?P<d2>.*?),\d\d\d --> \d\d:(?P<d3>.*?):(?P<d4>.*?),\d\d\d')
s = rec.search(tm)
if s:
org_tm = s.group()
d1 = s.group('d1')
d2 = s.group('d2')
d3 = s.group('d3')
d4 = s.group('d4')
tar_s1 = int(d2) + changeminute
tar_s2 = int(d4) + changeminute
tar_m1 = int(d1)
tar_m2 = int(d3)
if changeminute > 0:
if tar_s1 >= 60:
tar_m1 += 1
tar_s1 = tar_s1 - 60
if tar_s2 >= 60:
tar_m2 += 1
tar_s2 = tar_s2 - 60
if changeminute < 0:
if tar_s1 < 0:
tar_m1 -= 1
tar_s1 = tar_s1 + 60
if tar_s2 < 0:
tar_s2 = tar_s2 + 60
oo = org_tm[0:3] + ':' + org_tm[8:20] + ':,' + org_tm[-3:]
new_tm = ''
listx1 = [tar_m1, tar_s1, tar_m2, tar_s2]
listx = []
for i in listx1:
if i < 10:
i = '0' + str(i)
else:
i = str(i)
listx.append(i)
bgq = -1
for i in oo:
new_tm = new_tm + i
if i == ':':
bgq += 1
new_tm += listx[bgq]
print(new_tm)
return new_tm + '\n'
else:
return tm
def change_file_tm(ct, file1, file2):
rec = repile('(?P<d1>.*?):(?P<d2>.*?):\d\d,\d\d\d --> (?P<d3>.*?):(?P<d4>.*?):\d\d,\d\d\d')
with open(file1, 'r', encoding='utf-8') as f1:
with open(file2, 'w', encoding='utf-8') as f2:
for line in f1:
s = rec.search(line)
if s:
line = change_time(line, ct)
f2.write(line)
if __name__ == '__main__':
ct = 4 # 输入修改字幕轨道秒数 正数表示 字幕推迟秒数
file1 = '1.srt' # 原字幕文件
file2 = '2.srt' # 修改字幕轨道的字幕文件
change_file_tm(ct, file1, file2)
ass字幕时间轴时间修改
import re
def change_time_str(test, ct):
rec = repile('\d,\d:(?P<d1>.*?):(?P<d2>.*?).\d\d,\d:(?P<d3>.*?):(?P<d4>.*?).\d\d')
num = rec.search(test)
if num:
org_tm = num.group()
d1 = num.group('d1')
d2 = num.group('d2')
d3 = num.group('d3')
d4 = num.group('d4')
tar_s1 = int(d2) + ct
tar_s2 = int(d4) + ct
tar_m1 = int(d1)
tar_m2 = int(d3)
if ct > 0:
if tar_s1 >= 60:
tar_m1 += 1
tar_s1 = tar_s1 - 60
if tar_s2 >= 60:
tar_m2 += 1
tar_s2 = tar_s2 - 60
if ct < 0:
if tar_s1 < 0:
tar_m1 -= 1
tar_s1 = tar_s1 + 60
if tar_s2 < 0:
tar_s2 = tar_s2 + 60
oo = org_tm[0:3] + '::.' + org_tm[10:14]+'::.'+org_tm[-2:]
new_tm = ''
listx1 = [tar_m1, tar_s1, tar_m2, tar_s2]
listx = []
for i in listx1:
if i < 10:
i = '0' + str(i)
else:
i = str(i)
listx.append(i)
bgq = -1
for i in oo:
new_tm = new_tm + i
if i == ':':
bgq += 1
new_tm += listx[bgq]
return test.replace(org_tm,new_tm)
else:
return test
def change_file_tm(ct, file1, file2):
rec = repile('\d,\d:(?P<d1>.*?):(?P<d2>.*?).\d\d,\d:(?P<d3>.*?):(?P<d4>.*?).\d\d')
with open(file1, 'r', encoding='utf-8') as f1:
with open(file2, 'w', encoding='utf-8') as f2:
for line in f1:
s = rec.search(line)
if s:
line = change_time_str(line, ct)
f2.write(line)
if __name__ == '__main__':
ct = 4 # 输入修改字幕轨道秒数 正数表示 字幕推迟秒数
file1 = '1.ass' # 原字幕文件
file2 = '2.ass' # 修改字幕轨道的字幕文件
change_file_tm(ct, file1, file2)
简繁转化
如果字幕是繁体字需要转化,反正都打开字幕文件了,就可以复制了直接度娘搜简繁转化,在线转了粘贴回来就好了。
版权声明:本文标题:杜比视界免费播放器、srt、ass字幕时间轴修改-python、简繁转化 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1728486735a1160243.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论