16:02:33.289: [ffmpeg muxer: 'adv_file_output'] os_process_pipe_write for packet data failed
This is the error. I've seen it before but I have not seen a definitive resolution for all users who have experienced it.
If you use the x264 encoder instead of AMF for recording, does it also fail?