#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 , 10 years ago
Component: | ffmpeg → undetermined |
---|
comment:2 by , 10 years ago
Component: | undetermined → avformat |
---|---|
Keywords: | rtsp added |
Resolution: | → needs_more_info |
Status: | new → closed |
Please do not hesitate to reopen this ticket if you can add more information.
comment:3 by , 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
core debug: processing request item: rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp, node: Плейлист, skip: 0 core debug: resyncing on rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp core debug: rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp is at 0 core debug: starting playback of the new playlist item core debug: resyncing on rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp core debug: rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp is at 0 core debug: creating new input thread core debug: Creating an input for 'rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp' core debug: requesting art for rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp core debug: using timeshift granularity of 50 MiB, in path 'C:\Users\Happy\AppData\Local\Temp' core debug: `rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp' gives access `rtsp' demux `' path `46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp' core debug: specified demux `any' core debug: creating demux: access='rtsp' demux='any' location='46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp' file='\\46.226.165.78:554\user=admin&password=12345&channel=2&stream=0.sdp' core debug: looking for access_demux module matching "rtsp": 12 candidates core debug: looking for meta fetcher module matching "any": 1 candidates live555 debug: version 2014.07.25 lua debug: Trying Lua scripts in C:\Users\Happy\AppData\Roaming\vlc\lua\meta\fetcher lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac core debug: no meta fetcher modules matched core debug: searching art for rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp core debug: looking for art finder module matching "any": 2 candidates lua debug: Trying Lua scripts in C:\Users\Happy\AppData\Roaming\vlc\lua\meta\art lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac lua debug: skipping script (unmatched scope) C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac core debug: no art finder modules matched core debug: looking for meta fetcher module matching "any": 1 candidates lua debug: Trying Lua scripts in C:\Users\Happy\AppData\Roaming\vlc\lua\meta\fetcher lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\fetcher\tvrage.luac core debug: using meta fetcher module "lua" core debug: removing module "lua" core debug: searching art for rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp core debug: looking for art finder module matching "any": 2 candidates lua debug: Trying Lua scripts in C:\Users\Happy\AppData\Roaming\vlc\lua\meta\art lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\00_musicbrainz.luac lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\01_googleimage.luac lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\02_frenchtv.luac lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\art\03_lastfm.luac qt4 debug: IM: Setting an input core debug: no art finder modules matched core debug: art not found for rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp live555 debug: RTP subsession 'video/H264' core debug: selecting program id=0 live555 debug: setup start: 0.000000 stop:0.000000 live555 debug: We have a timeout of 60 seconds live555 debug: spawned timeout thread live555 debug: play start: 0.000000 stop:0.000000 core debug: using access_demux module "live555" core debug: looking for decoder module matching "any": 43 candidates avcodec debug: CPU flags: 0x0107d3db avcodec debug: trying to use direct rendering avcodec debug: allowing 4 thread(s) for decoding avcodec debug: avcodec codec (H264 - MPEG-4 AVC (part 10)) started avcodec debug: using frame thread mode with 4 threads core debug: using decoder module "avcodec" core debug: looking for packetizer module matching "any": 23 candidates packetizer_h264 debug: found NAL_SPS (sps_id=0) packetizer_h264 debug: found NAL_PPS (pps_id=0 sps_id=0) core debug: using packetizer module "packetizer_h264" core debug: looking for meta reader module matching "any": 2 candidates lua debug: Trying Lua scripts in C:\Users\Happy\AppData\Roaming\vlc\lua\meta\reader lua debug: Trying Lua scripts in C:\Program Files (x86)\VideoLAN\VLC\lua\meta\reader lua debug: Trying Lua playlist script C:\Program Files (x86)\VideoLAN\VLC\lua\meta\reader\filename.luac core debug: no meta reader modules matched core debug: `rtsp://46.226.165.78:554/user=admin&password=12345&channel=2&stream=0.sdp' successfully opened live555 warning: no data received in 10s. Switching to TCP core debug: removing module "avcodec" avcodec debug: ffmpeg codec (H264 - MPEG-4 AVC (part 10)) stopped core debug: killing decoder fourcc `h264', 0 PES in FIFO core debug: removing module "packetizer_h264" core debug: Program doesn't contain anymore ES live555 debug: RTP subsession 'video/H264' core debug: looking for decoder module matching "any": 43 candidates avcodec debug: CPU flags: 0x0107d3db avcodec debug: trying to use direct rendering avcodec debug: allowing 4 thread(s) for decoding avcodec debug: avcodec codec (H264 - MPEG-4 AVC (part 10)) started avcodec debug: using frame thread mode with 4 threads core debug: using decoder module "avcodec" core debug: looking for packetizer module matching "any": 23 candidates packetizer_h264 debug: found NAL_SPS (sps_id=0) packetizer_h264 debug: found NAL_PPS (pps_id=0 sps_id=0) core debug: using packetizer module "packetizer_h264" live555 debug: setup start: 0.000000 stop:0.000000 live555 debug: play start: 0.000000 stop:0.000000 core debug: Buffering 0% core debug: Buffering 4% core debug: Buffering 8% avcodec debug: available hardware decoder output format 61 (dxva2_vld) avcodec debug: available software decoder output format 0 (yuv420p) core debug: looking for hw decoder module matching "none": 1 candidates core debug: no hw decoder modules matched core debug: Buffering 12% core debug: looking for text renderer module matching "any": 2 candidates freetype debug: Using Arial as font from file C:\WINDOWS\Fonts\arial.ttf freetype debug: Using Courier New as mono-font from file C:\WINDOWS\Fonts\cour.ttf freetype debug: using fontsize: 2 core debug: using text renderer module "freetype" core debug: looking for video filter2 module matching "any": 58 candidates swscale debug: 32x32 (32x32) chroma: YUVA -> 16x16 (16x16) chroma: RGBA with scaling using Bicubic (good quality) core debug: using video filter2 module "swscale" core debug: looking for video filter2 module matching "any": 58 candidates yuvp debug: YUVP to YUVA converter core debug: using video filter2 module "yuvp" core debug: Deinterlacing available core debug: deinterlace 0, mode blend, is_needed 0 core debug: Opening vout display wrapper core debug: looking for vout display module matching "any": 11 candidates direct3d debug: creating Vout EventThread direct3d debug: Win32VoutCreateWindow core debug: looking for vout window hwnd module matching "qt4,any": 3 candidates qt4 debug: requesting video window... qt4 debug: Video was requested 0, 0 core debug: using vout window hwnd module "qt4" direct3d debug: created video sub-window direct3d debug: Vout EventThread running direct3d debug: disabling screen saver direct3d debug: Direct3d Device: NVIDIA GeForce GTX 760 4318 4487 161 core debug: VoutDisplayEvent 'resize' 944x615 window direct3d warning: trying surface pixel format: YV12 direct3d debug: selected surface pixel format is YV12 direct3d debug: Using D3DTEXF_LINEAR for minification direct3d debug: Using D3DTEXF_LINEAR for magnification direct3d debug: Direct3D scene created successfully direct3d debug: Direct3D device adapter successfully initialized core debug: using vout display module "direct3d" core debug: original format sz 928x578, of (0,0), vsz 928x576, 4cc I420, sar 1:1, msk r0x0 g0x0 b0x0 core debug: removing module "freetype" core debug: looking for text renderer module matching "any": 2 candidates core debug: VoutDisplayEvent 'resize' 928x576 window freetype debug: Using Arial as font from file C:\WINDOWS\Fonts\arial.ttf freetype debug: Using Courier New as mono-font from file C:\WINDOWS\Fonts\cour.ttf freetype debug: using fontsize: 2 core debug: using text renderer module "freetype" avcodec warning: plane 0 not aligned avcodec warning: disabling direct rendering core debug: Buffering 16% core debug: Buffering 20% core debug: Buffering 24% core debug: End of video preroll core debug: Received first picture freetype error: Breaking unbreakable line core debug: Buffering 28% core debug: Buffering 32% core debug: Buffering 36% core debug: Buffering 40% core debug: Buffering 44% core debug: Buffering 48% core debug: Buffering 52% core debug: Buffering 56% core debug: Buffering 60% core debug: Buffering 64% core debug: Buffering 68% core debug: Buffering 72% core debug: Buffering 76% core debug: Buffering 80% core debug: Buffering 84% core debug: Buffering 88% core debug: Buffering 92% core debug: Buffering 96% core debug: Buffering 100% core debug: auto hiding mouse cursor core debug: Stream buffering done (1040 ms in 1524 ms)
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.