JobeeAudio

Beehive audio monitoring

hiveeyes.org project

Audio recording setup

An orange PI Pc plus or an Raspberry Pi with an extra USB sound card.

USB sound card + ADMP401 MEMS + AMS1117 voltage regulator

$ lsusub
Bus 007 Device 002: ID 1b3f:2008 Generalplus Technology Inc.

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 0: Codec [H3 Audio Codec], device 0: CDC PCM Codec-0 []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Device [USB Audio Device], device 0: USB Audio [USB Audio]
  Subdevices: 0/1
  Subdevice #0: subdevice #0
 

Audio files manipulation

Stream with ffmpeg to vlc

#!/bin/bash

HOST=192.168.1.9 # host address destination/client (VLC)

# Works piping output of arecord
#arecord -f cd -D plughw:1,0 | ffmpeg -i - -acodec libmp3lame -ab 32k -ac 1 -f rtp rtp://$HOST:1234??pkt_size=188?buffer_size=16384

# Using ffmpeg only
#ffmpeg -thread_queue_size 512 -f alsa -ac 1 -ar 44100 -i hw:1,0 -acodec libmp3lame -map 0:a  -f rtp "rtp://$HOST:1234?pkt_size=188&buffer_size=16384"

# Works but need sdp file with opus encoding
ffmpeg -thread_queue_size 512 -f alsa -ac 1 -ar 44100 -i hw:1,0 -acodec libopus -b:a 44K -map 0:a  -f rtp "rtp://$HOST:1234?pkt_size=188&buffer_size=16384"
 

File list concatenation

cf: https://trac.ffmpeg.org/wiki/Concatenate

for f in /home/jody/beehive_audio_analyse/2017-08-02*.wav; do echo "file '$f'" >> mylist.txt; done

~/ffmpeg/ffmpeg -f concat -safe 0 -i mylist.txt -c copy output.wav

Hum in audio records

changing record levels in alsamixer reduce the hum (50Hz)

Filtering with sOx

cf: https://gist.github.com/devoncrouse/5534261

⚠ (:audio 2017-08-04/2017-08-04-053556.wav preload=auto controls=1 :)

Inside the hive