Skip to content

Matplotlib Animation.save() hangs from stalled pipe #2568

@snaphat

Description

@snaphat

This is to report that an early fix for a bug doesn't actually work:
b836275

FFmpeg pushes status information about frames/fps/time/bitrate/etc to stderr regardless of the log level so the buffer is going to eventually fill and stall the pipe when enough information is pushed.

There are three possible solutions I see:

  1. Redirecting stderr to a file and read that if an exception is raised.

  2. Disabling blocking on the non-redirected file descriptor and reading/buffering the stderr into memory manually similar to the following:
    http://chase-seibert.github.io/blog/2012/11/16/python-subprocess-asynchronous-read-stdout.html

  3. Don't redirect stderr for printing on error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions