fix tractor
This commit is contained in:
parent
fc1c7ec67f
commit
ed4b2fde61
1 changed files with 8 additions and 12 deletions
|
@ -15,7 +15,11 @@ app = QtWidgets.QApplication(sys.argv)
|
||||||
#mlt.mlt_log_set_level(40) # verbose
|
#mlt.mlt_log_set_level(40) # verbose
|
||||||
mlt.Factory.init()
|
mlt.Factory.init()
|
||||||
|
|
||||||
tractor = mlt.Tractor()
|
fps = 60
|
||||||
|
profile = mlt.Profile("atsc_1080p_%d" % fps)
|
||||||
|
#profile.set_explicit(1)
|
||||||
|
|
||||||
|
tractor = mlt.Tractor(profile)
|
||||||
tractor.mark_in = -1
|
tractor.mark_in = -1
|
||||||
tractor.mark_out = -1
|
tractor.mark_out = -1
|
||||||
|
|
||||||
|
@ -41,14 +45,6 @@ vocals = mlt.Playlist()
|
||||||
drones0 = mlt.Playlist()
|
drones0 = mlt.Playlist()
|
||||||
drones1 = mlt.Playlist()
|
drones1 = mlt.Playlist()
|
||||||
|
|
||||||
fps = 60
|
|
||||||
profile = mlt.Profile("atsc_1080p_%d" % fps)
|
|
||||||
#profile.set_explicit(1)
|
|
||||||
|
|
||||||
# get profile from clip
|
|
||||||
#clip = mlt.Producer(profile, 'test.mp4')
|
|
||||||
#profile.from_producer(clip)
|
|
||||||
|
|
||||||
def add_color(playlist, color, duration):
|
def add_color(playlist, color, duration):
|
||||||
red = mlt.Producer(profile, 'color:' + color)
|
red = mlt.Producer(profile, 'color:' + color)
|
||||||
red.set_in_and_out(0, duration)
|
red.set_in_and_out(0, duration)
|
||||||
|
@ -59,7 +55,7 @@ def add_clip(playlist, file_, in_, duration):
|
||||||
file_ = file_.encode('utf-8')
|
file_ = file_.encode('utf-8')
|
||||||
'''
|
'''
|
||||||
info = ox.avinfo(file_)
|
info = ox.avinfo(file_)
|
||||||
tractor = mlt.Tractor()
|
tractor = mlt.Tractor(profile)
|
||||||
tracks = tractor.multitrack()
|
tracks = tractor.multitrack()
|
||||||
video = mlt.Playlist()
|
video = mlt.Playlist()
|
||||||
'''
|
'''
|
||||||
|
@ -169,7 +165,7 @@ volume.set("gain", '0.12')
|
||||||
tractor.plant_filter(volume)
|
tractor.plant_filter(volume)
|
||||||
|
|
||||||
def mix_audio_tracks(a, b, ratio):
|
def mix_audio_tracks(a, b, ratio):
|
||||||
tractor = mlt.Tractor()
|
tractor = mlt.Tractor(profile)
|
||||||
tractor.mark_in = -1
|
tractor.mark_in = -1
|
||||||
tractor.mark_out = -1
|
tractor.mark_out = -1
|
||||||
|
|
||||||
|
@ -224,7 +220,7 @@ add_audio_clip(audiomix, target_audio_wav, int(duration * fps))
|
||||||
dtractor = mix_audio_tracks(audiomix, tractor, 0.29)
|
dtractor = mix_audio_tracks(audiomix, tractor, 0.29)
|
||||||
|
|
||||||
|
|
||||||
output = mlt.Tractor()
|
output = mlt.Tractor(profile)
|
||||||
tractor.mark_in = -1
|
tractor.mark_in = -1
|
||||||
tractor.mark_out = -1
|
tractor.mark_out = -1
|
||||||
output_tracks = output.multitrack()
|
output_tracks = output.multitrack()
|
||||||
|
|
Loading…
Reference in a new issue