[Home]

Summary:ASTERISK-09138: [patch] app_rtsp - playback RTSP media resources
Reporter:Sergio Garcia (sgarcia)Labels:
Date Opened:2007-03-28 17:26:41Date Closed:2011-06-07 14:03:04
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Applications/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) app_rtsp.c
Description:Submission of the app_rtsp application.
For detailed info http://sip.fontventa.com/content/view/27/54/
Comments:By: Serge Vecher (serge-v) 2007-03-29 08:11:33

good one, Sergio! I'm marking this one a "trunk" issue, as this is a new feature.

Let's see those video patches for sip next ...

By: Matt Riddell (zx81) 2007-04-25 00:13:53

Hi,

When adding it to SVN-branch-1.4-r59289M I got the following error on startup:

[Apr 25 17:11:51] app_rtsp.so => (RTSP applications)
asterisk: symbol lookup error: /usr/lib/asterisk/modules/app_transcoder.so: undefined symbol: avcodec_init

my mistake, the error is in app_transcoder - taken from sip.fontventa.com.

I'll remove that and try again.

Ok, it doesn't seem to work nor does it give an error message:


[Apr 25 19:12:00]     -- Executing [9002@freevoip_nz:1] NoOp("SIP/113-f6310b68", "chinaguy") in new stack
[Apr 25 19:12:00] DEBUG[6395]: pbx.c:1795 pbx_extension_helper: Launching 'Goto'
[Apr 25 19:12:00]     -- Executing [9002@freevoip_nz:2] Goto("SIP/113-f6310b68", "freevoip|9002|1") in new stack
[Apr 25 19:12:00]     -- Goto (freevoip,9002,1)
[Apr 25 19:12:00] DEBUG[6395]: pbx.c:1795 pbx_extension_helper: Launching 'Answer'
[Apr 25 19:12:00]     -- Executing [9002@freevoip:1] Answer("SIP/113-f6310b68", "") in new stack
[Apr 25 19:12:00] DEBUG[6395]: devicestate.c:303 __ast_device_state_changed_literal: Notification of state change to be queued on device/channel SIP/113-f6310b68
[Apr 25 19:12:00] DEBUG[6396]: app_queue.c:546 changethread: Device 'SIP/113' changed to state '1' (Not in use) but we don't care because they're not a member of any queue.
[Apr 25 19:12:00] DEBUG[2179]: devicestate.c:161 ast_device_state: No provider found, checking channel drivers for SIP - 113
[Apr 25 19:12:00] DEBUG[2179]: chan_sip.c:15306 sip_devicestate: Checking device state for peer 113
[Apr 25 19:12:00] DEBUG[2179]: devicestate.c:287 do_state_change: Changing state for SIP/113 - state 1 (Not in use)
[Apr 25 19:12:00] DEBUG[6397]: app_queue.c:546 changethread: Device 'SIP/113' changed to state '1' (Not in use) but we don't care because they're not a member of any queue.
[Apr 25 19:12:00] DEBUG[6395]: chan_sip.c:3465 sip_answer: SIP answering channel: SIP/113-f6310b68
[Apr 25 19:12:00] DEBUG[6395]: chan_sip.c:6425 transmit_response_with_sdp: Setting framing from config on incoming call
[Apr 25 19:12:00] DEBUG[6395]: chan_sip.c:6193 add_sdp: ** Our capability: 0x18000c (ulaw|alaw|h263|h263p) Video flag: False
[Apr 25 19:12:00] DEBUG[6395]: chan_sip.c:6194 add_sdp: ** Our prefcodec: 0x0 (nothing)
[Apr 25 19:12:00] DEBUG[6395]: chan_sip.c:6209 add_sdp: This call needs video offers!
[Apr 25 19:12:00] DEBUG[6395]: chan_sip.c:6325 add_sdp: -- Done with adding codecs to SDP
[Apr 25 19:12:00] DEBUG[6395]: channel.c:2381 ast_internal_timing_enabled: Internal timing is enabled (option_internal_timing=1048576 chan->timingfd=35)
[Apr 25 19:12:00] DEBUG[6395]: chan_sip.c:6370 add_sdp: Done building SDP. Settling with this capability: 0x18000c (ulaw|alaw|h263|h263p)
[Apr 25 19:12:00] DEBUG[6395]: pbx.c:1795 pbx_extension_helper: Launching 'rtsp'
[Apr 25 19:12:00]     -- Executing [9002@freevoip:2] rtsp("SIP/113-f6310b68", "rtsp://voip.venturevoip.com/lily.sd") in new stack
[Apr 25 19:12:00] DEBUG[6395]: pbx.c:1795 pbx_extension_helper: Launching 'Hangup'
[Apr 25 19:12:00]     -- Executing [9002@freevoip:3] Hangup("SIP/113-f6310b68", "") in new stack
[Apr 25 19:12:00] DEBUG[6395]: pbx.c:2393 __ast_pbx_run: Spawn extension (freevoip,9002,3) exited non-zero on 'SIP/113-f6310b68'
[Apr 25 19:12:00]   == Spawn extension (freevoip, 9002, 3) exited non-zero on 'SIP/113-f6310b68'



