Skip to content

Conversation

@m-krastev
Copy link

This pull request improves the flexibility of how FFmpeg log output is handled in the better_ffmpeg_progress.py module. The main change allows the log destination to be either a file path or a file-like object, such as sys.stdout, making it easier to redirect FFmpeg logs for different use cases.

FFmpeg log output handling improvements:

  • Updated the initialization of self._ffmpeg_log_file in __init__ to support both os.PathLike objects and direct file-like objects, enabling the use of custom log destinations.
  • Modified the run method to check the type of self._ffmpeg_log_file and handle writing to either a file path or a file descriptor (e.g., sys.stdout). This ensures compatibility with various logging scenarios. [1] [2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant