diff --git a/ffmpeg.py b/ffmpeg.py index efd8390..88bd047 100755 --- a/ffmpeg.py +++ b/ffmpeg.py @@ -9,7 +9,7 @@ Last Modified: October 22, 2018 Description: This class handles all FFMPEG related operations. -Version 2.0.3 +Version 2.0.4 """ import subprocess @@ -36,7 +36,7 @@ class Ffmpeg: videoin {string} -- input video path outpath {string} -- video output folder """ - execute = "{} -i \"{}\" {}\\extracted_%0d.png -y".format(self.ffmpeg_path, videoin, outpath) + execute = "\"{}\" -i \"{}\" {}\\extracted_%0d.png -y".format(self.ffmpeg_path, videoin, outpath) print(execute) subprocess.call(execute) @@ -50,7 +50,7 @@ class Ffmpeg: videoin {string} -- input video path outpath {string} -- video output folder """ - execute = "{} -i \"{}\" -vn -acodec copy {}\\output-audio.aac -y".format(self.ffmpeg_path, videoin, outpath) + execute = "\"{}\" -i \"{}\" -vn -acodec copy {}\\output-audio.aac -y".format(self.ffmpeg_path, videoin, outpath) print(execute) subprocess.call(execute) @@ -65,7 +65,7 @@ class Ffmpeg: resolution {string} -- target video resolution upscaled {string} -- source images folder """ - execute = "{} -r {} -f image2 -s {} -i {}\\extracted_%d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p {}\\no_audio.mp4 -y".format( + execute = "\"{}\" -r {} -f image2 -s {} -i {}\\extracted_%d.png -vcodec libx264 -crf 25 -pix_fmt yuv420p {}\\no_audio.mp4 -y".format( self.ffmpeg_path, framerate, resolution, upscaled, upscaled) print(execute) subprocess.call(execute) @@ -79,6 +79,6 @@ class Ffmpeg: Arguments: upscaled {string} -- upscaled image folder """ - execute = "{} -i {}\\no_audio.mp4 -i {}\\output-audio.aac -shortest -codec copy {} -y".format(self.ffmpeg_path, upscaled, upscaled, self.outfile) + execute = "\"{}\" -i {}\\no_audio.mp4 -i {}\\output-audio.aac -shortest -codec copy {} -y".format(self.ffmpeg_path, upscaled, upscaled, self.outfile) print(execute) subprocess.call(execute) diff --git a/waifu2x.py b/waifu2x.py index 805cf77..4e6032d 100755 --- a/waifu2x.py +++ b/waifu2x.py @@ -9,7 +9,7 @@ Last Modified: October 22, 2018 Description: This class controls waifu2x engine -Version 2.0.3 +Version 2.0.4 """ from avalon_framework import Avalon import subprocess @@ -47,7 +47,7 @@ class Waifu2x: self.print_lock.release() # Create string for execution - execute = '{} -p {} -I png -i {} -e png -o {} -w {} -h {} -n 3 -m noise_scale -y {}'.format( + execute = '\"{}\" -p {} -I png -i \"{}\" -e png -o {} -w {} -h {} -n 3 -m noise_scale -y {}'.format( self.waifu2x_path, self.method, folderin, folderout, width, height, self.model_type) subprocess.call(execute)