Opened 10 years ago

Closed 10 years ago

Last modified 9 years ago

#3782 closed defect (needs_more_info)

Codec problem

Reported by: iRidium_mobile Owned by:
Priority: normal Component: avformat
Version: unspecified Keywords: rtsp
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug: When using ffmpeg versions 2.1.1 and 2.2 I came across malfunction of the program with rtsp protocol.I found that ffmpeg can’t define the real codec, as sdp data have the 33 (mpegts) code, whereas data are in h264 (Mpeg 4 AVC Part 10) format.
How to reproduce:

v=0
o=- 38990265062388 38990265062388 IN IP4 192.168.1.10
a=range:npt=0-
m=video 0 RTP/AVP 33
c=IN IP4 0.0.0.0
a=rtpmap:33 H264/90000 
a=framerate:0S
a=fmtp:33 profile-level-id=42e01f; packetization-mode=1; sprop-parameter-sets=Z0LgH9sDoEkQ,aM4wpIA=
a=control:trackID=3

a=rtpmap:33 H264/90000 line definitely shows that we have h264 codec.
But the program tries to make mpeg ts format codec.
Here is a link to the camera that does not function properly:
rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp
Can you, please, help with solving the problem?

Change History (3)

comment:1 by Carl Eugen Hoyos, 10 years ago

Component: ffmpegundetermined

Please test current FFmpeg git head and provide your failing command line together with the complete, uncut console output to make this a valid ticket.

comment:2 by Carl Eugen Hoyos, 10 years ago

Component: undeterminedavformat
Keywords: rtsp added
Resolution: needs_more_info
Status: newclosed

Please do not hesitate to reopen this ticket if you can add more information.

comment:3 by Fedul, 9 years ago

the problem is still here
I have latest version of ffmpeg and latests libs
ffmpeg log:

ffmpeg -loglevel debug -rtsp_transport tcp -i 'rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp' out.ts
ffmpeg version N-76882-g13696c3 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.2 (Ubuntu 4.9.2-10ubuntu13)
  configuration: --prefix=/home/happy/ffmpeg_build --pkg-config-flags=--static --extra-cflags=-I/home/happy/ffmpeg_build/include --extra-ldflags=-L/home/happy/ffmpeg_build/lib --bindir=/home/happy/bin --enable-gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-librtmp --enable-nonfree
  libavutil      55.  9.100 / 55.  9.100
  libavcodec     57. 16.100 / 57. 16.100
  libavformat    57. 19.100 / 57. 19.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 17.100 /  6. 17.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.101 /  2.  0.101
  libpostproc    54.  0.100 / 54.  0.100
Splitting the commandline.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging level) with argument 'debug'.
Reading option '-rtsp_transport' ... matched as AVOption 'rtsp_transport' with argument 'tcp'.
Reading option '-i' ... matched as input file with argument 'rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp'.
Reading option 'out.ts' ... matched as output file.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option loglevel (set logging level) with argument debug.
Successfully parsed a group of options.
Parsing a group of options: input file rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp.
Successfully parsed a group of options.
Opening an input file: rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp.
[rtsp @ 0x2724760] SDP:
v=0
o=- 38990265062388 38990265062388 IN IP4 192.168.1.15
a=range:npt=0-
m=video 0 RTP/AVP 33
c=IN IP4 0.0.0.0
a=rtpmap:33 H264/90000
a=framerate:0S
a=fmtp:33 profile-level-id=42e01f; packetization-mode=1; sprop-parameter-sets=Z0LgH9sDoEkQ,aM4wpIA=
a=control:trackID=3

Failed to parse interval end specification ''
setting jitter buffer size to 0
[rtsp @ 0x2724760] hello state=0
[rtsp @ 0x2724760] Continuity check failed for pid 743 expected 3 got 7
[rtsp @ 0x2724760] Continuity check failed for pid 348 expected 6 got 2
[rtsp @ 0x2724760] Continuity check failed for pid 696 expected 2 got 8
[rtsp @ 0x2724760] Continuity check failed for pid 1763 expected 1 got 15
[rtsp @ 0x2724760] Continuity check failed for pid 1829 expected 1 got 14
[rtsp @ 0x2724760] Continuity check failed for pid 296 expected 10 got 2
.....

and many same lines until pressed ctrl-x

In VLC player on windows 10 this stream play fine.
VLS debug log:

Opening connection to 46.226.165.78, port 554...
...remote connection opened
Sending request: OPTIONS rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)


Received 141 new bytes of response data.
Received a complete OPTIONS response:
RTSP/1.0 200 OK
Content-Length: 72
Server: H264DVR 1.0
cseq: 2

Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, GET_PARAMETER, PLAY, PAUSE

Sending request: DESCRIBE rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp RTSP/1.0
CSeq: 3
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Accept: application/sdp


Received 556 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
Content-Length: 279
Content-Type: application/sdp
Server: H264DVR 1.0
cseq: 3
Content-Base: rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp
Cache-Control: private
x-Accept-Retransmit: our-retransmit
x-Accept-Dynamic-Rate: 1

v=0
o=- 38990265062388 38990265062388 IN IP4 192.168.1.15
a=range:npt=0-
m=video 0 RTP/AVP 33
c=IN IP4 0.0.0.0
a=rtpmap:33 H264/90000
a=framerate:0S
a=fmtp:33 profile-level-id=42e01f; packetization-mode=1; sprop-parameter-sets=Z0LgH9sDoEkQ,aM4wpIA=
a=control:trackID=3

Sending request: SETUP rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp/trackID=3 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Transport: RTP/AVP;unicast;client_port=58230-58231


Received 260 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
Content-Length: 0
Server: H264DVR 1.0
cseq: 4
Session: 510274120;timeout=60
Transport: RTP/AVP;unicast;mode=PLAY;source=192.168.1.15;client_port=58230-58231;server_port=6970-6971;ssrc=00001BCC
Cache-Control: private
x-Dynamic-Rate: 1


Sending request: PLAY rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp RTSP/1.0
CSeq: 5
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Session: 510274120
Range: npt=0.000-


Received 105 new bytes of response data.
Received a complete PLAY response:
RTSP/1.0 200 OK
Content-Length: 0
Server: H264DVR 1.0
cseq: 5
Range: npt=now-
Session: 510274120


Sending request: GET_PARAMETER rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp RTSP/1.0
CSeq: 6
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Session: 510274120


Received 68 new bytes of response data.
Received a complete GET_PARAMETER response:
RTSP/1.0 200 OK
Content-Length: 0
Server: H264DVR 1.0
cseq: 6


Sending request: TEARDOWN rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp RTSP/1.0
CSeq: 7
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Session: 510274120


Opening connection to 46.226.165.78, port 554...
...remote connection opened
Sending request: OPTIONS rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp RTSP/1.0
CSeq: 2
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)


Received 141 new bytes of response data.
Received a complete OPTIONS response:
RTSP/1.0 200 OK
Content-Length: 72
Server: H264DVR 1.0
cseq: 2

Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, GET_PARAMETER, PLAY, PAUSE

Sending request: DESCRIBE rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp RTSP/1.0
CSeq: 3
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Accept: application/sdp


Received 556 new bytes of response data.
Received a complete DESCRIBE response:
RTSP/1.0 200 OK
Content-Length: 279
Content-Type: application/sdp
Server: H264DVR 1.0
cseq: 3
Content-Base: rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp
Cache-Control: private
x-Accept-Retransmit: our-retransmit
x-Accept-Dynamic-Rate: 1

v=0
o=- 38990265062388 38990265062388 IN IP4 192.168.1.15
a=range:npt=0-
m=video 0 RTP/AVP 33
c=IN IP4 0.0.0.0
a=rtpmap:33 H264/90000
a=framerate:0S
a=fmtp:33 profile-level-id=42e01f; packetization-mode=1; sprop-parameter-sets=Z0LgH9sDoEkQ,aM4wpIA=
a=control:trackID=3

Sending request: SETUP rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp/trackID=3 RTSP/1.0
CSeq: 4
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Transport: RTP/AVP/TCP;unicast;interleaved=0-1


Received 200 new bytes of response data.
Received a complete SETUP response:
RTSP/1.0 200 OK
Content-Length: 0
Server: H264DVR 1.0
cseq: 4
Session: 510286890;timeout=60
Transport: RTP/AVP/TCP;unicast;interleaved=0-1;mode=PLAY
Cache-Control: private
x-Dynamic-Rate: 1


Sending request: PLAY rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp RTSP/1.0
CSeq: 5
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Session: 510286890
Range: npt=0.000-


Received a complete PLAY response:
RTSP/1.0 200 OK
Content-Length: 0
Server: H264DVR 1.0
cseq: 5
Range: npt=now-
Session: 510286890


Sending request: TEARDOWN rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp RTSP/1.0
CSeq: 6
User-Agent: LibVLC/2.2.1 (LIVE555 Streaming Media v2014.07.25)
Session: 510286890
Version 0, edited 9 years ago by Fedul (next)
Note: See TracTickets for help on using tickets.