forked from localhorst/media_management_scripts
		
	switch to av1 and limit cpu cores
This commit is contained in:
		@ -91,8 +91,20 @@ def main():
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        try:
 | 
					        try:
 | 
				
			||||||
            cmd = [
 | 
					            cmd = [
 | 
				
			||||||
 | 
					                "taskset", "-c", "0,1,2,3",   # limit to first 4 CPU cores
 | 
				
			||||||
                "ffmpeg", "-i", str(src_file),
 | 
					                "ffmpeg", "-i", str(src_file),
 | 
				
			||||||
                "-vcodec", "libx264", "-acodec", "aac",
 | 
					                "-c:v", "libaom-av1",
 | 
				
			||||||
 | 
					                "-c:a", "libopus",
 | 
				
			||||||
 | 
					                "-mapping_family", "1",
 | 
				
			||||||
 | 
					                "-af", "aformat=channel_layouts=5.1",
 | 
				
			||||||
 | 
					                "-c:s", "copy",
 | 
				
			||||||
 | 
					                "-map", "0",
 | 
				
			||||||
 | 
					                "-crf", "24",
 | 
				
			||||||
 | 
					                "-b:v", "0",
 | 
				
			||||||
 | 
					                "-b:a", "128k",
 | 
				
			||||||
 | 
					                "-cpu-used", "4",
 | 
				
			||||||
 | 
					                "-row-mt", "1",
 | 
				
			||||||
 | 
					                "-tiles", "2x2",
 | 
				
			||||||
                str(tmp_dst_file)
 | 
					                str(tmp_dst_file)
 | 
				
			||||||
            ]
 | 
					            ]
 | 
				
			||||||
            print(f"[CMD] {' '.join(cmd)}")
 | 
					            print(f"[CMD] {' '.join(cmd)}")
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user