TwoToneDetect TwoToneDetect on a Raspberry Pi - How To

Status
Not open for further replies.

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,554
Location
Massachusetts
Does anyone have any idea why I would be getting a 0 byte AMR file, but the MP3 file is of normal size? Do I need to remove and reinstall ffmpeg? If so, can I get a little direction on how? Also, would updating to v69 help with this issue?

When i put the Ubuntu Mate image together there was a similar issue with the amr files not being created. It had something to do with a missing codec for the amr's. As i recall compiling ffmpeg with the amr codec fixed the issue. It seems odd that it would have cropped up again many months later.

Here is a page that i have bookmarked that i used as a basic guide.

https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu

I will have to see if i can find any other notes about it.

Jim
 

firemedicmcse

Member
Joined
Dec 19, 2002
Messages
26
Location
Mentone, AL
Thank you. I ended up just going back to the image you had put up. Maybe it will stay working this time. Now to just figure out how to get v69 to work on it.
 

firemedicmcse

Member
Joined
Dec 19, 2002
Messages
26
Location
Mentone, AL
OK, now this is just plain weird! I reloaded the image last night. Everything worked PERFECT last night for the pager test. Tonight when they did the pager test, I got the text message for the decoded tones, but the AMR file was 0 bytes again. I didn't change anything on the RPi3 between the two tests. I wonder if there is some sort of FFMPEG update that messed stuff up?

Anyone got any ideas?
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,303
OK, now this is just plain weird! I reloaded the image last night. Everything worked PERFECT last night for the pager test. Tonight when they did the pager test, I got the text message for the decoded tones, but the AMR file was 0 bytes again. I didn't change anything on the RPi3 between the two tests. I wonder if there is some sort of FFMPEG update that messed stuff up?

Anyone got any ideas?

You can run ffmpeg -version to check the version and see if it has changed.

Andy
 

firemedicmcse

Member
Joined
Dec 19, 2002
Messages
26
Location
Mentone, AL
OK, so it appears that ffmpeg got updated automatically:

Working version:
ubuntu@pi-ubuntuMate:~$ ffmpeg -version
ffmpeg version N-80640-gf573acc Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.1 (Ubuntu/Linaro 5.3.1-14ubuntu2.1) 20160413
configuration: --prefix=/home/ubuntu/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/ubuntu/ffmpeg_build/include --extra-ldflags=-L/home/ubuntu/ffmpeg_build/lib --bindir=/home/ubuntu/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-nonfree --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3
libavutil 55. 26.100 / 55. 26.100
libavcodec 57. 46.100 / 57. 46.100
libavformat 57. 40.101 / 57. 40.101
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 46.102 / 6. 46.102
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100

Broken Version:
ubuntu@collins:~$ ffmpeg -version
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
ubuntu@collins:~$


How do I disable automatic updating so this does not happen?

Thanks!!
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,554
Location
Massachusetts
OK, so it appears that ffmpeg got updated automatically:

Working version:
ubuntu@pi-ubuntuMate:~$ ffmpeg -version
ffmpeg version N-80640-gf573acc Copyright (c) 2000-2016 the FFmpeg developers
built with gcc 5.3.1 (Ubuntu/Linaro 5.3.1-14ubuntu2.1) 20160413
configuration: --prefix=/home/ubuntu/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/ubuntu/ffmpeg_build/include --extra-ldflags=-L/home/ubuntu/ffmpeg_build/lib --bindir=/home/ubuntu/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libx265 --enable-nonfree --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-version3
libavutil 55. 26.100 / 55. 26.100
libavcodec 57. 46.100 / 57. 46.100
libavformat 57. 40.101 / 57. 40.101
libavdevice 57. 0.101 / 57. 0.101
libavfilter 6. 46.102 / 6. 46.102
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100

Broken Version:
ubuntu@collins:~$ ffmpeg -version
ffmpeg version 2.8.11-0ubuntu0.16.04.1 Copyright (c) 2000-2017 the FFmpeg developers
built with gcc 5.4.0 (Ubuntu/Linaro 5.4.0-6ubuntu1~16.04.4) 20160609
configuration: --prefix=/usr --extra-version=0ubuntu0.16.04.1 --build-suffix=-ffmpeg --toolchain=hardened --libdir=/usr/lib/arm-linux-gnueabihf --incdir=/usr/include/arm-linux-gnueabihf --cc=cc --cxx=g++ --enable-gpl --enable-shared --disable-stripping --disable-decoder=libopenjpeg --disable-decoder=libschroedinger --enable-avresample --enable-avisynth --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libmodplug --enable-libmp3lame --enable-libopenjpeg --enable-libopus --enable-libpulse --enable-librtmp --enable-libschroedinger --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxvid --enable-libzvbi --enable-openal --enable-opengl --enable-x11grab --enable-libdc1394 --enable-libiec61883 --enable-libzmq --enable-frei0r --enable-libx264 --enable-libopencv
libavutil 54. 31.100 / 54. 31.100
libavcodec 56. 60.100 / 56. 60.100
libavformat 56. 40.101 / 56. 40.101
libavdevice 56. 4.100 / 56. 4.100
libavfilter 5. 40.101 / 5. 40.101
libavresample 2. 1. 0 / 2. 1. 0
libswscale 3. 1.101 / 3. 1.101
libswresample 1. 2.101 / 1. 2.101
libpostproc 53. 3.100 / 53. 3.100
ubuntu@collins:~$


