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

网站域名费用怎么做帐什么网站管理系统好

网站域名费用怎么做帐,什么网站管理系统好,wordpress学院主题,线上营销策略都有哪些首先#xff0c;确保你已经安装了ffmpeg。 然后再次保证所有ts文件放在同一个文件夹中#xff0c;并且依次命名为 1.ts 、 2.ts 、 3.ts 、 4.ts 、 4.ts 。。。 Python完整代码如下#xff1a;(ffmpeg_batch_merge_ts.py文件) #!/usr/bin/python3 # -*- coding: UTF-8 -*…首先确保你已经安装了ffmpeg。 然后再次保证所有ts文件放在同一个文件夹中并且依次命名为 1.ts 、 2.ts 、 3.ts 、 4.ts 、 4.ts 。。。 Python完整代码如下(ffmpeg_batch_merge_ts.py文件) #!/usr/bin/python3 # -*- coding: UTF-8 -*-import os# # 设置包含.ts文件的目录。 # ts_directory /path/to/ts/files;# # 遍历目录中的所有.ts文件。 # for filename in os.listdir(ts_directory): # if filename.endswith(.ts): # # 构建源文件和目标文件的路径。 # source_path os.path.join(ts_directory, filename); # target_path os.path.join(ts_directory, os.path.splitext(filename)[0] .mp4); # # # 构建ffmpeg命令并运行。 # ffmpeg_command fffmpeg -i {source_path} {target_path}; # os.system(ffmpeg_command);def is_no_ignore(ignore_id_tuple, the_id):for x in ignore_id_tuple:if x the_id: return False;return True;# 定义函数。 def file_copy(source_path, target_path):print(file_copy);with open(source_path, rb) as source_file:with open(target_path, wb) as target_file:target_file.write(source_file.read());# 设置包含.ts文件的目录。 # ts_directory /path/to/ts/files; ts_directory ; while len(ts_directory) 0:# 在Python中, 你可以使用input()函数来获取键盘输入。ts_directory input(请输入ts文件所在的目录: ); os.system(fcd {ts_directory} pwd); # 由于ffmpeg一次合并的ts数量不能过大, 否则合并失败, 因此需要限制。 ts_number_per_group 100; ts_count 0; while ts_count 0:try:ts_count int(input(请输入ts的数量: ));except ValueError:print([Error] 您输入的数量不是整数!) # ts_ignore_id_list [120, 121, 122, 123, 124, 455, 456, 457, 458, 459]; # ts_ignore_id_tuple (120, 121, 122, 123, 124, 455, 456, 457, 458, 459); ts_ignore_id_tuple (); if ts_count ts_number_per_group:ts_group_count (ts_count ts_number_per_group - 1) // ts_number_per_group;print(分组组数:, ts_group_count);final_ffmpeg_input ;for group_index in range(ts_group_count):group_id group_index 1;print(第, group_id, 组开始);ts_start_id ts_number_per_group * group_index 1;ts_end_id ts_number_per_group * (group_index 1);if ts_end_id ts_count: ts_end_id ts_count;ffmpeg_input ;for ts_id in range(ts_start_id, ts_end_id):# print(group_id, ts_id);if is_no_ignore(ts_ignore_id_tuple, ts_id):ffmpeg_input f{ts_id}.ts|;else:print(Ignore_id, ts_id);else:if is_no_ignore(ts_ignore_id_tuple, ts_id):ffmpeg_input f{ts_end_id}.ts;else:ffmpeg_input ffmpeg_input[0:len(ffmpeg_input) - 1];print(ffmpeg_input);if ffmpeg_input.find(|) ! -1:# 一个组内ts合并。os.system(fcd {ts_directory} ffmpeg -i concat:{ffmpeg_input} -c copy temp_{group_id}.mp4);# 把 一个组内ts合并的mp4 转成 temp.ts 。os.system(fcd {ts_directory} ffmpeg -i temp_{group_id}.mp4 -codec copy -vbsf h264_mp4toannexb temp_{group_id}.ts);else:file_copy(f{ts_directory}/{ffmpeg_input}, f{ts_directory}/temp_{group_id}.ts);final_ffmpeg_input ftemp_{group_id}.ts|;print(第, group_id, 组结束);final_ffmpeg_input final_ffmpeg_input[0:len(final_ffmpeg_input) - 1];print(final_ffmpeg_input);# 把 合成的组temp.ts 再次合并。os.system(fcd {ts_directory} ffmpeg -i concat:{final_ffmpeg_input} -c copy target.mp4); else:print(only one group);ffmpeg_input ;for ts_id in range(1, ts_count):# print(group_id, ts_id);if is_no_ignore(ts_ignore_id_tuple, ts_id):ffmpeg_input f{ts_id}.ts|;else:print(Ignore_id, ts_id);ffmpeg_input f{ts_count}.ts;print(ffmpeg_input);# 一个组内ts合并。os.system(fcd {ts_directory} ffmpeg -i concat:{ffmpeg_input} -c copy target.mp4);print(track_main_exit);
http://www.dnsts.com.cn/news/95265.html

相关文章:

  • 网站seo优化有哪些书店网站建设规划书
  • 网站这么建设泰州网站关键词优化软件咨询
  • 建设部网站监理公告网页制作教程和素材
  • 广东网站系统建设企业网站建站技术
  • 注册网站怎么注册app定制开发网站建设
  • 商业网站源码萤火虫网站建设优化
  • 企业内部网站建设方案2023最佳创业商机
  • html怎么做网站地图琼海建设网站
  • 江门免费网站建站模板网站建设哪家售后做的好
  • 健康养生网站源码沈阳高端做网站建设
  • 免费购物网站建设部执业注册中心网站
  • 手机建网站需要多少钱it培训机构一般多少钱
  • 能看任何网站的浏览器网站域名交易
  • iis默认网站启动不了云南省住房和城乡建设厅官方网站
  • 易名网站备案用DW做网站时怎么在新窗口打开
  • 网站建设需要关注什么同一ip网站
  • 米客优品的网站是哪做的做网站张家口
  • 网络营销个人网站wordpress 主机空间
  • 网站建设演讲稿重庆市建设工程信息网安全监督查询
  • 国外的做外包项目的网站wordpress通用页面模板
  • 网站搜索框设计wordpress 插件 安装教程
  • 网站设计公司建设医院网站建设与管理ppt
  • 域名备案关闭网站wordpress页面模板插件
  • 电影网站开发影院座位问题wordpress theme o'connor 下载
  • 一站式网站建设 t云仿wordpress模板教程
  • 全球著名科技网站交通局网站建设整改
  • 安防公司网站模板如何推广app更高效
  • 网站备案管局审核企业网站开发计划书
  • 东莞做网站企业成都家具企业网站建设
  • 网站开发的经济可行性分析企业建设好一个网站后_如何进行网站推广?