如何用python反轉(zhuǎn)圖片,視頻
pip install Pillow -i https://mirrors.aliyun.com/pypi/simplepip install moviepy -i https://mirrors.aliyun.com/pypi/simple
默認(rèn)官方鏡像源,我這里嘗試的時(shí)候沒有任何進(jìn)度。切換到國內(nèi)的源,比如阿里鏡像,清華鏡像即可。第一次使用國內(nèi)源,簡直是神速!
反轉(zhuǎn)效果反轉(zhuǎn)后
圖片
from PIL import Image, ImageOpsimg = Image.open(’img/python.jpg’)img_mirror = ImageOps.mirror(img)img_mirror.save(’img/python_mirror.jpg’)
視頻
import moviepyfrom moviepy.editor import VideoFileClip,vfxvideo = VideoFileClip(’video/video.mp4’)reversed_video = video.fx(vfx.mirror_x)reversed_video.write_videofile(’video/vide_reverse.mp4’)項(xiàng)目地址
https://github.com/coder-chin/reverseImg
以上就是如何用python反轉(zhuǎn)圖片,視頻的詳細(xì)內(nèi)容,更多關(guān)于python反轉(zhuǎn)圖片,視頻的資料請關(guān)注好吧啦網(wǎng)其它相關(guān)文章!
相關(guān)文章:
1. Python如何實(shí)現(xiàn)爬取B站視頻2. 利用python+ffmpeg合并B站視頻及格式轉(zhuǎn)換的實(shí)例代碼3. HTML5視頻播放標(biāo)簽video和音頻播放標(biāo)簽audio標(biāo)簽的正確用法4. python剪切視頻與合并視頻的實(shí)現(xiàn)5. Java獲取視頻時(shí)長、大小的示例6. python tkinter實(shí)現(xiàn)下載進(jìn)度條及抖音視頻去水印原理7. Python快速將ppt制作成配音視頻課件的操作方法8. python b站視頻下載的五種版本9. python基于tkinter制作m3u8視頻下載工具10. 淺析Django 接收所有文件,前端展示文件(包括視頻,文件,圖片)ajax請求
