|
From: Robin Ivetic-h. <cre...@gm...> - 2015-12-26 22:58:17
|
Hello, Thanks that WORKS really nice, need to change sampling rate to be the same for rtl_fm and sox, but this is not problem regarding sox. Can you help me ones more. Some rtl-sdr programs like to import wav files for "decoding", can you help me with sox "side" if I want to save in wav file, considering that is uncompressed format. Presume that file would be large, but don't have problem with mono sound, or how else can reduce output file.... > Robin Ivetic-hotmail <cre...@gm...> wrote: >> this, but mp3 file after few minutes become extreme large and can't be >> played at all, > <snip> >> rtl_fm -M wbfm -f 88.1M -d 0 -s 22050k -l 310 | sox -traw -r8k -es >> -b16 -c1 -V1 - -tmp3 - | sox -n some_file.mp3 > I'm not familiar with rtl_fm at all, but It looks like your problem is > the final command in the pipeline: > sox -n some_file.mp3 > That means: read from /dev/null and output to some_file.mp3 > Since sox will read from /dev/null forever, it'll keep writing > and you end up with a giant, silent MP3. > So I think the last part if your pipeline should be: > sox -tmp3 - some_file.mp3 > Hint: the output format of the preceding command should match the > input, so in both places, you use "-tmp3", and you use "-" to tell > sox to write/read from a pipe. >> rtl_fm -f 88.1M -M fm -s 170k -d 0 -A fast -r 24k -l 0 -E deemp | >> sox -traw -r24k -es -b16 -c1 -V1 - -tmp3 - | socat -u - TCP-LISTEN:8080 >> >> and on listener side >> >> netcat IP adress from host 8080 | play -t mp3 - | sox -n some_name.mp3 > Similar problem. I don't think you need the "| sox -n some_name.mp3" > at all, "play -t mp3 -" will play the MP3 from stdin. > If you want to save the mp3 while playing it, probably try this: > netcat $IP $PORT | tee some_name.mp3 | play -t mp3 - > "tee" will write everything as-is from the remote side and emit > the identical output to stdout so the "play" command can also see > it. > ------------------------------------------------------------------------------ > _______________________________________________ > Sox-users mailing list > Sox...@li... > https://lists.sourceforge.net/lists/listinfo/sox-users -- Best regards, Robin mailto:otp...@ho... |