Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I wrote a simple-sounding script to record pulseaudio null sink on one device and send it to another. Tried a bunch of different ways:

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.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: