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

wordpress如何更改上传文件大小网站的优化策略

wordpress如何更改上传文件大小,网站的优化策略,服务好的网站开发,国内正品购物app排行最近对视频创作感兴趣#xff0c; 详情见之前写的几篇文章。 【AI应用】模仿爆款视频二次创作短视频操作步骤 【人工智能】AI数字人视频演示 【人工智能】AI视频二次创作演示 作为程序员出身的我#xff0c;看到一些功能, 我都有猎奇的习惯#xff0c; 想着自己用什么技…最近对视频创作感兴趣 详情见之前写的几篇文章。 【AI应用】模仿爆款视频二次创作短视频操作步骤 【人工智能】AI数字人视频演示 【人工智能】AI视频二次创作演示 作为程序员出身的我看到一些功能, 我都有猎奇的习惯 想着自己用什么技术来实现它呢。 处理音视频大家很容易想到大名鼎鼎的ffmpeg。FFmpeg是一套可以用来记录、转换数字音频、视频并能将其转化为流的开源计算机程序。它提供了录制、转换以及流化音视频的完整解决方案。 2013年那时候做流媒体直播的时候我就有所了解。既然我这里选择python这里介绍2个python库一个是ffmpeg-python  一个是moviepy。 这里以mac为例 windows或linux思路类似。 一、ffmpeg-python,  python代码来操作ffmpeg 1、ffmpeg下载地址 https://ffmpeg.org//download.html , 选择自己合适的版本 2、下载解压后vi /etc/profile修改环境变量  export PATH$PATH:/Users/xxxx/software/ffmpeg/bin 3、pip install ffmpeg-python 二、moviePy是一个用于视频编辑Python库切割、拼接、标题插入视频合成视频处理和自定义效果的创造。 1、必须先安装imagemagick   brew install imagemagick 这个安装比较扯安装各种缺包我秉持缺少安装什么 brew install xx的原则所幸全部安装成功了 主要是因为我之前已经换成国内源了。 如果你安装不成功可以尝试换一下中科院的源。https://mirrors.ustc.edu.cn/brew.git  2、pip3 install moviepy 三、这里给一个 moviepy视频添加字幕的简单demo 网上摘录的代码。 from moviepy.editor import CompositeVideoClip, VideoFileClipfrom moviepy.video.VideoClip import TextClipimport osimport argparse # Define the base directorybase_dir os.path.dirname(os.path.abspath(__file__)) # Define CLI argumentsparser argparse.ArgumentParser()parser.add_argument( -f, typestr, helpThe file path of target video. ex. /Users/lwj/video/example.mp4.\nDefault value is demo.mp4, defaultbase_dir /demo.mp4)parser.add_argument( -t, typestr, helpThe text you want to add to video top. ex. Hellow Video, defaultThis is demo example)parser.add_argument( -s, typeint, helpThe font size of video watermark. ex. 30, default30)parser.add_argument( -n, typestr, helpThe new file name.\n Default value is {current file name}_title.mp4,) # Define Variableargs parser.parse_args()video_path args.fvideo_watermark args.tfont_size args.s # Check whether or not the input video path is valid. If not, ask user to input again.while True: try: video VideoFileClip(video_path) print(video resultion: , video.size) break except Exception: print( Directory or file is not valid, please enter a valid file directory ...) video_path str(input(Enter the video path again (absolute path without space): )) origin_file (lambda x: x.split(/)[-1])(video_path) if args.n: new_file args.nelse: new_file f{origin_file.split(.)[0]}_title.{origin_file.split(.)[1]}def add_text(content, font_size): add text on the top of video stream # txt_clip (TextClip(content, fontsizefont_size, colorwhite) # .set_position(top) # .set_duration(video.duration)) txt_clip (TextClip(content, fontsizefont_size, colorred) .set_position(bottom) .set_duration(1)) result CompositeVideoClip([video, txt_clip]) result.write_videofile(new_file)def main(): add_text(video_watermark, font_size)if __name__ __main__: main() 命令执行  python3 video-textadder.py -f demo.mp4 -t hello world  改一下字幕位置、颜色。 未完待续后续找个时间继续水。  自己不止更新技术类文章 如果想了解更多可以关注同名公众号《子晓聊技术》
http://www.zqtcl.cn/news/288115/

相关文章:

  • php网站后台入口拼多多海外跨境电商入驻流程
  • 0731网站平面logo设计公司
  • 网站设计制作报价图片欣赏wordpress福利
  • 网站上有什么作用自己做网站需要学什么
  • 在哪里做马可波罗网站wordpress中文站cn
  • 威海外贸建站制作游戏的平台
  • 网站栏目策划 有思想的新闻网站建设开发的流程
  • 网站描述修改潍坊百度网站排名
  • 网站开发设计的技术网站开发可能存在的困难
  • 单片机做网站网站地图那么建设
  • 手机版网站建设软件wordpress主题开发ide
  • 网站建设的技术有哪些内容网站推广优化排名
  • 网站开发用jsp网站开发需要什么技术
  • 网站打开404错误怎么解决网站开发树形图
  • 好的建设网站公司哪家好湖南省做网站的
  • 网站怎么上传网站建设可行性分析表
  • 东营做网站优化价格企业网站开发一般多少钱
  • 高端网站设计公司排名邢台哪里有做网站的
  • 广州网站开发 英诺科技营销式网站建设
  • 网站存在的缺陷编程的基础知识
  • flash同视频做网站天津建设工程信息网投标信息系统
  • 湛江做网站开发手机网址大全主页网址
  • 平面网站设计如何租用网站服务器
  • 课程视频网站建设的必要性专利减缓在哪个网站上做
  • 正规品牌网站设计品牌网站建设开发 脚本语言
  • 潍坊模板建站定制网站规划管理部门的网站建设
  • 光明楼网站建设九一人才网赣州招聘官网
  • 如何做网站监控wordpress修改文章点赞数
  • 佛山高端网站建设报价网站的建设属于无形资产
  • 永川网站设计wordpress+用户前台