Skip to content
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

Record plugin #327

Open
wants to merge 5 commits into
base: develop
Choose a base branch
from
Open

Record plugin #327

wants to merge 5 commits into from

Conversation

dk5ra
Copy link
Contributor

@dk5ra dk5ra commented Oct 21, 2017

Short and dirty record-plugin which records into a directory a wave file with a specified time(config file)

to use it its important to use pulseaudio

ADD THIS TO YOUR Pulseaudio config file /etc/pulse/default.pa

load-module module-null-sink sink_name=playbackstream
update-sink-proplist playbackstream device.description=playbackstream
load-module module-loopback sink=playbackstream
set-default-sink playbackstream
set-default-source playbackstream.monitor

Created a copy of the rtl_fm.stdout pipe and piped it to paplay and multimon-ng
aplay playes the sound to the default sink and parecord records from the default sink

WARNING: on the alsa-utils standard rpi deb 1.0.28 parecord does not quit byself and create many useless files. I tested 1.1.13 and 1.1.14. You can compile that quick an the rpi

To access to the records you can setup a "cloud" like seafile,owncloud,syncthing and so on and access from the mobile to it. Did not implement some sending feature for telegram,email or so. Because you need to wait until the recording is finished and then send it. Could implement but this would be a very very dirty script maybe some of you have a idea

feel free to be critical and discuss

@Schrolli91 Schrolli91 changed the base branch from master to develop October 22, 2017 07:24
@grinsekatze003
Copy link

grinsekatze003 commented Nov 27, 2017

Has this been tested? I've applied your changes and don't get any alarms afterwards. So there seems to be a problem with the splitting of the audio stream (via tee) for multimon. Can you help me? The log file doesn't show any alarms.

@grinsekatze003
Copy link

Could this be a problem with buffering of pipe/tee?

@grinsekatze003
Copy link

Any ideas @Schrolli91 @dk5ra ? I'm trying to find out where the problem is for three days now..

@flothi
Copy link
Collaborator

flothi commented Nov 30, 2017

@grinsekatze003 The problem concerning the scrambled voice is more a problem of decoding (switch -M and option fm or nfm)

@dk5ra
Copy link
Contributor Author

dk5ra commented Dec 1, 2017

@grinsekatze003 whats your os? this record plugin works only on linux. tested on raspbian and ubuntu 17.10
Did you start the boswatch daemon in debug mode? whats the output?

you need to make sure that this is set
"load-module module-null-sink sink_name=playbackstream
update-sink-proplist playbackstream device.description=playbackstream
load-module module-loopback sink=playbackstream
set-default-sink playbackstream
set-default-source playbackstream.monitor"

Its just a quick and dirty plugin. Don't know how we can record the stream without play and record from the .monitor device.

@grinsekatze003
Copy link

@dk5ra OS is raspbian. Yes I did start in daemon mode. rtl_fm and multimon gets started fine, but multimon doesn't detect any alarms. It appears to me that the pipe construct causes problems and multimon doesn't get any input from rtl_fm. Yes, I've set up the pulseaudio sink as you suggested, but I don't think that this is the problem because multimon doesn't detect any alarms before. So you say that the plugin is perfectly fine working for you and you still get the alarms with multimon?

@flothi I've answered you in the issue.

@grinsekatze003
Copy link

grinsekatze003 commented Dec 7, 2017

Okay, after further investigating, I can say that there is something wrong with this plugin. But I don't know why. Using this plugin makes the detection rate of alarms worse. This has to do something with the os.pipe construct, but I can't say why.

I've used your plugin for 12 hours now and no alarm was detected. Afterwards I removed the plugin, restarted boswatch and it detects alarms again - without touching/moving the antenna/raspberry. The strange thing is that I nevertheless have received alarms using your plugin too - so it works but it makes the whole thing flaky for me.

Do you have any ideas what I can try @dk5ra @Schrolli91 @flothi ?

@flothi
Copy link
Collaborator

flothi commented Dec 7, 2017

Until now I didn't test anything regarding this plugin due to a lack of time

But maybe I can take a closer look at it during the next few days, but a comment from the author would be the best... @dk5ra

@grinsekatze003
Copy link

@flothi That'd be great! I'm struggling a few days now. Maybe it's a deadlock / buffer situation of pipe in combination with tee. Who knows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants