Changes between Initial Version and Version 1 of audio-how-to-record


Ignore:
Timestamp:
Dec 6, 2006 9:42:44 AM (15 years ago)
Author:
bennylp
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • audio-how-to-record

    v1 v1  
     1= How to Record Audio with pjsua = 
     2 
     3pjsua can record any audio coming into the conference bridge to a WAV or MP3 file (MP3 file recording is only available on Win32 though). But for reporting audio problems, it's best to use a WAV file instead of MP3 so that we can be perfectly sure that the original signal is not altered by MP3 encoding. 
     4 
     5To record audio with pjsua: 
     6 
     7 1. Run pjsua with additional {{{--rec-file}}} argument: 
     8{{{ 
     9 $ ./pjsua --rec-file OUTPUT.WAV 
     10}}} 
     11 1. You should see that the file has been registered to the conference bridge with {{{cl}}} command: 
     12{{{ 
     13>>> cl 
     14Conference ports: 
     15Port #00[16KHz/10ms] Primary Sound Capture Driver  transmitting to: 
     16Port #01[16KHz/10ms]           OUTPUT.WAV  transmitting to: 
     17}}} 
     18 1. Make a call and establish media as usual. 
     19 1. When the call is established, normally you will have the call is "connected" to the sound device in the bridge. This can be confirmed with the {{{cl}}} command below: 
     20{{{ 
     21cl 
     22Conference ports: 
     23Port #00[16KHz/10ms] Primary Sound Capture Driver  transmitting to: #2 
     24Port #01[16KHz/10ms]           OUTPUT.WAV  transmitting to: 
     25Port #02[16KHz/20ms]   sip:user@localhost  transmitting to: #0 
     26}}} 
     27 1. All you need to do now is connect whatever port you want to record to the OUTPUT.WAV port. For example, if you want to record the audio from remote call to the WAV, this command would achieve that: 
     28{{{ 
     29>>> cc 2 1 
     30 09:40:08.969   conference.c Port 2 (sip:user@localhost) transmitting to port 1 
     31(OUTPUT.WAV) 
     32Success 
     33}}} 
     34 1. You can also, for example, record the audio from the microphone to the WAV file: 
     35{{{ 
     36>>> cc 0 1 
     37 09:40:47.894   conference.c Port 0 (Primary Sound Capture Driver) transmitting 
     38to port 1 (OUTPUT.WAV) 
     39Success 
     40}}} 
     41 1. Now both the audio from the remote call and the audio from the microphone will be recorded to the WAV file. You can confirm this with {{{cl}}} command: 
     42{{{ 
     43>>> cl 
     44Conference ports: 
     45Port #00[16KHz/10ms] Primary Sound Capture Driver  transmitting to: #2 #1 
     46Port #01[16KHz/10ms]           OUTPUT.WAV  transmitting to: 
     47Port #02[16KHz/20ms]   sip:user@localhost  transmitting to: #0 #1 
     48}}} 
     49As you can see from above output, both the sound device (port 0) and the call (port 2) are both transmitting to the WAV file, thus it will be recorded. 
     50 
     51