コード例 #1
0
ファイル: dancefer.py プロジェクト: azahreba/visbeat
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()))
コード例 #2
0
ファイル: pro2dance_v1.py プロジェクト: tomoohive/pro2dance
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)
コード例 #3
0
ファイル: pro2dance_v1.py プロジェクト: tomoohive/pro2dance
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
コード例 #4
0
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()));
コード例 #5
0
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)