Closed stephanschulz closed 8 years ago
Hmm, the broken pipe may be happening if the ffmpeg instance has not started in time before the video or audio pipes start writing to it.
I think there needs to be an initialized flag that is set on the ffmpeg thread somehow after the command is started, then only when the ffmpeg thread is really up and running should the recorder allow you to add frames.
As a work-around, you may be able to add a small delay between calling setup and adding frames to ensure that this doesn't happen.
@stephanschulz can you test out the branch bugfix-42? I added in a sleep to wait until the ffmpeg thread is running before starting the audio or video threads.
I could not replicate the issue so if you could test it out that would be great.
great thanks. just installed the new addon. since this error does not happened all the time i will report back later, if or when it happens.
FWIW I noticed that I get this error when I put a bad video codec in setVideoCodec. For instance 'mpeg' doesn't work, while 'mpeg4' does.
i have been using your addon for a while now. and it works very well. i have 4 separate OF apps running at the same time, all using the recorder.
things work well but once in a while i get
would you know why?
here is what the print out usually looks like when the recording works correctly: https://gist.github.com/stephanschulz/471cdec81855ea5f122278b9e03b23df
and here when xcode crashes: https://gist.github.com/stephanschulz/b26a04dd892de55f6f8c124d0b6dd30e
here is the bash script that your addon generates: