RadioReference on Facebook   RadioReference on Twitter   RadioReference Blog
 

Go Back   The RadioReference.com Forums > Computer Aided Monitoring and Programming > Software Defined Radio


Software Defined Radio - A forum for general discussion of software defined radio (SDR) receiver equipment.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-22-2016, 12:02 AM
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Jul 2009
Location: Macedonia, Ohio
Posts: 146
Thumbs up Trunk Recorder + Trunk Player (op25 + recording + web interface)

I was surprised to find out these two open source applications were not already being discussed here so I'm going to out them for those of you looking for something like this.

A few months ago friends of mine were playing with DSD+ and the windows based Trunking Recorder using nooelec neSDRs and we were struggling to get it to decode cleanly, remain stable, etc. I've found that this method using op25 seems to produce far more consistent and nicer quality decode.

One of those friends of mine stumbled upon trunk-recorder written by Luke Berndt which uses op25 and gnuradio, but has matured. What was missing was a Trunking Recorder like web interface - but then we somehow found this trunk-player (written by Dylan Reinhold) which is already written to accept data from Trunk Recorder. When we showed an interest in his work he released it on GitHub and has been tweaking it based on some feedback we've given him.

https://github.com/robotastic/trunk-recorder
https://github.com/ScanOC/trunk-player

Screen shot of the web based player: https://github.com/ScanOC/trunk-play...n.png?raw=true

A few of us have trunk-recorder running on (admittedly beefier CPU) Ubuntu linux machines using 3 SDR dongles to capture an entire P25 or Smartnet system. The nice thing about trunk-recorder is it is entirely self contained - there is no need to run a CC channel app, nothing to direct decoders, nothing to interact via virtual cables. Trunk recorder basically listens to the CC, directs the SDRs, and outputs a .wav and a corresponding .json file with metadata. (ie: every unit ID in that transmission - see the screenshot above)

What you need is enough SDRs to effectively cover the system you want to capture and a modest amount of CPU. For me that was just under 6mhz of dongles and a new-to-me computer off eBay - your mileage may vary. I am able to run 3 at 2mhz sample rates. I am using a dual quad core L5420 @ 2.5Ghz - the Ubuntu box looks like this during off peak time for the system:

top - 00:45:58 up 5 days, 4:38, 2 users, load average: 3.65, 4.11, 4.21
Tasks: 178 total, 1 running, 177 sleeping, 0 stopped, 0 zombie
%Cpu0 : 15.0 us, 4.0 sy, 0.0 ni, 80.7 id, 0.0 wa, 0.0 hi, 0.3 si, 0.0 st
%Cpu1 : 8.1 us, 2.0 sy, 0.0 ni, 89.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu2 : 21.0 us, 3.1 sy, 0.0 ni, 74.2 id, 0.7 wa, 0.0 hi, 1.0 si, 0.0 st
%Cpu3 : 10.9 us, 4.2 sy, 0.0 ni, 84.9 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu4 : 14.5 us, 2.6 sy, 0.0 ni, 82.8 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu5 : 60.9 us, 1.0 sy, 0.0 ni, 38.1 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st
%Cpu6 : 30.4 us, 1.7 sy, 0.0 ni, 67.2 id, 0.0 wa, 0.0 hi, 0.7 si, 0.0 st
%Cpu7 : 8.9 us, 3.8 sy, 0.0 ni, 87.3 id, 0.0 wa, 0.0 hi, 0.0 si, 0.0 st

Every time trunk-recorder writes a .wav and .json file it will (optionally) run a shell script. There are pre-written shell scripts included between the two applications that act on those two files to make them easily playable. This is where it gets really spiffy.

Every time a .wav and .json file is generated on my SDR machine it will:

1. Push the two files to a second machine (where I'm running the django / web based trunk player).
(You could do this at your house or put the web based server out on the internet)
2. Add a entry to a sql database for the webserver. This makes the web interface know everything.
3. optionally convert the .wav file to a .mp3 for size. I am doing this.
4. push the .mp3 file up to Amazon S3 storage so it can be referenced - this isn't required, but its already written into the scripts. If you don't do this you have to find a place to put the .wav files where they can be accessed via a web browser.

In the web interface you can simply go to the "default" page where every single .mp3 file is played as they arrive - or you can build scanlists, which basically creates a web-based scanner.

The really cool scaling feature about the way trunk-player works is you could theoretically have 2-3+ friends each setup a recorder for a given P25 / Smartnet system and all of you feed the same web based front end. Then all of you can listen to each of those systems, mixing talk-groups into scan lists of interest and being able to access it from anywhere on the Internet - which is great if one of you is in a better position to overcome simulcast distortion than your friends?

The way trunk-recorder works is if radio traffic occurs back-to-back on the same voice frequency it will record that all in a single .mp3 file until a timeout is reached or some other talk-group appears there. This takes some getting used to and admittedly adds a little bit of delay to when you hear a transmission in real-time, but by default trunk-recorder doesn't record the actual silence between the transmissions, so you hear everything back-to-back quickly. That is now adjustable, but some people may like that to "catch up" to the delay of listening to multiple talk-groups.

The benefits of this are pretty huge since you get 100% of every transmission for every talk-group, so while you may setup a scan list that gets "behind" by 2-3 minutes you know you're hearing every transmission of every talk-group that interests you.

This isn't for the faint at heart. While installation has clearly improved and become easier you're going to need to modify some files, tweak some settings, etc. to make it do what you want. If you're comfortable doing that these two apps are worth your time.

As more of us start providing feedback and learning the quirks the installation should become more and more easy for the novice end user.
Reply With Quote
Sponsored links
  #2 (permalink)  
Old 11-22-2016, 11:59 AM
Member
   
Join Date: Dec 2002
Location: Ca
Posts: 124
Default

Thanks for the write up northernsummit...

Agreed, both apps are rough around the edges but once you get them running it's awesome.

Quote:
As more of us start providing feedback and learning the quirks the installation should become more and more easy for the novice end user.
As the author of https://github.com/ScanOC/trunk-player could not agree more with that.

I'm spending most of my time making it work, not making it work easy, so when people like northernsummit ask question or get stuck, I end up re writing that part to make it easier for others.

The author of trunk-recorder also is awesome about taking user feedback and updating the program.

So both programs are open to suggestions (and even code updated via github).

Dylan
- If you want to see trunk-player in action this is the primary site I use it on https://scanoc.com/scan/default
It is the Orange County, CA CCCS Smartnet trunked system, it's capturing the county wide cell and sometimes the South Cell (I don't have a great signal from my place, working a new location to capture from).
Reply With Quote
  #3 (permalink)  
Old 07-09-2017, 11:23 PM
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Jul 2009
Location: Macedonia, Ohio
Posts: 146
Post

I've evolved my system to use it as a source for a Broadcastify feed. I know of at least 3 different people using this now.

The benefit of streaming off Trunk Recorder is you get 100% of the transmissions and simply place them into a queue. So if your stream has 3-4 talk-groups and occasionally the FD talks while the PD is talking both transmissions make it into your stream in their entirety (just one of them slightly delayed in a queue)

Details here:

Streaming with Trunk Recorder and Liquidsoap - The RadioReference Wiki
Reply With Quote
  #4 (permalink)  
Old 07-10-2017, 6:29 AM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 472
Default

Thanks, I'll take a look. Presently I am running a lightly-modified copy of 'max' branch op25 as a broadcastify source with great success, but am interested in being able to save the transmissions for later review rather than having to go to the broadcastify archives and post-process through audacity to remove the (extensive) silences.
Reply With Quote
  #5 (permalink)  
Old 07-10-2017, 7:07 AM
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Jul 2009
Location: Macedonia, Ohio
Posts: 146
Default

Quote:
Originally Posted by boatbod View Post
Thanks, I'll take a look. Presently I am running a lightly-modified copy of 'max' branch op25 as a broadcastify source with great success, but am interested in being able to save the transmissions for later review rather than having to go to the broadcastify archives and post-process through audacity to remove the (extensive) silences.
You have no idea how often I use this functionality either because I want to do a DVR like immediate replay of something i just heard or because a local Facebook community will ask "what the heck happened up at XYZ 20 minutes ago?" and you can play back instantly, jump around, etc.

With the archive I always find myself downloading multiple mp3's and using Audacity to jump around.

What were you using for the stream piece? how were you getting the audio from op25 to broadcastify?
Reply With Quote
Sponsored links
  #6 (permalink)  
Old 07-10-2017, 5:36 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 472
Default

Quote:
Originally Posted by northernsummit View Post
You have no idea how often I use this functionality either because I want to do a DVR like immediate replay of something i just heard or because a local Facebook community will ask "what the heck happened up at XYZ 20 minutes ago?" and you can play back instantly, jump around, etc.

With the archive I always find myself downloading multiple mp3's and using Audacity to jump around.

What were you using for the stream piece? how were you getting the audio from op25 to broadcastify?
My broadcastify setup is op25->ALSA->DarkIce. My alsa config has both a loopback device and tee defined so that I can route the audio to darkice at the same time as sending it to the speakers for local monitoring.
Code:
/etc/asound.conf

# output device
pcm.loopout {
  type dmix
  ipc_key 328211
  slave.pcm "hw:Loopback,0,0"
}

# input device
pcm.loopin {
  type dsnoop
  ipc_key 686592
  slaver.pcm "hw:Loopback,1,0"
}

# duplex plug device
pcm.loop {
  type plug
  slave {
    pcm {
      type asym
      playback.pcm "loopout"
      capture.pcm "loopin"
    }
  }
}

pcm.mout {
  type plug
  slave.pcm mdev
  route_policy "duplicate"
}

pcm.mdev {
        type multi

        slaves.a.pcm "hw:Loopback,0,0"
        slaves.a.channels 2
        slaves.b.pcm "hw:0,0"
        slaves.b.channels 2

        bindings.0.slave a
        bindings.0.channel 0
        bindings.1.slave a
        bindings.1.channel 1
        bindings.2.slave b
        bindings.2.channel 0
        bindings.3.slave b
        bindings.3.channel 1
}
The radio app (op25) plays to alsa device "mout" and Darkice (streaming client) received it's input from alsa device "loop".

Last edited by boatbod; 07-10-2017 at 5:54 PM..
Reply With Quote
  #7 (permalink)  
Old 07-10-2017, 5:45 PM
adcockfred's Avatar
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Apr 2010
Location: houston tx.
Posts: 276
Default

I just run my feed through zello, instant playback right in phone !
Reply With Quote
  #8 (permalink)  
Old 07-10-2017, 6:01 PM
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Jul 2009
Location: Macedonia, Ohio
Posts: 146
Default

Quote:
Originally Posted by boatbod View Post
My broadcastify setup is op25->ALSA->DarkIce. My alsa config has both a loopback device and tee defined so that I can route the audio to darkice at the same time as sending it to the speakers for local monitoring.
I need to read up on this when I have a clearer mind. I kept struggling with ALSA and Pulse and was trying to do something like this. Stumbled upon liquidsoap and ran with it. I've yet to find a way to efficiently update the alpha tags with darkice, and with liquidsoap it appears they'r slightly out of sync (occur too early and end early)
Reply With Quote
  #9 (permalink)  
Old 07-10-2017, 8:02 PM
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Mar 2007
Location: Talbot Co, MD
Posts: 472
Default

Quote:
Originally Posted by northernsummit View Post
I need to read up on this when I have a clearer mind. I kept struggling with ALSA and Pulse and was trying to do something like this. Stumbled upon liquidsoap and ran with it. I've yet to find a way to efficiently update the alpha tags with darkice, and with liquidsoap it appears they'r slightly out of sync (occur too early and end early)
Lack of tag update is the one main limitation with darkice. I was trying to figure out a way to make it work, but it would require enough changes to the op25 udp audio interface to make it incompatible with the nc | aplay method of decoding and pulling it out separately would lead to exactly the synchronization problems you described.

Last edited by boatbod; 07-10-2017 at 8:20 PM..
Reply With Quote
  #10 (permalink)  
Old 08-17-2017, 12:04 PM
vabiro's Avatar
Member
  Premium Subscriber
Premium Subscriber
 
Join Date: Jan 2004
Location: Toronto, Ontario
Posts: 259
Default

Has anyone modified the liquidsoap script that would allow multiple mount points?

As it is currently configured, all the streams are presented over the same mount point consecutively, so on a busy system you could have considerable delay between the transmission, clearing of the cue, and the broadcast of the recording. To get around this, I set-up separate mount points for each.

To do this I am using my own icecast server with a mount point for each TGID. I am wondering if the silence injected in the liquidsoap script used here would be a solution to keeping the stream up, rather than dieing, or looping through the file.

Since the silence needs to be fed continuously to all the mountpoints in the absence of a new wav file I can't feed the appropriate TGID as part of the Streamthis to liquidsoap request.

I have hunted through several tutorials and can't seem to find anything that doesn't involve sending the same stream to multiple servers. I want to send different streams to the same localhost server with different mount points.

Any suggestions?

Thanks in advance.
Reply With Quote
  #11 (permalink)  
Old 08-17-2017, 12:38 PM
Member
  Audio Feed Provider
Audio Feed Provider
Amateur Radio Operator
Amateur Radio
 
Join Date: Jul 2009
Location: Macedonia, Ohio
Posts: 146
Default

Quote:
Originally Posted by vabiro View Post

I have hunted through several tutorials and can't seem to find anything that doesn't involve sending the same stream to multiple servers. I want to send different streams to the same localhost server with different mount points.

Any suggestions?

Thanks in advance.
Multiple instances of liquidsoap and the inject script. If you look at Cuyahoga County, Ohio there are 5 Cleveland Police Districts (in addition to the "everything" feed that predated those). The idea of the isolated districts is you can listen to JUST that district and not miss 10-15 minutes of transmissions that took place because the citywide feed got stuck on a 3 minute discussion about a license plate.

Anyway - each of those individual districts is a separate instance of streamthis and the liquidsoap script, run in a unique directory. Arguably the 'streamthis' script could be made smart enough to be one script and just run its inject commands to different file sockets.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 3:39 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
All information here is Copyright 2012 by RadioReference.com LLC and Lindsay C. Blanton III.Ad Management by RedTyger
Copyright 2015 by RadioReference.com LLC Privacy Policy  |  Terms and Conditions