Skip to content

Instantly share code, notes, and snippets.

@dkmeteor
Created March 19, 2019 09:49
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkmeteor/423ec96b99ea385dcac8ef76f810caac to your computer and use it in GitHub Desktop.
Save dkmeteor/423ec96b99ea385dcac8ef76f810caac to your computer and use it in GitHub Desktop.
create cover from videso 批量生成视频封面
# coding=UTF-8
import os
filePath = '/Users/dk/Desktop/videos'
list = os.listdir(filePath)
for file in list:
os.system("ffmpeg -i "+file+" -y -f mjpeg -ss 3 -t 1 "+file+".jpg")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment