[Asterisk-video] can't hear amr audio

Andrew Buchanan Andrew.Buchanan at ThinkTel.ca
Mon Jul 14 12:45:43 CDT 2008


Hi Klaus,

Thanks for your reply.

The line 
"audioFormat = sdp->audio->formats[i]->format;" (app_rtsp.c)
is never processed because the comparision
"if (sdp->audio->formats[i]->format & chan->nativeformats)" (app_rtsp.c)
fails.

the value of format is 0x00002000
the value of nativeformats is 0x00580004

But the value written by 
"ast_set_write_format(chan, audioFormat | videoFormat);"
Is nonzero as videoformat has a value  0x00400000

Andrew Buchanan

-----Original Message-----
From: asterisk-video-bounces at lists.digium.com
[mailto:asterisk-video-bounces at lists.digium.com] On Behalf Of
asterisk-video-request at lists.digium.com
Sent: July 14, 2008 11:00 AM
To: asterisk-video at lists.digium.com
Subject: asterisk-video Digest, Vol 27, Issue 7

Send asterisk-video mailing list submissions to
	asterisk-video at lists.digium.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.digium.com/mailman/listinfo/asterisk-video
or, via email, send a message with subject or body 'help' to
	asterisk-video-request at lists.digium.com

You can reach the person managing the list at
	asterisk-video-owner at lists.digium.com

When replying, please edit your Subject line so it is more specific
than "Re: Contents of asterisk-video digest..."


Today's Topics:

   1. Re: can't hear amr audio (Klaus Darilion)


----------------------------------------------------------------------

Message: 1
Date: Mon, 14 Jul 2008 10:46:32 +0200
From: Klaus Darilion <klaus.mailinglists at pernau.at>
Subject: Re: [Asterisk-video] can't hear amr audio
To: Development discussion of video media support in Asterisk
	<asterisk-video at lists.digium.com>
Message-ID: <487B1268.80606 at pernau.at>
Content-Type: text/plain; charset=windows-1252; format=flowed

Which codec is: fmt 00002000 ? I think this is 2>>13 = AMR.

Thus I am irritated by " 0x580004 (ulaw|h263|h263p) to 0x0 (nothing)"

The 0x0 should be 0x2000 (AMR) - try to find out why the AMR bitmask 
flag is lost when calling set_format().

regards
klaus


Andrew Buchanan schrieb:
> Hi,
> 
>  
> 
> My camera (a Vivotek PZ7152) is set to AMR audio and when app_rtsp
connects it correctly identifies an audio track containing amr audio
AMR/8000, but I get no audio, only video.  I would appreciate some help
or suggestions to get audio working.
> 
>  
> 
> ------------------------
> 
> I compiled asterisk using the instructions to enable amr audio
> 
> http://sip.fontventa.com/svn/asterisk/amr/README
> 
>  
> 
> and I added the octet-aligned setting, which according to the sdp from

> the camera is the correct setting.
> 
> [amr]
> 
> octet-aligned=1
> 
>  
> 
> ------------------------
> 
>  
> 
> I?ve done some debugging in app_rtsp.c and found that:
> 
>  
> 
> This comparision ?if (sdp->audio->formats[i]->format &
chan->nativeformats)? in app_rtsp.c fails.
> 
>  
> 
> the value of format is 0x00002000
> 
> the value of nativeformats is 0x00580004
> 
>  
> 
> I also get this warning
> 
> [Jul 11 16:36:45] WARNING[31498]: channel.c:2800 set_format: Unable to
find a codec translation path from 0x580004 (ulaw|h263|h263p) to 0x0
(nothing)
> 
>  
> 
> I?m not sure why only ulaw,h263,h263p show up, but they are the only
protocols I have enabled in xlite, so that could be it, but the 0x0
(nothing) I don?t know.
> 
>  
> 
> Some debug code (my app_rtsp line #?s might be off a bit as I added
some debug statements)
> 
>  
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:421 RtspPlayerDescribe:
>DESCRIBE [/live2.sdp]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:442 RtspPlayerDescribe:
<DESCRIBE [/live2.sdp]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:1081 rtsp_play: -rtsp play
loop [0]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:1190 rtsp_play: -Receiving
describe
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line [v=0]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[o=RTSP 1215786675 889 IN IP4 0.0.0.0]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[s=RTSP server]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line [c=IN
IP4 0.0.0.0]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line [t=0
0]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=charset:Shift_JIS]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=range:npt=0-]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=control:*]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=etag:1234567890]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[m=video 0 RTP/AVP 96]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:689 CreateMedia: -creating
media [1,m=video 0 RTP/AVP 96]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[b=AS:0]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=rtpmap:96 MP4V-ES/30000]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=control:trackID=2]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=fmtp:96
profile-level-id=3;config=000001B003000001B2464D5F5047204D6F6465000001B5
09000001000000012000C48881F450A041E1463F;decode_buf=76800]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[m=audio 0 RTP/AVP 97]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:689 CreateMedia: -creating
media [1,m=audio 0 RTP/AVP 97]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[b=AS:13]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=rtpmap:97 AMR/8000]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=control:trackID=4]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=maxptime:200]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=fmtp:97 decode_buf=400;octet-align=1]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[1F450A041E1463F;decode_buf=76800]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[m=audio 0 RTP/AVP 97]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:689 CreateMedia: -creating
media [1,m=audio 0 RTP/AVP 97]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[b=AS:13]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=rtpmap:97 AMR/8000]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=control:trackID=4]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=maxptime:200]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:744 CreateSDP: -line
[a=fmtp:97 decode_buf=400;octet-align=1]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:1249 rtsp_play: -audio
[8192,97,trackID=4]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:1264 rtsp_play:
!(sdp->audio->formats[i]->format & chan->nativeformats) fmt 00002000
nfmt 00580004 -audio [97,trackID=4]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:1274 rtsp_play: -video
[4194304,96,trackID=2]
> 
> [Jul 11 16:36:45] WARNING[31498]: channel.c:2800 set_format: Unable to
find a codec translation path from 0x580004 (ulaw|h263|h263p) to 0x0
(nothing)
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:505 RtspPlayerSetupVideo:
-SETUP VIDEO [trackID=2]
> 
> [Jul 11 16:36:45] DEBUG[31498]: app_rtsp.c:557 RtspPlayerPlay: -PLAY
[/live2.sdp]
> 
> 
>
------------------------------------------------------------------------
> 
> _______________________________________________
> --Bandwidth and Colocation Provided by http://www.api-digital.com--
> 
> asterisk-video mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-video



------------------------------

_______________________________________________
--Bandwidth and Colocation Provided by http://www.api-digital.com--

asterisk-video mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-video

End of asterisk-video Digest, Vol 27, Issue 7
*********************************************



More information about the asterisk-video mailing list