仓鼠二号 发表于 2020-4-19 22:25:24

营销号视频生成器

本帖最后由 仓鼠二号 于 2020-4-26 17:55 编辑

好久没用python了 试着自己做一个营销号视频生成器 内容简单,仅供学习交流使用。
需要的库 moviepy 为 1.0.0.0版本
主要使用moviepy库实现视频的拼接和语音叠加,用百度API接口实现文本文字转换成语音,要使用需要自己注册个
更新下 用pyqt5给套了个界面



**** Hidden Message *****

Hello. 发表于 2020-4-19 22:29:22

{:10_275:}

老八秘制 发表于 2020-4-19 22:34:02

建议改成:降智打击

老八秘制 发表于 2020-4-19 23:05:42

为什么会这样:
输入主体: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:36:29

老八秘制 发表于 2020-4-19 23:05
为什么会这样:

看最后一句没back.mp3。。。音频和视频文件素材需要自己整几个。。

仓鼠二号 发表于 2020-4-19 23:47:23

本帖最后由 仓鼠二号 于 2020-4-19 23:49 编辑

素材放链接了
接口还是要自己注册

老八秘制 发表于 2020-4-20 08:52:10

仓鼠二号 发表于 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 10:09:07

老八秘制 发表于 2020-4-20 08:52
这又是啥?

缺什么环境就补什么moviepy还有个exe文件需要安装

段东杰 发表于 2020-4-25 17:58:08

楼主牛逼

Levin-e 发表于 2020-4-25 19:29:02

学习一下

hax1994 发表于 2020-4-25 19:29:41

1

weiter 发表于 2020-4-25 19:32:42

哇~牛皮!

_2_ 发表于 2020-4-25 20:12:54

这牛顿的营销……

wmathor 发表于 2020-4-25 22:24:54

感谢楼主分享

fRanKen_fRanKen 发表于 2020-5-7 17:25:52

看看学习

赵丽颖 发表于 2020-12-23 15:30:29

gooood

cnfri 发表于 2022-3-21 01:59:08

营销号视频生成器

qq1151985918 发表于 2022-3-21 08:43:28

看看看看

3363592014 发表于 2022-7-25 18:07:11

666666666666666666
页: [1]
查看完整版本: 营销号视频生成器