How do I disable automatic updating so this does not happen?

Thanks!!

This is the line that makes the working version work: --enable-libopencore-amrnb
It is missing in the broken version. The amr codecs apparently are not included with default ffmpeg builds.
I don't know how to prevent the update. You probably could recompile with the --enable-libopencore-amrnb included.

Jim
 

firemedicmcse

Member
Joined
Dec 19, 2002
Messages
26
Location
Mentone, AL
This is the line that makes the working version work: --enable-libopencore-amrnb
It is missing in the broken version. The amr codecs apparently are not included with default ffmpeg builds.
I don't know how to prevent the update. You probably could recompile with the --enable-libopencore-amrnb included.

Jim

I am certainly willing to try that. I tried following the directions on the link you sent the other day, but made it worse. Can you provide some guidance on how to recompile it? I am fairly inept when it comes to Linux! :lol:
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,554
Location
Massachusetts
I am certainly willing to try that. I tried following the directions on the link you sent the other day, but made it worse. Can you provide some guidance on how to recompile it? I am fairly inept when it comes to Linux! :lol:

Probably the best guidance is in kenmaples post earlier in this thread:

http://forums.radioreference.com/st...nedetect-raspberry-pi-how-31.html#post2696201

I loaded up the UbuntuMate version of TTD yesterday and have been stonewalled by the same thing as you are experiencing. Blank .amr files. The .mp3 ones seem to work fine. I tried recompiling ffmpeg but it didn't help with the .amr conversion this time. Not really sure what has changed with ffmpeg.

If you follow Ken's recompile stuff, there is one point where it looks like the pi is just not responding. Just be patient, after 4-5 minutes it carries on.

Then when you do the make install at the end it will take 45 minutes to an hour. Like I said it didn't fix mine, maybe you will have better luck.

If you go to to the top of the UbuntuMate screen under System, Administration, Software & Updates there is an updates tab. Under that tab you can disable automatic updates. Whether this controls the updating of ffmpeg, I don't really know.

Good luck, I am sorry that I can't be of more help.

Jim
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,303
Probably the best guidance is in kenmaples post earlier in this thread:

http://forums.radioreference.com/st...nedetect-raspberry-pi-how-31.html#post2696201

I loaded up the UbuntuMate version of TTD yesterday and have been stonewalled by the same thing as you are experiencing. Blank .amr files. The .mp3 ones seem to work fine. I tried recompiling ffmpeg but it didn't help with the .amr conversion this time. Not really sure what has changed with ffmpeg.

If you follow Ken's recompile stuff, there is one point where it looks like the pi is just not responding. Just be patient, after 4-5 minutes it carries on.

Then when you do the make install at the end it will take 45 minutes to an hour. Like I said it didn't fix mine, maybe you will have better luck.

If you go to to the top of the UbuntuMate screen under System, Administration, Software & Updates there is an updates tab. Under that tab you can disable automatic updates. Whether this controls the updating of ffmpeg, I don't really know.

Good luck, I am sorry that I can't be of more help.

Jim

From what I can tell, it looks like you may need to install the OpenCORE libraries prior to compiling ffmpeg with the --enable-libopencore-amrnb flag. See here:

https://ffmpeg.org/general.html#OpenCORE_002c-VisualOn_002c-and-Fraunhofer-libraries

perhaps try
Code:
sudo apt-get install libopencore-amrnb-dev
and then compile ffmpeg?

I haven't tried this so I may be way off base.

Andy
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,554
Location
Massachusetts
From what I can tell, it looks like you may need to install the OpenCORE libraries prior to compiling ffmpeg with the --enable-libopencore-amrnb flag. See here:

https://ffmpeg.org/general.html#OpenCORE_002c-VisualOn_002c-and-Fraunhofer-libraries

