我正在尝试将视频.ts
转换为我已导入子流程以转换视频的.mp4
subprocess.run(['ffmpeg', '-i', 'C:\Users\Gyana\Desktop\my project\blender-creating-game-animation-0-0.ts', 'C:\Users\Gyana\Desktop\my project\blender_creating_game_animation2460-0-0.mp4'])
def convert_video(video_input, video_output):
cmds = ['ffmpeg', '-i', video_input, video_output]
subprocess.Popen(cmds)
convert_video('C:\Users\Gyana\Desktop\my project\blender-creating-game-animation-0-0.ts','C:\Users\Gyana\Desktop\my project\lender.mp4')
python subpro.py文件“ subpro.py”,第7行cmds = ['ffmpeg','-i', 'C:\ Users \ Gyana \ Desktop \ my project \ blender-creating-game-animation-0-0.ts', 'C:\ Users \ Gyana \ Desktop \ my project \ blender_creating_game_animation2460-0-0.mp4'] ^ SyntaxError:(unicode错误)“ unicodeescape”编解码器无法解码位置2-3中的字节:被截断 \ UXXXXXXXX逃脱
python subpro.py文件“ subpro.py”,第11行 convert_video('C:\ Users \ Gyana \ Desktop \ my project \ blender-creating-game-animation-0-0.ts','C:\ Users \ Gyana \ Desktop \ my project \ lender.mp4') ^ SyntaxError:(unicode错误)“ unicodeescape”编解码器无法解码位置2-3中的字节:截断的\ UXXXXXXXX转义