[FFmpeg-user] I have question about receiving rtsp interleaved from encoder

Nikolay Boyko nikolay.boyko at gmail.com
Thu Dec 27 14:47:55 CET 2012


VLC can work with this stream however I don't like how vlc work with rtmp.
mplayer don't now not try it.
By tcpdump vlc works slightly different. It send setup as ffmeg does.

SETUP.rtsp://
192.168.1.84/0/trackID=0.RTSP/1.0..CSeq:.4..User-Agent:.LibVLC/1.1.9.(LIVE555.Streaming.Media.v2010.11.17)..Transport:.RTP/AVP/TCP;unicast;interleaved=0-1..
..

RTSP/1.0.200.OK..CSeq:.4..Server:.GrandStream.Rtsp.Server.V100R001..Session:.91042740;timeout=120..Transport:.RTP/AVP/TCP;unicast;interleaved=0-1;ssrc=55aaee0;mode="PLAY"..

SETUP.rtsp://
192.168.1.84/0/trackID=1.RTSP/1.0..CSeq:.5..User-Agent:.LibVLC/1.1.9.(LIVE555.Streaming.Media.v2010.11.17)..Transport:.RTP/AVP/TCP;unicast;interleaved=2-3..Session:.91042740
..

RTSP/1.0.200.OK..CSeq:.5..Server:.GrandStream.Rtsp.Server.V100R001..Session:.91042740;timeout=120..Transport:.RTP/AVP/TCP;unicast;interleaved=2-3;ssrc=55aaf60;mode="PLAY"..

and send PLAY doesn't try to setup trackID=2 and then streaming begin.

PLAY.rtsp://
192.168.1.84/0/.RTSP/1.0..CSeq:.6..User-Agent:.LibVLC/1.1.9.(LIVE555.Streaming.Media.v2010.11.17)..Session:.91042740..Range:.npt=0.000-..
..

ffmpeg don't send PLAY it try setup trackID=2 got unsupported transport and
exit.

On Wed, Dec 26, 2012 at 9:05 PM, Roger Pack <rogerdpack2 at gmail.com> wrote:

> On 12/25/12, Nikolay Boyko <nikolay.boyko at gmail.com> wrote:
> > Hi, all
> >
> > I have a problem when trying to receive rtsp from remote encoder.
> >
> > [exec]
> > ffmpeg -loglevel debug -rtsp_transport tcp -i rtsp://XXX/0  -acodec
> > libmp3lame -b:a 32k  -ac 1 -sample_fmt s16 -ar 44100 -vcodec copy -s
> > 704x576 -b:v 512k -f flv rtmp://XXX/mp4:test0
> > ffmpeg version 0.10.6-6:0.10.6-0ubuntu0jon1~natty1 Copyright (c)
> 2000-2012
> > the FFmpeg developers
> >   built on Nov 12 2012 13:16:47 with gcc 4.5.2
> >   configuration: --arch=i386 --enable-pthreads --enable-runtime-cpudetect
> > --extra-version='6:0.10.6-0ubuntu0jon1~natty1' --libdir=/usr/lib
> > --disable-stripping --prefix=/usr --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-libcdio
> > --enable-x11grab --enable-libx264 --shlibdir=/usr/lib --enable-shared
> > --disable-static
> > [rtsp @ 0x8299060] SDP:
> > v=0
> > o=StreamingServer 3331435948 1116907222000 IN IP4 192.168.1.84
> > 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
> >
> >
> > [rtsp @ 0x8299060] video codec set to: h264
> > [NULL @ 0x82a12c0] RTP Packetization Mode: 1
> > [NULL @ 0x82a12c0] Extradata set to 0x82a1700 (size: 20)!audio codec set
> > to: pcm_mulaw
> > [rtsp @ 0x8299060] audio samplerate set to: 8000
> > [rtsp @ 0x8299060] audio channels set to: 1
> > rtsp://89.187.1.142/0: Invalid data found when processing input
> > [/exec]
> >
> > Reason as I can see by tcpdump is when ffmpeg try:
> > SETUP.rtsp://
> >
> 192.168.1.84/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 finished
> >
> > SETUP trackID=0 and trackID=1 work fine.
> > Can I somewhat skip this stage and setup only trackID=0 and trackID=1 and
> > then send PLAY.
>
> Do other players like VLC/mplayer work with this rtsp stream?
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list