[FFmpeg-trac] #3781(avformat:new): Malfunction of the program with rtsp protocol.

FFmpeg trac at avcodec.org
Tue Jul 22 08:14:43 CEST 2014


#3781: Malfunction of the program with rtsp protocol.
-------------------------------------+-------------------------------------
             Reporter:               |                    Owner:
  iRidium_mobile                     |                   Status:  new
                 Type:  defect       |                Component:  avformat
             Priority:  normal       |               Resolution:
              Version:  git-master   |               Blocked By:
             Keywords:  rtsp         |  Reproduced by developer:  0
             Blocking:               |
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------

Comment (by iRidium_mobile):

 I found a problem when working in ffmpeg  with RSTP protocol. When working
 with several problem  cameras I found out that a mistake appears when
 changing low-level transport in rtsp protocol. I compared the work of
 ffmpeg and vlc  and saw that the programs behave differently when working
 with the same camera. Here is the sequence of commands (C=Client,
 S=Server)
 Case 1.
 ffmpeg
 C:OPTIONS
 S:OK
 C: DESCRIBE
 S:OK
 C:SETUP (transport = UDP)
 S: OK
 C: PLAY
 S:OK
 ... timeout 10 sec
 C: PAUSE
 S: OK
 C: SETUP (transport=TCP)
 S: OK
 vlc
 C:OPTIONS
 S:OK
 C: DESCRIBE
 S:OK
 C:SETUP (transport = UDP)
 S: OK
 C: PLAY
 S:OK
 ... timeout 10 sec
 C: TEARDOWN
 S: OK
 C:OPTIONS
 S:OK
 C: DESCRIBE
 S:OK
 C:SETUP (transport = TCP)
 S: OK
 C: PLAY
 S:OK
 S: stream (the stream goes)
 In this case if we comment in rtsp_read_packet  method in rtspdec.c file
 if (rt->server_type == RTSP_SERVER_REAL)
 In this case ffmpeg  starts to work and the stream comes.
 Case 2.
 In the second case the camera has 2 streams and a mistake appears when
 doing the SETUP command with TCP transport. The SETUP command, when
 initializing with TCP, is sent only for the first stream, it does not
 reach the second one.
 ffmpeg
 C:OPTIONS
 S:OK
 C: DESCRIBE
 S:OK
 C:SETUP (transport = UDP for stream 1)
 S: OK
 C:SETUP (transport = UDP for stream 2)
 S: OK
 C: PLAY
 S:OK
 ... timeout 10 sec
 C: PAUSE
 S: OK
 C: SETUP (transport=TCP for stream 1)
 S: OK
 Nothing happens further.
 vlc
 C:OPTIONS
 S:OK
 C: DESCRIBE
 S:OK
 C:SETUP (transport = UDP for stream 1)
 S: OK
 C:SETUP (transport = UDP for stream 2)
 S: OK
 C: PLAY
 S:OK
 ... timeout 10 sec
 C: TEARDOWN
 S: OK
 C:OPTIONS
 S:OK
 C: DESCRIBE
 S:OK
 C:SETUP (transport = TCP for stream 1)
 S: OK
 C:SETUP (transport = TCP for stream 2)
 S: OK
 C: PLAY
 S:OK
 S: stream (the stream goes)

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3781#comment:3>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list