add audio timeline, cleanup video timeline
This commit is contained in:
parent
399e7d328b
commit
35882f2234
7 changed files with 406 additions and 808 deletions
|
|
@ -13,8 +13,9 @@ root = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..')
|
|||
if os.path.exists(os.path.join(root, 'oxtimeline')):
|
||||
sys.path.insert(0, root)
|
||||
|
||||
|
||||
import ox
|
||||
import oxtimeline
|
||||
from oxtimeline import audio, video
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = OptionParser()
|
||||
|
|
@ -22,6 +23,7 @@ if __name__ == '__main__':
|
|||
parser.add_option('-y', '--height', dest='height', help='timeline height, defaults to 64px', default=64, type="int")
|
||||
parser.add_option('-o', '--prefix', dest='prefix', help='prefix for timeline tiles')
|
||||
parser.add_option('-i', '--input', dest='input', help='video input')
|
||||
parser.add_option('-a', '--audio', action="store_true", dest="audio", default=False)
|
||||
(opts, args) = parser.parse_args()
|
||||
|
||||
if None in (opts.prefix, opts.input):
|
||||
|
|
@ -29,11 +31,13 @@ if __name__ == '__main__':
|
|||
sys.exit()
|
||||
opts.input = os.path.abspath(opts.input)
|
||||
|
||||
timeline = oxgst.Timeline(opts.input)
|
||||
timeline.extract(opts.prefix, opts.width, opts.height)
|
||||
info = ox.avinfo(opts.input)
|
||||
if not info['video'] or opts.audio:
|
||||
audio.Timeline(opts.input, opts.prefix, opts.width, opts.height)
|
||||
else:
|
||||
video.Timeline(opts.input, opts.prefix, opts.width, opts.height)
|
||||
oxtimeline.createTimelineMultiline(opts.prefix)
|
||||
oxtimeline.makeTiles(opts.prefix, 16, 3600)
|
||||
oxtimeline.makeTimelineOverview(opts.prefix, 1920, height=16)
|
||||
oxtimeline.makeTimelineOverview(opts.prefix, 1920, height=64)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue