营销号视频生成器
本帖最后由 仓鼠二号 于 2020-4-26 17:55 编辑好久没用python了 试着自己做一个营销号视频生成器 内容简单,仅供学习交流使用。
需要的库 moviepy 为 1.0.0.0版本
主要使用moviepy库实现视频的拼接和语音叠加,用百度API接口实现文本文字转换成语音,要使用需要自己注册个
更新下 用pyqt5给套了个界面
**** Hidden Message *****
{:10_275:} 建议改成:降智打击 为什么会这样:
输入主体:1+1
输入事件:=2
输入原因:不知道
语句速度(0~9):4
Traceback (most recent call last):
File "C:\Users\Administrator.USER-20181215CS\Desktop\桌面杂物(或许大多数都是Python?)\其他\xiaosi.py", line 131, in <module>
out_video(make_video(text))
File "C:\Users\Administrator.USER-20181215CS\Desktop\桌面杂物(或许大多数都是Python?)\其他\xiaosi.py", line 83, in make_video
music_clip,end= make_music(text, spd)
File "C:\Users\Administrator.USER-20181215CS\Desktop\桌面杂物(或许大多数都是Python?)\其他\xiaosi.py", line 38, in make_music
music_clip = AudioFileClip('back.mp3').volumex(0.5)
File "C:\Users\Administrator.USER-20181215CS\AppData\Local\Programs\Python\Python38\lib\site-packages\moviepy\audio\io\AudioFileClip.py", line 70, in __init__
self.reader = FFMPEG_AudioReader(filename, fps=fps, nbytes=nbytes,
File "C:\Users\Administrator.USER-20181215CS\AppData\Local\Programs\Python\Python38\lib\site-packages\moviepy\audio\io\readers.py", line 51, in __init__
infos = ffmpeg_parse_infos(filename)
File "C:\Users\Administrator.USER-20181215CS\AppData\Local\Programs\Python\Python38\lib\site-packages\moviepy\video\io\ffmpeg_reader.py", line 270, in ffmpeg_parse_infos
raise IOError(("MoviePy error: the file %s could not be found!\n"
OSError: MoviePy error: the file back.mp3 could not be found!
Please check that you entered the correct path. 老八秘制 发表于 2020-4-19 23:05
为什么会这样:
看最后一句没back.mp3。。。音频和视频文件素材需要自己整几个。。 本帖最后由 仓鼠二号 于 2020-4-19 23:49 编辑
素材放链接了
接口还是要自己注册 仓鼠二号 发表于 2020-4-19 23:36
看最后一句没back.mp3。。。音频和视频文件素材需要自己整几个。。
这又是啥?
Traceback (most recent call last):
File "C:\Users\Administrator.USER-20181215CS\AppData\Local\Programs\Python\Python38\lib\site-packages\moviepy\video\VideoClip.py", line 1137, in __init__
subprocess_call(cmd, logger=None)
File "C:\Users\Administrator.USER-20181215CS\AppData\Local\Programs\Python\Python38\lib\site-packages\moviepy\tools.py", line 46, in subprocess_call
proc = sp.Popen(cmd, **popen_params)
File "C:\Users\Administrator.USER-20181215CS\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 854, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Administrator.USER-20181215CS\AppData\Local\Programs\Python\Python38\lib\subprocess.py", line 1307, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Administrator.USER-20181215CS\Desktop\桌面杂物(或许大多数都是Python?)\其他\yingxiaohao\main.py", line 130, in <module>
out_video(make_video(text))
File "C:\Users\Administrator.USER-20181215CS\Desktop\桌面杂物(或许大多数都是Python?)\其他\yingxiaohao\main.py", line 86, in make_video
sub = SubtitlesClip("test.srt",generator)
File "C:\Users\Administrator.USER-20181215CS\AppData\Local\Programs\Python\Python38\lib\site-packages\moviepy\video\tools\subtitles.py", line 86, in __init__
hasmask = bool(self.make_textclip('T').mask)
File "C:\Users\Administrator.USER-20181215CS\Desktop\桌面杂物(或许大多数都是Python?)\其他\yingxiaohao\main.py", line 85, in <lambda>
generator = lambda txt: TextClip(txt, font = FONT_URL,fontsize=30, color='white')
File "C:\Users\Administrator.USER-20181215CS\AppData\Local\Programs\Python\Python38\lib\site-packages\moviepy\video\VideoClip.py", line 1146, in __init__
raise IOError(error)
OSError: MoviePy Error: creation of None failed because of the following error:
系统找不到指定的文件。.
.This error can be due to the fact that ImageMagick is not installed on your computer, or (for Windows users) that you didn't specify the path to the ImageMagick binary in file conf.py, or that the path you specified is incorrect 老八秘制 发表于 2020-4-20 08:52
这又是啥?
缺什么环境就补什么moviepy还有个exe文件需要安装 楼主牛逼 学习一下 1 哇~牛皮! 这牛顿的营销…… 感谢楼主分享
看看学习 gooood 营销号视频生成器 看看看看 666666666666666666
页:
[1]