如何用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 b站視頻下載的五種版本2. HTML5視頻播放標(biāo)簽video和音頻播放標(biāo)簽audio標(biāo)簽的正確用法3. Java獲取視頻時(shí)長(zhǎng)、大小的示例4. python 爬取B站原視頻的實(shí)例代碼5. 利用python+ffmpeg合并B站視頻及格式轉(zhuǎn)換的實(shí)例代碼6. python 爬取騰訊視頻評(píng)論的實(shí)現(xiàn)步驟7. python 視頻下載神器(you-get)的具體使用8. Python生成字符視頻的實(shí)現(xiàn)示例9. python剪切視頻與合并視頻的實(shí)現(xiàn)10. python gstreamer實(shí)現(xiàn)視頻快進(jìn)/快退/循環(huán)播放功能
