diff --git a/coub-dl.py b/coub-dl.py index 0298d03..426aca7 100644 --- a/coub-dl.py +++ b/coub-dl.py @@ -1,4 +1,4 @@ -from subprocess import call, Popen, PIPE +from subprocess import call, Popen, PIPE, check_output from os import listdir, remove from os.path import splitext from re import match @@ -67,6 +67,8 @@ with open(FILES[File.LIST], 'w') as f: print("file '{}'".format(shorterFile), file=f) +FILES[File.OUTPUT] = check_output(('/usr/bin/env', 'youtube-dl', '--get-title', argv[1])).decode('utf-8').strip() + '.mp4' + call(('/usr/bin/env', 'ffmpeg', '-f', 'concat', '-i', FILES[File.LIST], '-c', 'copy', FILES[File.LOOP])) call(('/usr/bin/env', 'ffmpeg', '-i', FILES[File.LOOP], '-i', FILES[Stream.AUDIO],