Running the same code with changing output to '-' or 'pipe:1' and adding stdout=sp. Outputting to a file (using the attached code below) works perfectly, but what I would like to achieve is to get the output to a Python variable instead - meaning piping input and piping output but I can't seem to get it to work. This results in a working mp4, but I would like to avoid saving to local. I'm using ffmpeg to create a video, from a list of base64 encoded images that I pipe into ffmpeg. Im = Image.open(BytesIO(base64.b64decode(screenshot))) ![]() '-y', # (optional) overwrite output file if it exists My current code: output = os.path.join(screenshots_dir, 'video1.mp4') Outputting to a file (using the attached code below) works perfectly, but what I would like to achieve is to get the output to a Python variable instead - meaning piping input and piping output but I can't seem to get it to work ![]() ![]() I'm using ffmpeg to create a video, from a list of base64 encoded images that I pipe into ffmpeg.
0 Comments
Leave a Reply. |