logging framework can lead to deadlocks
Currently PyAV wires up FFmpeg's logging so that messages are sent to Python's traditional loggers instead of going straight to stderr.
One such example is simply trying to open a CodecContext for the h264_omx (hardware accelerated H264) codec on a RaspberryPi.
codec = av.CodecContext.create("h264_omx", "w")
codec.width = 640
codec.height = 480
codec.pix_fmt = "yuv420p"
codec.framerate = fractions.Fraction(30, 1)
codec.time_base = fractions.Fraction(1, 30)
codec.open()
This code will hang forever on the codec.open() call. Setting the environment variable PYAV_LOGGING=off completely solves the issue.
@mikeboers I am starting to wonder whether the logging support should be opt-in instead of opt-out, any thoughts on this?