I'm guessing that the ffmpeg commandis taking up all the CPU timne, which is stopped the BT from responding in a sane time. What does 'top' say?
Also, why are you running it under sudo? I don't think that is necessary.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Please direct all questions to the forum, I do not do support via PM.