Running cmd in python

后端 未结 4 1961
南方客
南方客 2020-12-28 22:12

Atm I have this as my code, the first line seems to work well but the 2nd gives errrors.

os.chdir(\'C://Users/Alex/Dropbox/code stuff/test\')
subprocess.call(         


        
4条回答
  •  不思量自难忘°
    2020-12-28 22:36

    I know this question is old, but now there is an excellent wrapper for ffmpeg in Python : ffmpeg-python. You will find it at https://github.com/kkroening/ffmpeg-python

    With it, the command could be achieved this way:

    import ffmpeg
    ffmpeg
        .input('test*.png', pattern_type='glob')
        .output('output.avi')
        .run()
    

提交回复
热议问题