OpenCore设置开机时的默认分辨率
opencore在开机控制台显示的分辨率和实际系统起来后设置的并不是同步的,这会导致登陆时看到的界面和登录后看到的界面有个差距,每次都要跳一下。
但好在opencore有配置可以调整这个分辨率,在UEFI设置 => 显示输出 => 控制台分辨率
中可以调整。
opencore在开机控制台显示的分辨率和实际系统起来后设置的并不是同步的,这会导致登陆时看到的界面和登录后看到的界面有个差距,每次都要跳一下。
但好在opencore有配置可以调整这个分辨率,在UEFI设置 => 显示输出 => 控制台分辨率
中可以调整。
第一步:将mp4视频文件转码为ts流
ffmpeg -i 1.mp4 -c copy -vbsf h264_mp4toannexb 1.ts
ffmpeg -i 2.mp4 -c copy -vbsf h264_mp4toannexb 2.ts
第二步:使用ffmpeg把ts流合并成mp4
ffmpeg -i "concat:1.ts|2.ts" -absf aac_adtstoas combine.mp4
import time
# 进度条打印函数
def print_progress_bar(iteration, total, prefix='', suffix='', decimals=1, length=100, fill='=', print_end="\r"):
"""
Call in a loop to create terminal progress bar
@params:
iteration - Required : current iteration (Int)
total - Required : total iterations (Int)
prefix - Optional : prefix string (Str)
suffix - Optional : suffix string (Str)
decimals - Optional : positive number of decimals in percent complete (Int)
length - Optional : character length of bar (Int)
fill - Optional : bar fill character (Str)
print_end - Optional : end character (e.g. "\r", "\r\n") (Str)
"""
percent = ("{0:." + str(decimals) + "f}").format(100 * (iteration / float(total)))
filled_length = int(length * iteration // total)
bar = fill * filled_length + ">" + '-' * (length - filled_length)
print(f'\r{prefix} |{bar}| {percent}% {suffix}', end=print_end)
# Print New Line on Complete
if iteration == total:
print()
if __name__ == '__main__':
for i in range(1, 11):
print_progress_bar(i, 10, "Progress: ", )
time.sleep(0.2)