[MPlayer-users] How to play rtsp stream with mplayer using live555 libs?

dj stava djstava at gmail.com
Mon May 24 03:35:33 CEST 2010


I use the command mplayer -v -demuxer live555 rtsp://ip/file,but that's not
work for me,error remains.

MPlayer SVN-r31179-4.4.3 (C) 2000-2010 MPlayer Team
CPU vendor name: GenuineIntel  max cpuid level: 13
CPU: Intel(R) Core(TM)2 Duo CPU     T6400  @ 2.00GHz (Family: 6, Model: 23,
Stepping: 10)
extended cpuid-level: 8
extended cache-info: 134242368
Detected cache-line size is 64 bytes
Testing OS support for SSE... yes.
Tests of OS support for SSE passed.
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNowExt: 0 SSE: 1 SSE2: 1 SSSE3: 1
Compiled for x86 CPU with extensions: MMX MMX2 SSE SSE2 SSSE3 CMOV
get_path('codecs.conf') -> '/home/djstava/.mplayer/codecs.conf'
Reading /home/djstava/.mplayer/codecs.conf: Can't open
'/home/djstava/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: Can't open
'/usr/local/etc/mplayer/codecs.conf': No such file or directory
Using built-in default codecs.conf.
Configuration:
CommandLine: '-v' '-demuxer' 'live555' 'rtsp://
58.196.13.15/sitv/10031_E001071100000261.mp4'
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay
get_path('fonts') -> '/home/djstava/.mplayer/fonts'
Using nanosleep() timing
get_path('input.conf') -> '/home/djstava/.mplayer/input.conf'
Can't open input config file /home/djstava/.mplayer/input.conf: No such file
or directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No such file
or directory
Falling back on default (hardcoded) input config
Setting up LIRC support...
mplayer: could not open config files /home/djstava/.lircrc and
/etc/lirc//lirc/lircrc
mplayer: No such file or directory
Failed to read LIRC config file ~/.lircrc.
get_path('10031_E001071100000261.mp4.conf') ->
'/home/djstava/.mplayer/10031_E001071100000261.mp4.conf'

Playing rtsp://58.196.13.15/sitv/10031_E001071100000261.mp4.
get_path('sub/') -> '/home/djstava/.mplayer/sub/'
djstava mplayer.c enter open_stream
djstava now in open_stream
djstava filename is:rtsp://58.196.13.15/sitv/10031_E001071100000261.mp4
djstava mode is:0
djstava file_format is:
djstava new_stream
STREAM_RTSP, URL: rtsp://58.196.13.15/sitv/10031_E001071100000261.mp4
Filename for url is now rtsp://58.196.13.15/sitv/10031_E001071100000261.mp4
Filename for url is now rtsp://58.196.13.15/sitv/10031_E001071100000261.mp4
djstava enter stream/stream_rtsp.c
Resolving 58.196.13.15 for AF_INET6...
Couldn't resolve name for AF_INET6: 58.196.13.15
Connecting to server 58.196.13.15[58.196.13.15]: 554...
djstava filename is:rtsp://58.196.13.15/sitv/10031_E001071100000261.mp4
djstava mode is:0
djstava file_format is:
djstava new_stream
djstava stream_live555 url_new
Filename for url is now rtsp://58.196.13.15/sitv/10031_E001071100000261.mp4
Filename for url is now rtsp://58.196.13.15/sitv/10031_E001071100000261.mp4
STREAM_LIVE555, URL: rtsp://58.196.13.15/sitv/10031_E001071100000261.mp4
djstava rtsp_streaming_start
STREAM: [RTSP and SIP] rtsp://58.196.13.15/sitv/10031_E001071100000261.mp4
STREAM: Description: standard RTSP and SIP
STREAM: Author: Ross Finlayson
STREAM: Comment: Uses LIVE555 Streaming Media library.
djstava open_stream_plugin success
djstava demuxer_desc_t file_format is:21
djstava i is:32
djstava demuxer_desc_t file_format is:21
djstava i is:32
djstava _rtsp_streaming_seek is not implemented
Stream not seekable!
djstava libmpdemux/demuxer.c 942
djstava demux_open_stream eof is:0
 file format detected.
Sending request: DESCRIBE rtsp://
58.196.13.15/sitv/10031_E001071100000261.mp4 RTSP/1.0
CSeq: 1
Accept: application/sdp
User-Agent: MPlayer (LIVE555 Streaming Media v2010.04.09)


Received DESCRIBE response: RTSP/1.0 200 OK
Server: DSS/5.0.3.2 (Build/452.22.3; Platform/Linux; Release/Panther;
Update/3GPP; )
CSeq: 1
Last-Modified: Mon,24 May 2010 01:15:06 GMT
Cache-Control: must-revalidate
Content-length: 1166
Date: Mon,24 May 2010 01:15:06 GMT
Expires: Mon,24 May 2010 01:15:06 GMT
Content-Type: application/sdp
x-Accept-Retransmit: our-retransmit
x-Accept-Dynamic-Rate: 1
Content-Base: rtsp://58.196.13.15/sitv/10031_E001071100000261.mp4/


Need to read 1166 extra bytes
Read 1166 extra bytes: v=0
o=StreamingServer 3330517155 1118784660000 IN IP4 58.196.13.15
s=/10031_E001071100000261.mp4
u=http:///
e=admin@
c=IN IP4 0.0.0.0
t=0 0
a=control:*
a=mpeg4-iod:"data:application/mpeg4-iod;base64,AoIvAE/+AQ/zAQOBQgABQKRkYXRhOmFwcGxpY2F0aW9uL21wZWc0LW9kLWF1O2Jhc2U2NCxBVjRCUFFVZkF6a0F5U0FBWlFRdklCRVVVQUFBS0tBQUFCUlFBQVVnQUFBQnNDSUFBQUcxRHFDZ29LQUFBQUVBQUFBQklBQ0VRUHdvb0NGYW93QUdBUVFCSFFLZkF4a0FaUUFFRVVBVkFBWUFBQU1BQUFBQmdBQUZBaElRQmdFRAQNAQUACCEAAAAAAAAAAAYJAQAAAAAAAAAAA2EAAkA+ZGF0YTphcHBsaWNhdGlvbi9tcGVnNC1iaWZzLWF1O2Jhc2U2NCx3QkFTZ1RBcUJYSmhCSWhRUlFVL0FBPT0EEgINAAAUAAAAAAAAAAAFAwAAQAYJAQAAAAAAAAAA"

a=ISMA-compliance:1,1,1
a=range:npt=0-5331.000
m=audio 0 RTP/AVP 97
a=rtpmap:97 mpeg4-generic/44100/2
a=mpeg2-AudioPID:482
a=fmtp:97 streamtype=5; profile-level-id=15; mode=AAC-hbr; config=1210;
SizeLength=13; IndexLength=3; IndexDeltaLength=3; Profile=1
a=mpeg4-esid:101
a=x-envivio-verid:00001029
a=control:trackID=1
m=video 0 RTP/AVP 96
a=rtpmap:96 MP4V-ES/1008
a=fmtp:96 profile-level-id=243;
config=000001B022000001B50EA0A0A0A00000010000000120008440FC28A0215AA300
a=mpeg4-esid:201
a=x-envivio-verid:0000102e
a=control:trackID=2

Initiated "audio/MPEG4-GENERIC" RTP subsession on port 36772
Increased audio socket receive buffer to 112640 bytes
Sending request: SETUP rtsp://
58.196.13.15/sitv/10031_E001071100000261.mp4/trackID=1 RTSP/1.0
CSeq: 2
Transport: RTP/AVP;unicast;client_port=36772-36773
User-Agent: MPlayer (LIVE555 Streaming Media v2010.04.09)


Received SETUP response: RTSP/1.0 200 OK
Server: DSS/5.0.3.2 (Build/452.22.3; Platform/Linux; Release/Panther;
Update/3GPP; )
CSeq: 2
Last-Modified: Mon,24 May 2010 01:15:06 GMT
Cache-Control: must-revalidat
Session: 12340003
Date: Mon,24 May 2010 01:15:06 GMT
Expires: Mon,24 May 2010 01:15:06 GMT
Transport:
MP2T/UDP;unicast;client_port=36772-36773;server_port=8889-8890;ssrc=12345677;mode=PLAY



Initiated "video/MP4V-ES" RTP subsession on port 44712
Increased video socket receive buffer to 2000000 bytes
Sending request: SETUP rtsp://
58.196.13.15/sitv/10031_E001071100000261.mp4/trackID=2 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;unicast;client_port=44712-44713
Session: 12340003
User-Agent: MPlayer (LIVE555 Streaming Media v2010.04.09)


Received SETUP response: RTSP/1.0 200 OK
Server: DSS/5.0.3.2 (Build/452.22.3; Platform/Linux; Release/Panther;
Update/3GPP; )
CSeq: 3
Last-Modified: Mon,24 May 2010 01:15:06 GMT
Cache-Control: must-revalidat
Session: 12340003
Date: Mon,24 May 2010 01:15:06 GMT
Expires: Mon,24 May 2010 01:15:06 GMT
Transport:
MP2T/UDP;unicast;client_port=44712-44713;server_port=8889-8890;ssrc=12345678;mode=PLAY



Sending request: PLAY
rtsp://58.196.13.15/sitv/10031_E001071100000261.mp4/RTSP/1.0
CSeq: 4
Session: 12340003
Range: npt=0.000-
User-Agent: MPlayer (LIVE555 Streaming Media v2010.04.09)


Received PLAY response: RTSP/1.0 200 OK
Server: DSS/5.0.3.2 (Build/452.22.3; Platform/Linux; Release/Panther;
Update/3GPP; )
CSeq: 4
Session: 12340003
Range: npt=0.000000-5331.000000
Scale: 1.000000


djstava demux_open_rtp eof is:0
djstava rtsp_port is:0
djstava audiofound is:1
djstava videofound is:0
djstava rtsp_port is:0
djstava audiofound is:1
djstava videofound is:1
djstava enter subsession
djstava enter audio subsession
==> Found audio stream: 0
djstava audio rtpCodecInit eof is:0
djstava audiocodec MP4A-GENERIC
djstava enter subsession
djstava enter video subsession
==> Found video stream: 0
demux_rtp: Failed to guess the video frame rate
djstava video rtpCodecInit eof is:0
djstava rtpCodecInit MP4
djstava needVideoFrameRate eof is:0
djstava video fps is:0
djstava awaitRTPPacket eof is:0
djstava start to getBuffer
djstava demuxer->video
djstava bufferQueue->nextpacket
djstava awaitRTPPacket return false
djstava curPTS is:0
djstava demuxer->desc->open
djstava demuxer->desc->open eof is:1
VIDEO:  [mp4v]  0x0  0bpp  0.000 fps    0.0 kbps ( 0.0 kbyte/s)
[V] filefmt:21  fourcc:0x7634706D  size:0x0  fps:0.000  ftime:=0.0000
FPS not specified in the header or invalid, use the -fps option.
get_path('sub/') -> '/home/djstava/.mplayer/sub/'
==========================================================================
Opening audio decoder: [faad] AAC (MPEG2/4 Advanced Audio Coding)
dec_audio: Allocating 6144 bytes for input buffer.
dec_audio: Allocating 65536 + 65536 = 131072 bytes for output buffer.
FAAD: Decoder init done (0Bytes)!
FAAD: Negotiated samplerate: 44100Hz  channels: 2
FAAD: compressed input bitrate missing, assuming 128kbit/s!
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16000->176400)
Selected audio codec: [faad] afm: faad (FAAD AAC (MPEG-2/MPEG-4 Audio))
==========================================================================
Building audio filter chain for 44100Hz/2ch/s16le -> 0Hz/0ch/??...
[libaf] Adding filter dummy
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Trying every known audio driver...
ao2: 44100 Hz  2 chans  s16le
audio_setup: using '/dev/dsp' dsp device
audio_setup: using '/dev/mixer' mixer device
audio_setup: using 'pcm' mixer device
audio_setup: sample format: s16le (requested: s16le)
audio_setup: using 2 channels (requested: 2)
audio_setup: using 44100 Hz samplerate (requested: 44100)
audio_setup: frags:  32/32  (16384 bytes/frag)  free: 524288
AO: [oss] 44100Hz 2ch s16le (2 bytes per sample)
AO: Description: OSS/ioctl audio output
AO: Author: A'rpi
Building audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...
[dummy] Was reinitialized: 44100Hz/2ch/s16le
[dummy] Was reinitialized: 44100Hz/2ch/s16le
Video: no video
Freeing 0 unused video chunks.
Starting playback...
djstava demux_rtp_fill_buffer before getBuffer eof is:1
djstava start to getBuffer
djstava check demux->stream->eof
djstava demuxer stream reach eof
djstava demux_rtp_fill_buffer eof is:1
ds_fill_buffer: EOF reached (stream: audio)
A:   0.0 (unknown) of 5331.0 ( 1:28:51.0) ??,?%  EOF code: 1

Uninit audio filters...
[libaf] Removing filter dummy
Uninit audio: faad
FAAD: Closing decoder!
Sending request: TEARDOWN rtsp://
58.196.13.15/sitv/10031_E001071100000261.mp4/ RTSP/1.0
CSeq: 5
Session: 12340003
User-Agent: MPlayer (LIVE555 Streaming Media v2010.04.09)


Received TEARDOWN response: RTSP/1.0 200 OK
Server: DSS/5.0.3.2 (Build/452.22.3; Platform/Linux; Release/Panther;
Update/3GPP; )
CSeq: 5
Session: 12340003
Date: Mon,24 May 2010 01:15:17 GMT
Connection: Close


vo: x11 uninit called but X11 not initialized..

Exiting... (End of file)


I traced the source,found something wrong with RTP packet receiving,in file
libmpdemux/demux_rtp.cpp *getBuffer* function.It only get one packet of
video RTP data,and then show eof error.

I don't know how to figure it out,Need your help!


djstava


More information about the MPlayer-users mailing list