By: Sergio Garcia (sgarcia) 2007-04-25 11:32:10

First, the url is rtsp://voip.venturevoip.com/lily.sd, shouldn't it be rtsp://voip.venturevoip.com/lily.sdp (note the last "p").

Second, the error on app_transcoder.so: undefined symbol: avcodec_init is due to missing libavcodec libraries from ffmpeg.

Check the url and if it still doesn't work paste the sdp. Take into account that if it's a network camera it probably only supports mpeg4, so you'll need the app_transcoder to convert it to h263.

By: Matt Riddell (zx81) 2007-04-25 15:36:42

I'm using fenice as an rtsp server to stream both stored and live content as part of an online TV service we're starting up.

If I use VLC, I can play the stream ok (it is .sd rather than .sdp)

Regarding app_transcoder.c, I compiled ffmpeg with:

./configure --enable-libfaad --enable-gpl --enable-libfaac --enable-shared --enable-libmp3lame && make && make install

I noticed that the make install runs ldconfig at the end of the ffmpeg command, so the library should be there.  BTW the ffmpeg is the latest SVN.

Do you want the source sd file?  I'm not sure how this equates into the response fenice provides but here it is anyway:

stream
       priority 1
       file_name lily.mp3
       media_source stored
       payload_type 14
       clock_rate 90000
       audio_channels 2
       encoding_name MPA
       sample_rate 22050
       coding_type frame
       frame_len 26.12
stream_end
stream
       file_name lily.m4v
       media_source stored
       priority 1
       payload_type 32
       clock_rate 90000
       encoding_name MPV
       coding_type frame
       frame_rate 25
stream_end

I also tried copying the file to lily.sdp but no luck.

When I connect from app_rtsp I see nothing in the fenice console, however when I connect from VLC, I get:

[root@voip avroot]# fenice --config-file /etc/fenice.conf

fenice 1.11 - Open Media Streaming Project - Politecnico di Torino


       avroot directory is: /srv/fenice/avroot/
       hostname is: voip.venturevoip.com
       rtsp listening port is: 554
       log file is: /var/log/fenice.log

CTRL-C terminate the server.
transport: RTP/AVP;unicast;client_port=1330-1331
rtp transport: 1
transport: RTP/AVP;unicast;client_port=1332-1333
rtp transport: 1
ref at position 0 (write_pos @ 4)
ref at position 0 (write_pos @ 4)
transport: RTP/AVP/TCP;unicast;interleaved=0-1
rtp transport: 2
transport: RTP/AVP/TCP;unicast;interleaved=2-3
rtp transport: 2
ref at position 0 (write_pos @ 4)
ref at position 0 (write_pos @ 4)

Heh. Ok this has to be the most edited post:

I thought I'd post that fenice listens for both UDP and TCP requests.



By: Olle Johansson (oej) 2007-04-27 03:14:50

We need changes to configure too.

By: Olle Johansson (oej) 2007-04-27 03:17:26

Sergio, I encourage you to read the coding guidelines - included in your source code - and update this source code. There's some formatting issues as well as a lack of doxygen formatted explanations of what each function do. Thanks!

By: Tilghman Lesher (tilghman) 2007-11-01 18:04:53

Suspended due to no response from reporter.  Feel free to reopen if/when you are ready to provide the requested patch modifications.