mirror of
				https://github.com/k4yt3x/video2x.git
				synced 2025-11-04 14:41:35 +01:00 
			
		
		
		
	v2.0.3: fixing pathname space issues
This commit is contained in:
		
							parent
							
								
									37a6507993
								
							
						
					
					
						commit
						456b6c7e74
					
				@ -9,7 +9,7 @@ Last Modified: May 19, 2018
 | 
				
			|||||||
Description: This class handles all FFMPEG related
 | 
					Description: This class handles all FFMPEG related
 | 
				
			||||||
operations.
 | 
					operations.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Version 2.0.2
 | 
					Version 2.0.3
 | 
				
			||||||
"""
 | 
					"""
 | 
				
			||||||
import subprocess
 | 
					import subprocess
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -36,7 +36,7 @@ class FFMPEG:
 | 
				
			|||||||
            videoin {string} -- input video path
 | 
					            videoin {string} -- input video path
 | 
				
			||||||
            outpath {string} -- video output folder
 | 
					            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)
 | 
					        print(execute)
 | 
				
			||||||
        subprocess.call(execute)
 | 
					        subprocess.call(execute)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -50,7 +50,7 @@ class FFMPEG:
 | 
				
			|||||||
            videoin {string} -- input video path
 | 
					            videoin {string} -- input video path
 | 
				
			||||||
            outpath {string} -- video output folder
 | 
					            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)
 | 
					        print(execute)
 | 
				
			||||||
        subprocess.call(execute)
 | 
					        subprocess.call(execute)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -38,7 +38,7 @@ import shutil
 | 
				
			|||||||
import subprocess
 | 
					import subprocess
 | 
				
			||||||
import traceback
 | 
					import traceback
 | 
				
			||||||
 | 
					
 | 
				
			||||||
VERSION = '2.0.2'
 | 
					VERSION = '2.0.3'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
EXEC_PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
 | 
					EXEC_PATH = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
 | 
				
			||||||
FRAMES = '{}\\frames'.format(EXEC_PATH)  # Folder containing extracted frames
 | 
					FRAMES = '{}\\frames'.format(EXEC_PATH)  # Folder containing extracted frames
 | 
				
			||||||
@ -95,7 +95,7 @@ def get_vid_info():
 | 
				
			|||||||
        dictionary -- original video information
 | 
					        dictionary -- original video information
 | 
				
			||||||
    """
 | 
					    """
 | 
				
			||||||
    json_str = subprocess.check_output(
 | 
					    json_str = subprocess.check_output(
 | 
				
			||||||
        '{} -v quiet -print_format json -show_format -show_streams {}'.format('\"' + FFMPEG_PATH + 'ffprobe.exe\"', args.video))
 | 
					        '{} -v quiet -print_format json -show_format -show_streams \"{}\"'.format('\"' + FFMPEG_PATH + 'ffprobe.exe\"', args.video))
 | 
				
			||||||
    return json.loads(json_str.decode('utf-8'))
 | 
					    return json.loads(json_str.decode('utf-8'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user