TwoToneDetect TwoToneDetect on a Raspberry Pi - How To

Status
Not open for further replies.

KK6ZTE

Member
Premium Subscriber
Joined
Mar 27, 2016
Messages
926
Reaction score
465
Location
California
Yes, I get the following:

ffmpeg -version
ffmpeg version 4.1.3-1+rpt1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8 (Raspbian 8.3.0-6+rpi1)
configuration: --prefix=/usr --extra-version=1+rpt1 --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --arch=arm --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --arch=armhf --enable-shared
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100


Otherwise it's working perfectly. I had to change some tones slightly compared to my Win7 PC, but it's working great, just sending wav files. Thank you for the help and for this awesome software!
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,320
Reaction score
109
Yes, I get the following:

ffmpeg -version
ffmpeg version 4.1.3-1+rpt1 Copyright (c) 2000-2019 the FFmpeg developers
built with gcc 8 (Raspbian 8.3.0-6+rpi1)
configuration: --prefix=/usr --extra-version=1+rpt1 --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --arch=arm --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-omx-rpi --enable-mmal --enable-openal --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --arch=armhf --enable-shared
libavutil 56. 22.100 / 56. 22.100
libavcodec 58. 35.100 / 58. 35.100
libavformat 58. 20.100 / 58. 20.100
libavdevice 58. 5.100 / 58. 5.100
libavfilter 7. 40.101 / 7. 40.101
libavresample 4. 0. 0 / 4. 0. 0
libswscale 5. 3.100 / 5. 3.100
libswresample 3. 3.100 / 3. 3.100
libpostproc 55. 3.100 / 55. 3.100


Otherwise it's working perfectly. I had to change some tones slightly compared to my Win7 PC, but it's working great, just sending wav files. Thank you for the help and for this awesome software!

And if I understand correctly, you're getting a "FFMPEG NOT FOUND" statement when TwoToneDetect starts? That's odd.

Here is something you can try at the command line:
Code:
python
import subprocess
subprocess.check_call(['ffmpeg','-version'])
If that completes without error, TwoToneDetect should be finding ffmpeg.

If instead TTD on startup says "FFMPEG FOUND" but it's still not creating mp3 and amr files, it may be a compatibility issue with the version of ffmpeg you're using and we can dig deeper into that if needed.

Andy
 

KK6ZTE

Member
Premium Subscriber
Joined
Mar 27, 2016
Messages
926
Reaction score
465
Location
California
It comes up with similar results to the previous command, no error.

Code:
FFMPEG NOT FOUND
pulse selected as audio input device
pulse selected as audio output device
SLO COUNTY FIRE
Successfully retrieved local tone info at 18:45:24 on 06/28/19
Successfully retrieved local tone info at 18:45:24 on 06/28/19
Tone1

Other than no ffmpeg it works good.

Sometimes I'll get
Code:
Done recording SLC Station 21 SLO Airport 08:25:22 on 06/29/19
./audio/SLC_Station_21_SLO_Airport_2019_06_29_08_24_46.wav
done writing WAV SLC Station 21 SLO Airport 08:25:22 on 06/29/19
going to try to copy files now
Traceback (most recent call last):
  File "/home/pi/TTD/TwoToneDetect71c.py", line 1894, in alert
  File "/usr/lib/python2.7/shutil.py", line 130, in copy2

IOError: [Errno 2] No such file or directory: './audio/SLC_Station_21_SLO_Airport_2019_06_29_08_24_46.mp3'

Which I assume is due to ffmpeg not being found that there is no mp3 file generated, but then it doesn't send the email.
 
Last edited:

KK6ZTE

Member
Premium Subscriber
Joined
Mar 27, 2016
Messages
926
Reaction score
465
Location
California
It's a Pi 3B+ with Buster. Andy's logged in remotely for some testing. He thinks it's an issue due to the newer OS and ffmpeg
 

KK6ZTE

