1

When I run Moviepy it prints a progress bar in my Sublime Text console. I've tried redirecting it to a text file via stdout and stderr to no avail. Any idea how I could copy this information to a text file (which I then plan to display in a tkinter widget)? Thank you!

MoviePy Progress Bar

  • Did you do it like this http://stackoverflow.com/questions/4675728/redirect-stdout-to-a-file-in-python? – Falk Schuetzenmeister Nov 01 '16 at 17:16
  • Yes. I used `sys.stdout = open('file', 'w')`(and did the same for stderr). Some information is printed, but not the information that I need, i.e. the progress bar in the Sublime Text console per the attached screenshot, and I have no idea why that data is being excluded. – Alexander Perlman Nov 02 '16 at 14:03
  • Here is another suspicion - only a guess - I think the progress bar is actual a feature of ffmpeg which might have its own output settings. – Falk Schuetzenmeister Nov 02 '16 at 16:47
  • See http://stackoverflow.com/questions/24277488/in-python-how-to-capture-the-stdout-from-a-c-shared-library-to-a-variable. – Falk Schuetzenmeister Nov 02 '16 at 16:49
  • The progress bar is the feature of the module [tqdm](https://pypi.python.org/pypi/tqdm). It is supposed to be just printed on one line, that updates, but it looks like your console doesn't support rewriting the same line, so it does it on different lines. I guess you would have to find where in moviepy it uses this, and send the info to your tkitner widget instead. Try looking in write_videofile for starters. Let us know if you solved it! – Tom Burrows Jan 11 '17 at 11:54

0 Answers0