【AI创造营】当二仙桥遇上印尼电信广告

【AI创造营】二仙桥撞上印尼电信

还有用飞桨的素材做的另一个…

【AI创造营】二仙桥撞上印尼电信

参赛作品名

《【AI创造营】当二仙桥遇上印尼电信广告》

作品简介

二仙桥大爷听着印尼电信广告就上了成华大道,谭警官拦都拦不住,使用paddlehub 检测人物与分割,让你不用剪辑软件就能制作印尼电信广告风的视频

使用方式

python makeVideo.py --lh imgs/d.png --rh imgs/t.png --lb imgs/lback.png --rb imgs/rback.png --txt txts/exq.txt --output exq.mp4
python makeVideo.py --lh 左边的人的图片 --rh 右边的人的图片 --lb 左边的人的背景图 --rb 右边的人的背景图 --txt 对话文件 --output 生成的视频名称A
这样就生成了视频,不过这样是没有声音的,我们来给他注(jia)入(shang)灵(yin)魂(yue)!
python addbgm.py --video exq.mp4 --bgm bgms/indonesia.mp3 --output bexq.mp4
python addbgm.py --video 生成的视频名称A --bgm 背景音乐文件 --output 最终的文件名
注入了灵魂,所有的工作都完成啦

注意点

1.lb和rb这两张的图片大小要是一样的才行
2.对话的格式
A:右侧的人
B:左侧的人
格式:
    AXXXXXXXXXXX
    BYYYYYYYYYYY
这就代表了右侧的人说了XXXXXXXXXXX,左侧的人说了YYYYYYYYYYY
看了txts文件夹中的格式你就懂啦

github还有其他的干货哦

!pip install moviepy tqdm
Looking in indexes: https://mirror.baidu.com/pypi/simple/
Requirement already satisfied: moviepy in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (1.0.1)
Requirement already satisfied: tqdm in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (4.36.1)
Requirement already satisfied: imageio<3.0,>=2.5; python_version >= "3.4" in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from moviepy) (2.6.1)
Requirement already satisfied: requests<3.0,>=2.8.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from moviepy) (2.22.0)
Requirement already satisfied: imageio-ffmpeg>=0.2.0; python_version >= "3.4" in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from moviepy) (0.3.0)
Requirement already satisfied: numpy in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from moviepy) (1.16.4)
Requirement already satisfied: proglog<=1.0.0 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from moviepy) (0.1.9)
Requirement already satisfied: decorator<5.0,>=4.0.2 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from moviepy) (4.4.0)
Requirement already satisfied: pillow in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from imageio<3.0,>=2.5; python_version >= "3.4"->moviepy) (7.1.2)
Requirement already satisfied: certifi>=2017.4.17 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests<3.0,>=2.8.1->moviepy) (2019.9.11)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests<3.0,>=2.8.1->moviepy) (3.0.4)
Requirement already satisfied: idna<2.9,>=2.5 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests<3.0,>=2.8.1->moviepy) (2.8)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages (from requests<3.0,>=2.8.1->moviepy) (1.25.6)
!python makeVideo.py --lh d.png --rh t.png --lb lback.png --rb rback.png --txt exq.txt --output exq.mp4
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/pandas/core/tools/datetimes.py:3: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import MutableMapping
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/rcsetup.py:20: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Iterable, Mapping
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/matplotlib/colors.py:53: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Sized
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/nltk/decorators.py:68: DeprecationWarning: `formatargspec` is deprecated since Python 3.5. Use `signature` and the `Signature` object directly
  regargs, varargs, varkwargs, defaults, formatvalue=lambda value: ""
/opt/conda/envs/python35-paddle120-env/lib/python3.7/site-packages/nltk/lm/counter.py:15: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated, and in 3.8 it will stop working
  from collections import Sequence, defaultdict
[32m[2021-03-06 22:03:11,151] [    INFO] - Installing deeplabv3p_xception65_humanseg module[0m
[32m[2021-03-06 22:03:11,363] [    INFO] - Module deeplabv3p_xception65_humanseg already installed in /home/aistudio/.paddlehub/modules/deeplabv3p_xception65_humanseg[0m
W0306 22:03:11.364056  1574 analysis_predictor.cc:1059] Deprecated. Please use CreatePredictor instead.
[32m[2021-03-06 22:03:15,383] [    INFO] - Installing yolov3_resnet50_vd_coco2017 module[0m
[32m[2021-03-06 22:03:15,388] [    INFO] - Module yolov3_resnet50_vd_coco2017 already installed in /home/aistudio/.paddlehub/modules/yolov3_resnet50_vd_coco2017[0m
100%|█████████████████████████████████████████| 139/139 [02:52<00:00,  1.24s/it]
[0m
!python addbgm.py --video exq.mp4 --bgm indonesia.mp3 --output bexq.mp4
Moviepy - Building video bexq.mp4.
MoviePy - Writing audio in bexqTEMP_MPY_wvf_snd.mp3
MoviePy - Done.                                                                 
Moviepy - Writing video bexq.mp4

Moviepy - Done !                                                                
Moviepy - video ready bexq.mp4

其他趣味项目:

【AI创造营】是极客就坚持一百秒?
在Aistudio,每个人都可以是影流之主[飞桨PaddleSeg]
愣着干嘛?快来使用DQN划船啊
利用PaddleSeg偷天换日~
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值