如何用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í)候沒(méi)有任何進(jìn)度。切換到國(guó)內(nèi)的源,比如阿里鏡像,清華鏡像即可。第一次使用國(guó)內(nèi)源,簡(jiǎn)直是神速!
反轉(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)圖片,視頻的資料請(qǐng)關(guān)注好吧啦網(wǎng)其它相關(guān)文章!
相關(guān)文章:
1. 利用python 下載bilibili視頻2. spring boot實(shí)現(xiàn)阿里云視頻點(diǎn)播上傳視頻功能(復(fù)制粘貼即可)3. python+opencv實(shí)現(xiàn)視頻抽幀示例代碼4. spring boot 實(shí)現(xiàn)阿里云視頻點(diǎn)播功能(刪除視頻)5. PHP采集程序開(kāi)發(fā)視頻教程6. 寫(xiě)一個(gè)Python腳本自動(dòng)爬取Bilibili小視頻7. python tkinter實(shí)現(xiàn)下載進(jìn)度條及抖音視頻去水印原理8. python基于moviepy實(shí)現(xiàn)音視頻剪輯9. Android項(xiàng)目實(shí)現(xiàn)視頻播放器10. JAVA使用ffmepg處理視頻的方法(壓縮,分片,合并)
