collect scripts in oxtools
This commit is contained in:
commit
4f9c3da160
22 changed files with 1297 additions and 0 deletions
38
bin/oxtimeline
Executable file
38
bin/oxtimeline
Executable file
|
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
# vi:si:et:sw=4:sts=4:ts=4
|
||||
# GPL 2008
|
||||
|
||||
import os
|
||||
import sys
|
||||
from optparse import OptionParser
|
||||
|
||||
import Image
|
||||
|
||||
root = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
|
||||
if os.path.exists(os.path.join(root, 'oxgst')):
|
||||
sys.path.insert(0, root)
|
||||
|
||||
|
||||
import oxgst
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = OptionParser()
|
||||
parser.add_option('-x', '--width', dest='width', help='pixels per tile, defaults to 1500px', default=1500)
|
||||
parser.add_option('-y', '--height', dest='height', help='timeline height, defaults to 64px', default=64)
|
||||
parser.add_option('-o', '--prefix', dest='prefix', help='prefix for timeline tiles')
|
||||
parser.add_option('-i', '--input', dest='input', help='video input')
|
||||
(opts, args) = parser.parse_args()
|
||||
|
||||
if None in (opts.prefix, opts.input):
|
||||
parser.print_help()
|
||||
sys.exit()
|
||||
|
||||
timeline = oxgst.Timeline(opts.input)
|
||||
timeline.extract(opts.prefix, opts.width, opts.height)
|
||||
oxgst.timeline.createTimelineMultiline(opts.prefix)
|
||||
oxgst.timeline.makeTiles(opts.prefix, 16)
|
||||
oxgst.timeline.makeTimelineOverview(opts.prefix, 300)
|
||||
oxgst.timeline.makeTimelineOverview(opts.prefix, 600)
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue