This patch will make loopback.Start() block until ffmpeg is actually feeding the loopback device.
I have a Logitech C270 connected to a Raspberry Pi 3B+ and the ffmpeg copy process sometimes takes several seconds to initialize. In cases where the hardcoded 1 second wait is too short, the subsequent ffmpeg rtp stream will fail.
The PR fixes these issues for me.
I think your implementation has a memory issue by keeping writing into the buffer forever.
I've done something similar in 333a744 but tried to keep the memory usage low.
This patch will make
loopback.Start()
block until ffmpeg is actually feeding the loopback device.I have a Logitech C270 connected to a Raspberry Pi 3B+ and the ffmpeg copy process sometimes takes several seconds to initialize. In cases where the hardcoded 1 second wait is too short, the subsequent ffmpeg rtp stream will fail. The PR fixes these issues for me.