perhaps try
Code:
sudo apt-get install libopencore-amrnb-dev
and then compile ffmpeg?

I haven't tried this so I may be way off base.

Andy

My Libopencore-amrnb-dev etc. was up to date. You may have missed it, Andy but those were installed in kemmaples instructions.

So I tried recompiling again this morning. The sudo make install step took about 1-2 minutes, maybe even less this morning and voila! the amr attachments are again working.

So, try recompiling ffmpeg per kenmaples instructions and if it doesn't fix things, try it again.

Jim
 

firemedicmcse

Member
Joined
Dec 19, 2002
Messages
26
Location
Mentone, AL
Thanks for the updates! I will give it a try next week when I have some time, for now I have disabled updates under the update tab and it has been working fine for the past few days, at least a temporary band-aid until I can recompile.
 

slingshot202

Member
Feed Provider
Joined
Sep 10, 2008
Messages
677
Location
New Jersey
I've got the hang of this for the most part, one thing always bothers me though, how do I get the audio to come out my USB adapter?

I am ok with it going to the feeds, etc, but, I just want to be able to hear what is going through for instance, I am testing two new setups...but, no way to hear it right now, so, I am out in the dark if it is working or not.

If I plug into the standard jack the audio is just noise..I set the output for the USB, but I can never hear anything. Any ideas?
 

ffryan76

Member
Feed Provider
Joined
Nov 28, 2004
Messages
175
Location
South central, In
I'm using DC31 Ubuntu mate image on a RPI 3 and having a lot of TTD v67 crashes. I suspect it is Ubuntu mate updates.
I do rely on the GUI because I don't quite grasp the code yet. I'm working on that when time alows.
I assume re imaging would help?
 

DC31

Member
Feed Provider
Joined
Feb 19, 2011
Messages
1,554
Location
Massachusetts
I'm using DC31 Ubuntu mate image on a RPI 3 and having a lot of TTD v67 crashes. I suspect it is Ubuntu mate updates.
I do rely on the GUI because I don't quite grasp the code yet. I'm working on that when time alows.
I assume re imaging would help?

Not quite sure why you are experiencing ttd crashes. I don't run the ubuntu version day to day so i dont have a lot of experience with it. You can turn off updates in the preferences section if you drill down some.
 

truckie27

Member
Joined
Dec 1, 2010
Messages
49
Location
Metropolis, IL
Guidance

Greetings all..I just got my RPI 3 model b+ up and running with raspbian/Debian. I'm so new to this.. Can I run TTD on this os or do I have to have something else?
 

aaknitt

Member
Feed Provider
Joined
Aug 27, 2005
Messages
1,303
Greetings all..I just got my RPI 3 model b+ up and running with raspbian/Debian. I'm so new to this.. Can I run TTD on this os or do I have to have something else?

It will run on Raspbian. The instructions on this page will get you pointed in the right direction, but they haven't been updated to be compatible with some of the latest OS releases, so you may run into some error messages along the way. Usually the error message will clue you in as to what the issue is and you can work around it.

Andy
 

truckie27

Member
Joined
Dec 1, 2010
Messages
49
Location
Metropolis, IL
I don't really know Jack about this Linux business... Is there a command to have my pi reboot at a certain time and then auto start TTD on reboot along with pulse audio volume control? I'm using an RPI 3 model b with Ubuntu mate.
 

krokus

Member
Premium Subscriber
Joined
Jun 9, 2006
Messages
6,086
Location
Southeastern Michigan
I don't really know Jack about this Linux business... Is there a command to have my pi reboot at a certain time and then auto start TTD on reboot along with pulse audio volume control? I'm using an RPI 3 model b with Ubuntu mate.

That would be making use of cron, and scriting. Similar to the autoexec.bat, from the MS-DOS aspect of things.

Sent via Tapatalk
 

davidVT

Member
Feed Provider
Joined
Aug 29, 2010
Messages
138
Location
Washington County,Vermont
Can someone verify it is a clean upgrade from v68 to v69 on raspian pi3? I am pressed for time and just want to drop 69 over 68 if that will work. I use redundant and remote tones features.
My redundant deployment keeps having issues with the status file on the FTP server and then generating hours of false warning emails until I manually wipe the FTP file and restart the TTD units. There is hope that v69 resolves this.


Sent from my iPad using Tapatalk
 

truckie27

Member
Joined
Dec 1, 2010
Messages
49
Location
Metropolis, IL
My TTD quit loading automatically upon boot with the image file that I downloaded... How can I restore this back.. Do I need to reimage?

Sent from my Nexus 6P using Tapatalk
 
Status
Not open for further replies.
Top