moviepy icon indicating copy to clipboard operation
moviepy copied to clipboard

Bitrate parameter missing from docstrings and documentation

Open Kaszanas opened this issue 4 years ago • 3 comments

The current version of MoviePy seems not to have the docstring for bitrate parameter in .write_videofile() method. Because of that it is not clear as to the proper usage of this method.

Kaszanas avatar Oct 26 '21 12:10 Kaszanas

Hi, thanks for reporting, did the docstring use to be there and is gone in this version? The way you worded it sounds like it, but it's not entirely clear. If so, would you be willing to open a PR to put it back?

keikoro avatar Oct 27 '21 11:10 keikoro

I am not sure if previous version had this information. I have just noticed it right now as I came back to developing some features around moviepy.

It seems that the type of this parameter ought to be str. I am not sure though on how to properly document it as it falls back onto FFMPEG and its features of bitrate setting.

Kaszanas avatar Oct 27 '21 13:10 Kaszanas

I think specifying examples like "1500K" or "5M" should be enough.

It would also be useful to throw an Exception when an int (5_000_000) is being passed. I only got an obscure traceback deep down the call stack.

I have additionally discovered that setting the bitrate on the specific video I am working on messes up playback in 2 of the 4 players I tested. (Without specifying the parameter everything was fine.) Please tell me if I should open a bug report or if this is duplicated:

  • xplayer (Linux Mint) works fine
  • VLC plays the file back with a black screen (audio only)
  • Discord's built-in video player on the Android app cannot play it back at all
  • Discord's built-in video player on the Desktop app works fine

xjcl avatar Sep 01 '22 00:09 xjcl