Deadlock with pipe_stderr=True in FFmpeg subprocess
sondt2709 opened this issue · 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:
- Increase
max_connection_time
to more than 10 mins to make sure it doesn't relate to websocket. - Print log above and below line
in_bytes = process.stdout.read(self.chunk * 2)
in client.py - Prepare a HLS stream url (i.e: https://example.com/stream.m3u8)
- 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 feel free to open a PR with the Fix. thanks!