-
Notifications
You must be signed in to change notification settings - Fork 3
Capturing internet audio streams
DJ edited this page Feb 28, 2019
·
1 revision
I recently discovered that you can also use timestampSDR with internet audio streams, unrelated to any SDR usage. It relies on VLC media player to take the stream, transcode it, and output a UDP stream which timestampSDR takes.
- Go to this line in your local copy of timestampSDR and modify it to
if (Math.abs(message.readInt16LE()) > 50) {
- If it is a low-quality stream, where you have some base-level noise during times without transmissions, you will have to increase that minimum threshold number beyond 50. See note below
- Run timestampSDR
- Run VLC with this command, after replacing STREAM_URL_HERE:
cvlc -v STREAM_URL_HERE --sout "#transcode{vcodec=none,acodec=s16l,ab=128,channels=1,samplerate=48000,scodec=none}:std{access=udp,mux=raw,dst=127.0.0.1:7355}"
and it should work exactly the same - ignoring silence and recording timestamped wav files.
Notes:
- You will receive some errors from VLC related to stream_out: "UDP output is only valid with TS mux", "HTTP connection failure", "unimplemented query (264) in control". It seems that these can be disregarded, as it works fine.
- As mentioned above, if it is a low quality stream, you will have to modify that number. If you are finding yourself recording silence, put
console.log(message.readInt16LE())
on the line above the line you previously modified, and run the programs again. You'll see a stream of numbers. After you have observed a period of silence and a period of noise, pressctrl+c
to stop timestampSDR. Look at the numbers for the silence period and look for the maximum and minimum numbers you see. Take the largest absolute value of the two, and use that. For example:- When using these streams, 50 was an adequate minimum threshold
- When using this stream, I needed to increase the minimum threshold to 1000