Opened 11 years ago

Last modified 11 years ago

#2105 new defect

Can't receive rtsp interleaved from encoder

Reported by: Nikolay Owned by:
Priority: normal Component: avformat
Version: 1.0.1 Keywords: rtsp tcp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

Hi, all
I have a problem when trying to receive rtsp from remote encoder.

[rtsp @ 0x8299060] SDP:
v=0
o=StreamingServer 3331435948 1116907222000 IN IP4 192.168.12.125
s=h264.mp4
c=IN IP4 239.0.0.0/1
t=0 0
a=control:*
m=video 0 RTP/AVP 96
a=control:trackID=0
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; sprop-parameter-sets=Z0LgHtoCwEkQ,aM4wpIA=
m=audio 0 RTP/AVP 0
a=control:trackID=1
a=rtpmap:0 PCMU/8000
a=ptime:20
m=application 0 RTP/AVP 107
a=control:trackID=2
a=rtpmap:107 vnd.onvif.metadata/90000

SETUP.rtsp://192.168.12.125/0/trackID=0 and
SETUP.rtsp://192.168.12.125/0/trackID=1
work well and i got RTSP/1.0.200.OK for it.

VLC can work with this stream, but it setup only track 0 and 1
and then send PLAY... this way streaming begin. ffmpeg got error and exit.

Reason as I can see by tcpdump is when ffmpeg try:
SETUP.rtsp://192.168.12.125/0/trackID=2.RTSP/1.0..Transport:.RTP/AVP/TCP;unicast;interleaved=4-5..CSeq:.5..Session:.91270936
it got
RTSP/1.0.461.Invalid.Method..CSeq:.5..Server:.GrandStream.Rtsp.Server.V100R001..Unsupported.Transport..
and finish.

Any suggestions how can I solve this problem? May be somehow skip
SETUP trackID=2

Thank for any advice.

How to reproduce:

./ffmpeg  -rtsp_transport tcp -i rtsp://192.168.12.125/0  -acodec libvo_aacenc
 -b:a 32k -ac 1 -sample_fmt s16 -ar 44100 -vcodec copy -s 704x576 -b:v 512k 
-f flv rtmp://x/mp4:test0
ffmpeg version 1.0.1 
built on Dec 31 2012 16:36:05 with gcc 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
configuration: --arch=i686 --enable-pthreads --enable-runtime-cpudetect
--disable-stripping --prefix=/home/shade/install/ffmpeg-1.0.1_build
--enable-bzlib --enable-libdc1394 --enable-libfreetype --enable-frei0r 
--enable-gnutls --enable-libgsm --enable-libmp3lame --enable-librtmp 
--enable-libopenjpeg --enable-libpulse --enable-libschroedinger --enable-libspeex
--enable-libtheora --enable-vaapi --enable-vdpau --enable-libvorbis 
--enable-libvpx --enable-zlib --enable-gpl --enable-postproc --enable-x11grab
--enable-libx264 --shlibdir=/usr/lib --disable-shared --enable-static
--enable-libvo-aacenc --enable-version3
  libavutil      51. 73.101 / 51. 73.101
  libavcodec     54. 59.100 / 54. 59.100
  libavformat    54. 29.104 / 54. 29.104
  libavdevice    54.  2.101 / 54.  2.101
  libavfilter     3. 17.100 /  3. 17.100
  libswscale      2.  1.101 /  2.  1.101
  libswresample   0. 15.100 /  0. 15.100
  libpostproc    52.  0.100 / 52.  0.100
rtsp://192.168.1.125/0: Invalid data found when processing input

Change History (1)

in reply to:  description comment:1 by Carl Eugen Hoyos, 11 years ago

Component: undeterminedavformat
Keywords: rtsp tcp added

Replying to shade_nik:

RTSP/1.0.461.Invalid.Method..CSeq:.5..Server:.GrandStream.Rtsp.Server.V100R001..Unsupported.Transport..

This seems to indicate the server does not support tcp.
Does it work without "-rtsp_transport tcp" / why are you passing the option?

Note: See TracTickets for help on using tickets.