https://github.com/apachecn-archive/rubbish-video-generator

https://github.com/apachecn-archive/rubbish-video-generator

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (4.1%) to scientific vocabulary
Last synced: 9 months ago · JSON representation

Repository

Basic Info
  • Host: GitHub
  • Owner: apachecn-archive
  • Language: Python
  • Default Branch: master
  • Size: 24.2 MB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created about 3 years ago · Last pushed about 3 years ago
Metadata Files
Readme

README.md

Rubbish-Video-Generator

B站讲解

营销号视频生成器~仅供娱乐

功能:自动生成文本,自动添加字幕,自动给视频配音(人声)

:bug:1.1版本更新

  • 修复了原视频带有bgm,最终生成的视频没有声音的问题
  • 现在支持手动设定字体大小,在args.txt文件中的第五行进行设置

下载

shell $ git clone https://github.com/wmathor/Rubbish-Video-Generator.git

如何使用

moviepy == 1.0.0

python > 3.5

自行安装ImageMagick

缺少的库自行pip

如果报错'module 'websocket' has no attribute 'enableTrace'',请参考下面的解决方案

shell pip uninstall websocket pip uninstall websocket-client pip install websocket-client

  1. 需准备一个时长大于50s的视频,有无背景音乐均可,命名为in.mp4
  2. 需准备一个时长大于50s的BGM,命名为in.mp3
  3. 提前在args.txt文本中定义好主体、事件、另一种说法
  4. args.txt文本中添加讯飞语音合成(流式版)的APPIDAPIKeyAPISecret,以英文分号;分隔
  5. 执行程序

示例

设计思路

  1. 剪裁视频→getVideo()
  2. 将台词写入文本→getText(file)
  3. 获取视频总时长→getLength(video)
  4. 给视频添加背景音乐→add_audio(video, mp3, output='out.mp4')
  5. 给视频添加字幕→subTitle(text_file, video_file, output='out_sub.mp4')
  6. 文本转人声→讯飞API
  7. 给视频添加人声→add_people(mp3_file, video_file)
  8. 清除中间生成的文件→clean()

LICENSE

知识共享许可协议
本作品采用知识共享署名-非商业性使用-相同方式共享 4.0 国际许可协议进行许可

Owner

  • Name: ApacheCN 归档
  • Login: apachecn-archive
  • Kind: organization
  • Email: wizard.z@qq.com

防止重要项目丢失而设立的归档

GitHub Events

Total
Last Year