如何用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. 使用開源項(xiàng)目JAVAE2 進(jìn)行視頻格式轉(zhuǎn)換2. python 爬取嗶哩嗶哩up主信息和投稿視頻3. vue-video-player視頻播放器使用配置詳解4. vue結(jié)合el-upload實(shí)現(xiàn)騰訊云視頻上傳功能5. ffmpeg+Python實(shí)現(xiàn)B站MP4格式音頻與視頻的合并示例代碼6. Vue預(yù)覽圖片和視頻的幾種實(shí)現(xiàn)方式7. Python OpenCV實(shí)現(xiàn)視頻追蹤8. Python快速將ppt制作成配音視頻課件的操作方法9. python b站視頻下載的五種版本10. Python解析m3u8拼接下載mp4視頻文件的示例代碼

網(wǎng)公網(wǎng)安備