That's strange. If you followed those ffmpeg build instructions you should be good. You can verify whether ffmpeg is set up for AMR by simply typing "ffmpeg" at the command line and checking to make sure this is in the printed output: --enable-libopencore-amrnbAnyone know why I'm getting this issue? Running TwoToneDetect71d on a Raspberry Pi 4.
I compiled FFMPEG myself using instructions here, which include AMR support: https://gist.github.com/jjangsangy/058456fe2d04e3c5f6107d62b60542e3 (done as I am also running trunk-recorder on the same Raspberry Pi)
Code:Guessed Channel Layout for Input Stream #0.0 : mono Input #0, wav, from './audio/Station_8_2020_05_04_09_44_20.wav': Duration: 00:00:50.99, bitrate: 176 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 11025 Hz, mono, s16, 176 kb/s Automatic encoder selection failed for output stream #0:0. Default encoder for format amr (codec amr_nb) is probably disabled. Please choose an encoder manually. Error selecting an encoder for stream 0:0 done converting to AMR Vernon Township Fire - Station 8 09:45:17 on 05/04/20 going to try to copy files now Traceback (most recent call last): File "/home/pi/TTD/TwoToneDetect71d.py", line 1897, in alert File "/usr/lib/python2.7/shutil.py", line 153, in copy2 copyfile(src, dst) IOError: [Errno 2] No such file or directory: './audio/Station_8_2020_05_04_09_44_20.amr' Successfully retrieved local tone info at 10:25:54 on 05/04/20
Two things to note:
1) None of my tone configurations are using AMR, so why is TTD trying to convert to AMR?
2) TTD successfully recorded/converted to MP3 and WAV. However, the MP3 is not sent via email. So, when converting to AMR fails, the entire send/process seems to fail. Is this intended behavior?
To answer your specific questions:
1) It converts to AMR and MP3 every time regardless or recipient list. Should it? Eh...maybe not...but it does.
2) It's expected, though not necessarily intended. This is an area that will be cleaned up in a future release. It's not been an issue in the past because the default FFMPEG builds have always included both mp3 and AMR. Now that AMR appears to have been removed by default this is cropping up.
Andy