Member
Premium Subscriber
Joined
Mar 27, 2016
Messages
926
Reaction score
465
Location
California
The test 71d has been working on my machine since Tuesday night and made it through the big county-wide quickcall test yesterday with no hiccups, even on Buster.
 

medic459

Member
Joined
Feb 7, 2014
Messages
5
Reaction score
0
I don’t remember that discussion.
Sorry...I thought you showed someone how to run it without all the output to the screen. I guess the best way is to just 'hide' it by running it thusly:
screen -d -m ./TwoToneDetect71d

I was just wondering if there was a way to start the app itself without output (vs simply hiding it).
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,631
Reaction score
177
Location
Massachusetts
Okay, when running it in a screen I have used the parameter -dmS. d detaches the screen, makes it not visible like you want. m creates a new session. S allows you to name the screen.

Then you use -r to reattach the screen when you want to see it. Then cntrl a d to detach it again.
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,631
Reaction score
177
Location
Massachusetts
Since you are running 71d you might want to try running it headless (in the configuration parameters), then access the control interface through a web browser. Localhost:8080 or piipaddress:8080
 

Attachments

  • 3D8EDC7C-0A5A-469C-90FF-A8CFC181943A.png
    3D8EDC7C-0A5A-469C-90FF-A8CFC181943A.png
    192.7 KB · Views: 13

medic459

Member
Joined
Feb 7, 2014
Messages
5
Reaction score
0
Since you are running 71d you might want to try running it headless (in the configuration parameters), then access the control interface through a web browser. Localhost:8080 or piipaddress:8080
I'm running this on my Pi. I have these in the config.cfg file:
instance_id = Port 8081 ;Put text here that you want to appear in the title bar of the program start_headless = 1 ;Start in headless mode (no GUI) gui_remote_access_port = 8081 ;Port over which to access the GUI from a remote computer via HTTP (web browser)

When I try to go to 8081 I get:

Error: 404 Not Found
Sorry, the requested URL 'http://10.20.30.40:8081/' caused an error:

Not found: '/'
 

medic459

Member
Joined
Feb 7, 2014
Messages
5
Reaction score
0

Fantastic!!! Just need to put in a cron task to start it on reboot and check/restart if it dies and viola!
Thank you so much!
One last thing (for now, I hope): Is there a way to stop it from logging the 2x per second audio entries?
742.170731707 124 1574742430.36 263.524390244 124 1574742430.65 247.390243902 96 1574742430.76 715.280487805 106 1574742430.86
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,631
Reaction score
177
Location
Massachusetts
In TTD window on your web browser, adjust the squelch slider so that it only shows audio entries when there is radio traffic.

What version of Raspbian are you running on the pi? Stretch or Buster?
 

medic459

Member
Joined
Feb 7, 2014
Messages
5
Reaction score
0
In TTD window on your web browser, adjust the squelch slider so that it only shows audio entries when there is radio traffic.
What version of Raspbian are you running on the pi? Stretch or Buster?

PRETTY_NAME="Raspbian GNU/Linux 10 (buster)"
NAME="Raspbian GNU/Linux"
VERSION_ID="10"

and the squelch worked like a charm....Once again, you are my hero.
 

mach1man

Member
Joined
Jul 19, 2009
Messages
10
Reaction score
0
I tried to search the thread here for any details pertaining to my issues with a fresh install but couldn't seem to find anything. I currently am running version 67 on an old raspi model 2. I recently purchased a raspi model 4 to replace my slower, outdated model 2 which does not have internal wifi. Everything went good, until I wasn't able to select my USB soundcard for the input. In addition, I'm unable to get the program to start when the pi 4 is booted. Does anyone have an image running a more current version of TTD (71d) on a model 4 raspberry pi that they would be willing to share? I'd greatly appreciate it since I had to do a clean install. (the older image file of version 67 would not boot on the model 4 raspi)

Thanks in advance!
 
Status
Not open for further replies.
Top