I'm using sox in this setup: sudo timeout 20 rtl_fm -f 115.5M -s 60k -g 45 -p 55 -E wav -E deemp -F 9 - | sox -t wav - test.wav rate 11025, it worked for quite a while but since last week it stopped working and prints this error message:

sox FAIL formats: can't open input  `-': WAVE: RIFF header not found

The error message is not really useful though because I specifies the header already with -t wav...What do I need to change to get it to work?

1 Answer 1


You don't "specify the header" with -t wav, you tell sox that it should expect a file in WAV format on stdin. So sox dutifully starts to parse stdin, and expects a RIFF header as part of the WAV format, but doesn't get it.

So it's not "sox stopped working", it's rtl_fm which is for some reason not producing a valid WAV format. Checking the man page, at least for the version of rtl_fm on the man page, the file type is given by -t wav, and not by -E wav. So check the options to rtl_fm.

Did you introduce a typo last week in the command line?

  • I found the problem. It was not that rtl_fm send the wrong header but that it sent no header at all because there was no data. After a quick reboot it worked again as usual ;D. Thx for the quick help!
    – cy8berpunk
    Nov 21, 2018 at 16:22
  • 1
    The state of rtl_fm is truly wonky: The manpage I have states that the 't' flag is used for 'squelch_delay' yet in the examples shown on the same page it is used to specify output type. At this point one can't be sure what's happening without reading the source code or experimenting.
    – user515655
    Oct 19, 2020 at 2:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .