#!/usr/bin/python
import os
import sys
for i in range(60):
second = i/4.0;
command = 'ffmpeg -itsoffset -%f -i "some.avi" -vcodec png -vframes 1 -an -f rawvideo second%d.png' % (second+2019, i+1)
os.system(command)
Sunday, January 04, 2009
使用ffmpeg从电影中截图
Linux下干这些非常方便。下面的python代码从2019秒开始截15幅图,间隔1/4秒.
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment