-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RTL_SDR Recording does not work properly #2
Comments
I've put together a script that sits in between |
Sounds like a great idea! Do you mind if I implement your code into mine? Credit given, of course. |
Feel free! No credit needed even, I'm just happy if it makes a better product that I get to use Also side note: I have only tested this on a Linux Mint system. With the subprocesses I'm sure it may be different for other OSes |
@tonyborries Would you be able to help me out? I can't seem to find a way to implement your code into mine. I see the basic concept, I just can't implement it. This is what I have so far:
And as far as I know, this works fine. I just need a way to get the audio to be able to be recorded/listened to. I also can't seem to get your code to work. Is it updated to work with Python 3? EDIT: I made changes to the code above to make it look like this:
and SoX picks the data stream up, it's just too laggy to do anything with. I think I'm splitting the subprocess output pipe too much for it to handle, and I can't use multiprocessing to give each program their own process split. |
@tonyborries So I was screwing with your code to make it work with Windows, and I got the code modified up to this point:
However, it only creates a WAV file and an MP3 file with 1KB sizes, and there's no audio data stored inside them. Got any insights? |
I am using Python 3.10 on Linux (Mint) and I think the UDP and subprocess stuff has significant differences between Windows. I've had lots of issues around the subprocesses (first time I've tied multiple together like this). I've started to notice sometimes the subprocesses aren't closing and keep running in the background. So I'm sure I'm missing something in here still. For the 1KB file sizes, I had something similar with earlier versions of the input read around this:
in an earlier version I had something that wouldn't return until it received an EOF, possibly a different read method will fix that on Windows? At least that would be my starting point to see if it is actually reading data. I didn't think about the lag going to Sox - I noticed on mine it stutters a bit when it starts, but probably because I had a 5 second buffer I dumped in it eventually plays smooth. I guess without that buffer it may never stop stuttering. |
I never thought about using a buffer… although the buffer time might be too long for my liking, but if it makes it work, then I’ll absolutely take it |
I'm leaving this issue so I can remember to fix it later on. When recording from multimon-ng using the default input device, it works fine, but when using an RTL_SDR device for tuning into NOAA Weather Radio, it STILL ONLY records the default input device. I'm not sure how to use rtl_fm to start and stop recording at a specific point, or if I need to split the streams into two, or if this can even work at all, but I will work to ensure this issue is resolved.
The text was updated successfully, but these errors were encountered: