如何用python反轉(zhuǎn)圖片,視頻
pip install Pillow -i https://mirrors.aliyun.com/pypi/simplepip install moviepy -i https://mirrors.aliyun.com/pypi/simple
默認(rèn)官方鏡像源,我這里嘗試的時候沒有任何進(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’)項目地址
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實現(xiàn)全自動下載抖音視頻2. java使用ffmpeg實現(xiàn)上傳視頻的轉(zhuǎn)碼提取視頻的截圖等功能(代碼操作)3. 利用python+ffmpeg合并B站視頻及格式轉(zhuǎn)換的實例代碼4. python將下載到本地m3u8視頻合成MP4的代碼詳解5. Android項目實現(xiàn)視頻播放器6. python gui開發(fā)——制作抖音無水印視頻下載工具(附源碼)7. python tkinter實現(xiàn)下載進(jìn)度條及抖音視頻去水印原理8. vue video和vue-video-player實現(xiàn)視頻鋪滿教程9. python爬取抖音視頻的實例分析10. python 爬取知乎回答下的微信8.0狀態(tài)視頻
