WhisperLive icon indicating copy to clipboard operation
WhisperLive copied to clipboard

Deadlock with pipe_stderr=True in FFmpeg subprocess

Open sondt2709 opened this issue 1 year ago • 1 comments

Issue Summary: When using subprocess in Python with pipe_stderr=True but not reading from it, there are potential issues related to blocking behavior.

Steps to Reproduce:

  1. Increase max_connection_time to more than 10 mins to make sure it doesn't relate to websocket.
  2. Print log above and below line in_bytes = process.stdout.read(self.chunk * 2) in client.py
  3. Prepare a HLS stream url (i.e: https://example.com/stream.m3u8)
  4. Run and wait about 10-12 minutes

Expected Behavior: The subprocess should execute normally.

Actual Behavior: Hang forever at line in_bytes = process.stdout.read(self.chunk * 2)

Suggested Fix: Remove pipe_stderr=True or read stderr

Can I create a fix PR?

sondt2709 avatar Jun 30 '24 11:06 sondt2709

@sondt2709 feel free to open a PR with the Fix. thanks!

makaveli10 avatar Jul 02 '24 11:07 makaveli10