def main(args): if os.path.exists(args.source): source_url = args.source else: source_url = "https://www.youtube.com/watch?v={}".format(args.source) if os.path.exists(args.target): target_url = args.target else: target_url = "https://www.youtube.com/watch?v={}".format(args.target) print("Source: {}\nTarget: {}".format(source_url, target_url)) output_path = args.output_path if output_path is None: output_path = "./result.mp4" result = visbeat.AutoDancefer( source=source_url, target=target_url, output_path=output_path, synch_video_beat=0, synch_audio_beat=0, ) print("Result saved to {}".format(result.getPath()))
def generateSplitDancefer(material, beat_offset, nbeats): source_url = SOURCE_URL target_url = TARGET_URL output_path = './' + SPLIT_DANCEFER_ASSETS + '/SplitDancefer' + str( material) + '.mp4' result = visbeat.AutoDancefer(source=source_url, target=target_url, output_path=output_path, synch_video_beat=0, synch_audio_beat=0, beat_offset=beat_offset, nbeats=nbeats)
def generateOriginalDancefer(): source_url = SOURCE_URL target_url = TARGET_URL output_path = './OriginalDancefer.mp4' result = visbeat.AutoDancefer(source=source_url, target=target_url, output_path=output_path, synch_video_beat=0, synch_audio_beat=0) cmd = "ffmpeg -i OriginalDancefer.mp4 -ac 2 -ar 44100 -b:a 128K -f mp3 ExtractAudio.mp3" subprocess.call(cmd, shell=True) return result
def main(args): if(os.path.exists(args.source)): source_url = args.source; else: source_url = 'https://www.youtube.com/watch?v={}'.format(args.source); if(os.path.exists(args.target)): target_url = args.target; else: target_url = 'https://www.youtube.com/watch?v={}'.format(args.target); print("Source: {}\nTarget: {}".format(source_url, target_url)); output_path = args.output_path; if(output_path is None): output_path = './result.mp4'; result = visbeat.AutoDancefer(source=source_url, target = target_url, output_path = output_path, synch_video_beat = 0, synch_audio_beat = 0); print("Result saved to {}".format(result.getPath()));
import visbeat source_url = 'https://www.youtube.com/watch?v=ZfICRzbt-ZY' target_url = 'https://www.youtube.com/watch?v=VdXZaGGWe3Y' # YUM! YUM! BREAKFAST BURRITO! output_path = './MyFunnyVideo.mp4' result = visbeat.AutoDancefer(source=source_url, target=target_url, output_path=output_path, synch_video_beat=0, synch_audio_beat=0, beat_offset=0, nbeats=440)