Opened 9 years ago

Last modified 9 years ago

#1696 new defect

can't access rtmp stream from AXIS camera (h264)

Reported by: lars.taeuber@… Owned by: reimar
Priority: normal Component: streaming
Version: HEAD Severity: normal
Keywords: Cc: compn
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

I have some AXIS P1344 Network Cameras that produce h264 rtmp streams.

mplayer can't access this stream.

this command line:
$ mplayer -v -dumpstream rtsp://user:passwd@192.168.2.243/axis-media/media.amp
MPlayer SVN-r31151-4.4.3 (C) 2000-2010 MPlayer Team
CPU vendor name: AuthenticAMD max cpuid level: 5
CPU: AMD Phenom(tm) II X3 720 Processor (Family: 16, Model: 4, Stepping: 2)
extended cpuid-level: 27
extended cache-info: 33587520
Detected cache-line size is 64 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNowExt: 1 SSE: 1 SSE2: 1 SSSE3: 0
Kompiliert für x86 CPU mit folgenden Erweiterungen: MMX MMX2 3DNow 3DNowExt SSE SSE2 CMOV
get_path('codecs.conf') -> '/home/elte/.mplayer/codecs.conf'
Lese /home/elte/.mplayer/codecs.conf: Kann '/home/elte/.mplayer/codecs.conf' nicht öffnen: No such file or directory
Lese /usr/local/etc/mplayer/codecs.conf: Kann '/usr/local/etc/mplayer/codecs.conf' nicht öffnen: No such file or directory
Benutze eingebaute Standardwerte für codecs.conf.
Configuration: --language=de,en --enable-debug=3
Kommandozeile: '-v' '-dumpstream' 'rtsp://user:passwd@192.168.2.243/axis-media/media.amp'
init_freetype
Using MMX (with tiny bit MMX2) Optimized OnScreenDisplay?
get_path('fonts') -> '/home/elte/.mplayer/fonts'
Using nanosleep() timing
get_path('input.conf') -> '/home/elte/.mplayer/input.conf'
Can't open input config file /home/elte/.mplayer/input.conf: No such file or directory
Can't open input config file /usr/local/etc/mplayer/input.conf: No such file or directory
Falling back on default (hardcoded) input config
get_path('media.amp.conf') -> '/home/elte/.mplayer/media.amp.conf'

Spiele rtsp://user:passwd@192.168.2.243/axis-media/media.amp.
get_path('sub/') -> '/home/elte/.mplayer/sub/'
STREAM_RTSP, URL: rtsp://user:passwd@192.168.2.243/axis-media/media.amp
Filename for url is now rtsp://user:passwd@192.168.2.243/axis-media/media.amp
Filename for url is now rtsp://user:passwd@192.168.2.243/axis-media/media.amp
Löse 192.168.2.243 auf für AF_INET6...
Konnte Namen für AF_INET6 nicht auflösen: 192.168.2.243
Verbinde mit Server 192.168.2.243[192.168.2.243]:554 ...
SDP:
v=0
o=- 1273497490858759 1273497490858759 IN IP4 192.168.2.243
s=Media Presentation
e=NONE
c=IN IP4 0.0.0.0
b=AS:50000
t=0 0
a=control:*
a=range:npt=0.000000-
m=video 0 RTP/AVP 96
b=AS:50000
a=framerate:25.0
a=control:trackID=1
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1; profile-level-id=420029; sprop-parameter-sets=Z0IAKeKQCgDLYC3AQEBpB4kRUA==,aM48gA==

rtsp_session: unsupported RTSP server. Server type is 'unknown'.
Filename for url is now rtsp://user:passwd@192.168.2.243/axis-media/media.amp
Filename for url is now rtsp://user:passwd@192.168.2.243/axis-media/media.amp
STREAM_HTTP(2), URL: rtsp://user:passwd@192.168.2.243/axis-media/media.amp
Löse 192.168.2.243 auf für AF_INET6...
Konnte Namen für AF_INET6 nicht auflösen: 192.168.2.243
Verbinde mit Server 192.168.2.243[192.168.2.243]:80 ...
--- HTTP DEBUG HEADER --- START ---
protocol: [HTTP/1.0]
http minor version: [0]
uri: [(null)]
method: [(null)]
status code: [200]
reason phrase: [OK]
body size: [26]
Fields:

0 - Content-Type: text/plain
1 - Date: Mon, 10 May 2010 13:18:10 GMT
2 - Content-Length: 26

--- HTTP DEBUG HEADER --- END ---
Content-Length: [26]
Content-Type: [text/plain]
Cache-Größe auf 320 KByte gesetzt.
STREAM: [null] rtsp://user:passwd@192.168.2.243/axis-media/media.amp
STREAM: Description: http streaming
STREAM: Author: Bertrand, Albeu, Arpi? who?
STREAM: Comment: plain http, also used as fallback for many other protocols
Stream not seekable!
Core dumped ;)
vo: x11 uninit called but X11 not initialized..

Beenden... (Dateiende erreicht)

produces this dump:
$ cat stream.dump
No session ID specified.
$

ffplay is able display the stream:
~$ ffplay rtsp://user:passwd@192.168.2.243/axis-media/media.amp
FFplay version SVN-r22976, Copyright (c) 2003-2010 the FFmpeg developers

built on Apr 27 2010 14:51:04 with gcc 4.4.1
configuration: --enable-gpl --enable-shared --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libgsm --enable-libspeex --enable-libvorbis --enable-pthreads --enable-libxvid --enable-libmp3lame --enable-libfaadbin --arch=x86_64 --enable-avfilter
libavutil 50.14. 0 / 50.14. 0
libavcodec 52.66. 0 / 52.66. 0
libavformat 52.61. 0 / 52.61. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.10. 0 / 0.10. 0

[h264 @ 0x20aded0]non-existing PPS referenced

Last message repeated 170 times

[rtsp @ 0x20a9180]Estimating duration from bitrate, this may be inaccurate
Input #0, rtsp, from 'rtsp://user:passwd@192.168.2.243/axis-media/media.amp':

Metadata:

title : Media Presentation

Duration: N/A, start: 0.257789, bitrate: N/A

Stream #0.0: Video: h264, yuv420p, 1280x800 [PAR 1:1 DAR 8:5], 90k tbr, 90k tbn, 180k tbc

0.01 A-V: 0.000 s:2.4 aq= 0KB vq= 46KB sq= 0B f=0/48 /0

ffmpeg says:
$ ffmpeg -i rtsp://user:passwd@192.168.2.243/axis-media/media.amp 1.avi
FFmpeg version SVN-r22976, Copyright (c) 2000-2010 the FFmpeg developers

built on Apr 27 2010 14:51:04 with gcc 4.4.1
configuration: --enable-gpl --enable-shared --enable-libdirac --enable-libschroedinger --enable-libopenjpeg --enable-libgsm --enable-libspeex --enable-libvorbis --enable-pthreads --enable-libxvid --enable-libmp3lame --enable-libfaadbin --arch=x86_64 --enable-avfilter
libavutil 50.14. 0 / 50.14. 0
libavcodec 52.66. 0 / 52.66. 0
libavformat 52.61. 0 / 52.61. 0
libavdevice 52. 2. 0 / 52. 2. 0
libavfilter 1.19. 0 / 1.19. 0
libswscale 0.10. 0 / 0.10. 0

[h264 @ 0x7346e0]non-existing PPS referenced

Last message repeated 185 times

[rtsp @ 0x731640]Estimating duration from bitrate, this may be inaccurate

Seems stream 0 codec frame rate differs from container frame rate: 180000.00 (180000/1) -> 90000.00 (180000/2)
Input #0, rtsp, from 'rtsp://user:passwd@192.168.2.243/axis-media/media.amp':

Metadata:

title : Media Presentation

Duration: N/A, start: 0.299078, bitrate: N/A

Stream #0.0: Video: h264, yuv420p, 1280x800 [PAR 1:1 DAR 8:5], 90k tbr, 90k tbn, 180k tbc

File '1.avi' already exists. Overwrite ? [y/N] y
[mpeg4 @ 0x736530]removing common factors from framerate
[mpeg4 @ 0x736530]timebase not supported by mpeg 4 standard
Output #0, avi, to '1.avi':

Stream #0.0: Video: mpeg4, yuv420p, 1280x800 [PAR 1:1 DAR 8:5], q=2-31, 200 kb/s, 90k tbn, 90k tbc

Stream mapping:

Stream #0.0 -> #0.0

Error while opening encoder for output stream #0.0 - maybe incorrect parameters such as bit_rate, rate, width or height

I can temporarily give some developers access to a cam if you contact me personaly.

Best regards
Lars

Change History (4)

comment:1 Changed 9 years ago by compn

newest svn can use mplayer ffmpeg://rtsp://... to use ffmpeg's network stack...

comment:2 Changed 9 years ago by lars.taeuber@…

Hi,

this seems not to work in combination with »-dumpstream«-option.

Lars

comment:3 Changed 9 years ago by compn

  • Cc patriotact@… added

you might want to try rtmpdump to save your camera videos.
also ffmpeg -acodec copy -vcodec copy -i rtmp://... out.flv should also work.
maybe mencoder -oac copy -ovc copy ffmpeg://rtmp://... -of lavf -o out.flv , but probably have issues.

comment:4 Changed 9 years ago by compn

  • Owner changed from r_togni@… to reimar
Note: See TracTickets for help on using tickets.