add pixel audio timeline
This commit is contained in:
parent
d831314554
commit
651cf95297
2 changed files with 44 additions and 30 deletions
|
|
@ -24,7 +24,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('-m', '--mode', dest='mode', default='average', help='timeline mode: average(default), center')
|
||||
parser.add_option('-m', '--mode', dest='mode', default='average', help='timeline mode: average(default), center for video and waveform(default), pixel for audio')
|
||||
parser.add_option('-a', '--audio', action="store_true", dest="audio", default=False)
|
||||
(opts, args) = parser.parse_args()
|
||||
|
||||
|
|
@ -37,13 +37,15 @@ if __name__ == '__main__':
|
|||
opts.input = os.path.abspath(opts.input)
|
||||
|
||||
info = ox.avinfo(opts.input)
|
||||
if not info['video'] or opts.audio:
|
||||
audio.Timeline(opts.input, opts.prefix, opts.width, opts.height)
|
||||
if not info['video'] or opts.audio or opts.mode in ('waveform', 'pixel'):
|
||||
if opts.mode == 'average':
|
||||
opts.mode = 'waveform'
|
||||
audio.Timeline(opts.input, opts.prefix, opts.width, opts.height, opts.mode)
|
||||
else:
|
||||
video.Timeline(opts.input, opts.prefix, opts.width, opts.height, opts.mode)
|
||||
|
||||
#oxtimeline.createTimelineMultiline(opts.prefix)
|
||||
oxtimeline.makeTiles(opts.prefix, 16, 3600)
|
||||
oxtimeline.makeTimelineOverview(opts.prefix, 1920, height=16)
|
||||
oxtimeline.makeTimelineOverview(opts.prefix, 1920, height=64)
|
||||
|
||||
if opts.mode not in ('center', 'pixel'):
|
||||
#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