Moviepy: TypeError using `progress_bar` arg in VideoFileClip.write_videofile()

Created on 16 Feb 2019  路  5Comments  路  Source: Zulko/moviepy

Expected Behavior

from moviepy.editor import VideoFileClip

VideoFileClip('video.mp4').write_videofile(
        output_video_path,
        verbose=True,
        progress_bar=True,
        ffmpeg_params=ffmpeg_params)

This worked fine using version 0.2.5.3
After the recent 1.0.0 upgrade, the same code now throws an error. I don't see a reference to the progress_bar in the current source code except for in comments.
Reverting to 0.2.5.3 seems to fix the issue.

Actual Behavior

TypeError("write_videofile() got an unexpected keyword argument 'progress_bar'",)

Steps to Reproduce the Problem

from moviepy.editor import VideoFileClip

VideoFileClip('video.mp4').write_videofile(
        output_video_path,
        verbose=True,
        progress_bar=True,
        ffmpeg_params=ffmpeg_params)

Specifications

  • Python Version: 3.6
  • Moviepy Version: 1.0.0
  • Platform Name: Ubuntu
  • Platform Version: 16.04
documentation-needed

Most helpful comment

Try "logger=None"

All 5 comments

The progress bar management is the main non-backward-compatible change introduced in 1.0.0. The "progress_bar" argument was replaced by a "logger" argument (which can be either "bar" or None or any Proglog logger).

I put a note about it at the end of the README, but I haven't updated the docs yet.

In your case, just removing the line progress_bar=True should work.

Thanks! I saw that progress bar is now enabled by default in the "logger" argument, so I commented out the "progress_bar" argument and it works now as you said.

https://github.com/Zulko/moviepy#new-in-100-progress-bars-and-messages-with-proglog

How to disable progress bar?

Try "logger=None"

~I get:~

~write_videofile() got an unexpected keyword argument 'logger'~

~This method also had progress_bar keyword argument but 1.0.0 has not add its replacement, logger. Please check the API changes on all methods that had progress_bar!~

Sorry, it was my mistake.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tburrows13 picture tburrows13  路  3Comments

bilel picture bilel  路  4Comments

keikoro picture keikoro  路  4Comments

Swiffers picture Swiffers  路  4Comments

Netherdrake picture Netherdrake  路  4Comments