After almost 20 years of Linux I couldn't type a correct FFmpeg command with a gun to my head.
After almost 20 years of Linux I couldn't type a correct FFmpeg command with a gun to my head.
parec | opusenc | nc
parec | ffmpeg | nc
Then discovered that ffmpeg can record directly from pulseaudio and serve it over rtsp. But after a few days of experimenting I realised I could still fuck up the command and be left scratching my head not understanding why it didn't work. Positional arguments in multiple places that affect different things depending on what precedes them. Trying to figure out which part of the command line affects input, cloned streams, output(s) etc. Ffmpeg is a great tool, but seriously hard to use. I ended up not only dropping it for recording and sending over the network, I threw it out completely and ended up with:
parec | flac | mbuffer
... Which provides the best quality, consistency and latency. But the best part is that the actual command line isn't much more complex than the pseudo code above.
You don't know how to use a massively flexible tool that's fine, use something that wraps it, or employ someone who does know how to use it.
I personally just make scripts with the required transcoding parameters, and I just look at the documentation again when I need to create a new one.
It uses ffmpeg under the hood.