Piping input AND output of ffmpeg in python

后端 未结 2 730
星月不相逢
星月不相逢 2021-02-04 19:58

I\'m using ffmpeg to create a video, from a list of base64 encoded images that I pipe into ffmpeg.

Outputting to a file (using the attached cod

相关标签:
2条回答
  • 2021-02-04 20:11

    FFmpeg guesses the output muxer by checking the output extension. With a pipe, that doesn't exist, so it has to be expressly set. Add '-f', 'image2pipe' just before output.

    0 讨论(0)
  • 2021-02-04 20:18

    Try to add the following command after your sp.Popen :

    output, _ = pipe.communicate()
    

    I think you need to communicate it with the opened process. After that you can print it to make sure it worked :

    print(_)
    
    0 讨论(0)
提交回复
热议问题