如何用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. Biblibili視頻投稿接口分析并以Python實現(xiàn)自動投稿功能2. python gui開發(fā)——制作抖音無水印視頻下載工具(附源碼)3. Android原生視頻播放VideoView的使用4. Python快速將ppt制作成配音視頻課件的操作方法5. python b站視頻下載的五種版本6. python 爬取知乎回答下的微信8.0狀態(tài)視頻7. JavaScript css3實現(xiàn)簡單視頻彈幕功能8. python 爬取嗶哩嗶哩up主信息和投稿視頻9. python 下載m3u8視頻的示例代碼10. JavaScript實現(xiàn)讀取上傳視頻文件的時長和第一幀畫面過程講解
