0

I am trying to read a FM signal and piping it to sox. This is exiting unusually. Any idea what's going on?

Thanks.

$ rtl_fm -f $137M -s 60k -g 45 -p 55 -E wav -E deemp -F 9 - | sox -t wav - abc.wav rate 11025
Found 1 device(s):
  0:  Realtek, RTL2838UHIDIR, SN: 00000001

Using device 0: Generic RTL2832U OEM
Found Rafael Micro R820T tuner
Tuner gain set to 44.50 dB.
Tuner error set to 55 ppm.
Tuned to 37480000 Hz.
Oversampling input by: 32x.
Oversampling output by: 1x.
Buffer size: 4.27ms
sox FAIL formats: can't open input  `-': WAVE: RIFF header not found
Sampling at 1920000 S/s.
Output at 60000 Hz.
Signal caught, exiting!

User cancel, exiting...
SEU
  • 1,304
  • 4
  • 15
  • 36
  • I would look at "sox FAIL formats: can't open input `-': WAVE: RIFF header not found" rather than "User cancel, exiting..." – that other guy Aug 26 '21 at 23:17

1 Answers1

0

WAV header needs size of the audio content. Normally it is set after the whole content was captured. In your example you pipe the content as you capture it, so header is not set.

You should either use those separately instead of piping, or, assuming this rtl command allows it, pipe raw data. This probably will require to manually specify format (sampling frequency, bitdepth, etc) of the incoming data on the sox side.

danadam
  • 3,350
  • 20
  • 18