RTSP - Error while decoding frame 0

Forum for questions and support relating to the 1.24.x releases only.
Locked
kylejohnson
Posts: 260
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD

RTSP - Error while decoding frame 0

Post by kylejohnson »

Yao,

Trying to test an Axis Q1755 using RTSP at 1080p on ZM 1.24.2 using yesterday's checkout of ffmpeg and am having problems. I have tried at resolutions from 1920x1080 to 480x270.

This is repeated in my debug file:

Code: Select all

06/19/09 15:54:03.670853 zmc_m2[5444].ERR-zm_remote_camera_rtsp.cpp/216 [Error while decoding frame 0]
06/19/09 15:54:03.670921 zmc_m2[5444].ERR-zm_remote_camera_rtsp.cpp/217 [256: 41 9b 60 16 02 38 76 25 44 46 12 06 99 05 41 2f 56 83 09 45 46 c6 17 8c 24 64 61 20 a6 41 30 53 cb ee 05 b9 46 41 c4 a2 60 44 90 6c 10 46 61 79 06 c0 46 f5 68 14 3a b4 1d f2 fb 60 64 94 6c 0e 52 88 be af 01 23 20 d8 30 ea f0 1c 1d 5a 1e ea f0 28 f5 78 13 79 74 3c 0b 9c 96 7c 19 c4 12 37 11 1d cb b3 d7 36 f8 23 c4 41 a7 7d aa ee d3 58 62 51 91 5d 5c 82 3e 6e 9c 77 7e 92 e5 bf f7 de 36 34 b0 bf 2f 4e 2b 9b b7 1f df b4 48 9d c6 4b ef 8c c6 c4 64 e4 f7 5c 9a 1f ef d2 0a 5c 5f be c7 09 71 7d 9f 65 51 38 8e 13 d2 e9 7e f7 df 2d 7f 97 bf c5 7a f4 3c 33 37 7b e5 b7 fc 47 4a bc 25 de 87 8f e6 d8 f1 7c 97 e6 e1 3b ab b1 ed df 2f 45 5c 23 d7 d5 f9 a2 24 d2 c5 f2 d9 f2 5a 8b ef 7c 4f 36 9e 14 89 df 2f 4e 32 51 b1 3c 54 6e 91 e8 bb 1f 96 9f f0 95 07 d7 f8 c9 f6 3d 4e fb]
06/19/09 15:54:03.705349 zmc_m2[5444].ERR-zm_remote_camera_rtsp.cpp/216 [Error while decoding frame 0]
06/19/09 15:54:03.705399 zmc_m2[5444].ERR-zm_remote_camera_rtsp.cpp/217 [256: 41 9b 80 18 02 38 b9 0d 2c a3 60 14 08 a7 06 52 08 92 43 5e 22 3a c6 46 48 26 0c 7a bc 0e 52 08 80 c5 ea f0 30 f5 78 18 f1 2f d4 0b 59 e1 e9 06 41 ce 32 f1 70 2d d8 a8 16 71 b0 86 32 08 3a bc 04 27 15 d8 ec 76 38 2e 90 44 12 59 a2 39 3b 70 2b 75 69 33 c0 b5 89 97 9b d1 81 5b 9b 6b 2f 37 67 04 98 4e 08 fa bc 55 0b be 4f 57 de fb e6 a7 f1 92 75 92 75 07 fc bd bf 97 bc 5f 7e d2 e4 b2 fe 6f 7f 37 a1 8f e4 f4 30 41 cb ed 04 b9 7d dc 4e b9 bd 46 45 61 9e 5f 6b cb be 22 41 33 f1 1e cd ff 93 4f 5c dd b7 f2 f4 7c 21 e2 e5 ec e4 e5 d7 f7 43 eb bf 6b cd 49 2f d5 dc f8 22 e4 af 36 4b ea f1 38 9a ef bc 95 08 76 ca c7 37 6f cb cb e8 6f 8a f4 bb 45 88 fd ed 62 7b a7 c3 fd f6 e3 f8 4a 87 d7 8c 89 c4 f1 5c f1 97 eb e1 1b f5 fc f9 e3 34 7b 9a 5b fc 8a bf 19 3b 33 74 f3 a4 d7]
06/19/09 15:54:03.735802 zmc_m2[5444].ERR-zm_remote_camera_rtsp.cpp/216 [Error while decoding frame 0]
06/19/09 15:54:03.735850 zmc_m2[5444].ERR-zm_remote_camera_rtsp.cpp/217 [256: 41 9b a0 1a 02 38 12 e8 4c 0c fd 5a 0c 24 15 3f 37 b8 52 27 01 ef 20 d8 08 69 46 c0 7a d8 4a 01 26 94 44 07 e6 26 02 d3 3c 0b 58 99 3a b2 32 34 91 bd 5e 09 22 30 cf 27 b9 39 3d b2 f3 5f fb ef 5d fa 18 13 b9 28 7d 72 fb f9 69 7f 36 97 e4 af 27 11 ec ef f9 3d c0 a7 de 96 6e 4b f0 7f cb e9 8e ef b7 f2 69 7e ef aa ef a2 ae af 2f 7e a1 be 6f 63 f3 77 f9 7a 6c 62 79 b5 fc be 86 17 8a f1 9f 9b b5 f2 da e2 a2 72 f2 d0 fa e5 a7 c6 44 e1 6e 23 d1 a6 c7 61 be 27 d8 6d f5 17 37 a4 a2 75 08 ef 93 4f f2 7b 97 bf 66 23 9a 87 fc dd fe 5b 5c 37 cb 63 e3 f9 3b c9 cb a5 66 5e 12 f3 53 a6 fb e9 7d e9 64 8d bf 49 77 be 04 4e 4a f3 f1 f8 de 5f b6 9d 8d da f0 87 4f cc c5 bf c2 38 ed 2d 82 1f ed f8 4f c7 ef 76 1d 0f cb 4e 4f f7 a7 ae 5f 6c 18 f2 5a e1 0c 4f c9 d3 84 79 b1 f5 fe 33]
06/19/09 15:54:03.771837 zmc_m2[5444].ERR-zm_remote_camera_rtsp.cpp/216 [Error while decoding frame 0]
06/19/09 15:54:03.771885 zmc_m2[5444].ERR-zm_remote_camera_rtsp.cpp/217 [256: 41 9b c0 1c 02 38 09 1c 65 63 20 57 88 c0 77 75 68 05 ae 27 01 19 8c 81 6b 11 11 42 a0 1b ae 4e dc 05 a6 68 fe 6d f0 22 d0 88 4b 92 9f 51 18 13 f9 b6 bf 13 e9 74 65 e4 eb 04 b2 8c 82 ce 13 ef 7e b9 3d fc 9a e2 bb eb 07 dc bd b8 be 4f 69 f7 4f 8c c4 9b dc 9c 95 e1 4e 5e 7f f2 f6 e2 39 7a 07 0a 44 6a 2b 17 c4 fb 5d 0c b0 87 88 93 d9 e2 30 97 27 bf bd f5 20 cb e5 ca cd 90 fe 4c 89 13 fc 93 7e b9 ba 29 26 d4 56 4e f6 b3 c2 99 39 3d 2f 2f b8 7b 93 b7 f7 d3 8b e6 eb 3d 5c dd ff 7e c2 34 5f 9f 24 d8 be f6 b1 3d fa 40 eb 8a 84 8c 93 3d 7b b7 f8 47 5e df bf c5 57 79 e3 7f 08 43 7d 1d 69 7a 6f bf 96 66 3f c9 be a6 9a ff c9 6f 88 8a c3 72 0a 85 22 71 1c be 86 13 e4 bf f0 85 3f a1 e9 7e 23 d2 ed f8 ce c6 db 7f a1 d0 6b dc 21 76 f4 bf 6c 09 12 8a 8f e1 1e 9d e8 a4 e9 af]
The stream works fine through VLC.
Any ideas?
Kyle
kylejohnson
Posts: 260
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD

Post by kylejohnson »

Using ffmpeg, I get the following:

Code: Select all

kjohnson@kjohnson-laptop:~$ ffmpeg -i rtsp://192.168.0.104:554/axis-media/media.amp /home/kjohnson/Desktop/test.avi
FFmpeg version 0.5-svn17737+3:0.svn20090303-1ubuntu6, Copyright (c) 2000-2009 Fabrice Bellard, et al.
  configuration: --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --extra-version=svn17737+3:0.svn20090303-1ubuntu6 --prefix=/usr --enable-avfilter --enable-avfilter-lavf --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --disable-stripping --disable-vhook --enable-libdc1394 --disable-armv5te --disable-armv6 --disable-armv6t2 --disable-armvfp --disable-neon --disable-altivec --disable-vis --enable-shared --disable-static
  libavutil     49.15. 0 / 49.15. 0
  libavcodec    52.20. 0 / 52.20. 0
  libavformat   52.31. 0 / 52.31. 0
  libavdevice   52. 1. 0 / 52. 1. 0
  libavfilter    0. 4. 0 /  0. 4. 0
  libswscale     0. 7. 1 /  0. 7. 1
  libpostproc   51. 2. 0 / 51. 2. 0
  built on Apr 10 2009 23:18:41, gcc: 4.3.3
[NULL @ 0x9016220]non-existing PPS referenced
[h264 @ 0x9016220]number of reference frames exceeds max (probably corrupt input), discarding one
    Last message repeated 3 times
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 5 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq e979 expected=0fd2
[h264 @ 0x9016220]RTP: PT=60: bad cseq 0fd2 expected=e97e
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 2 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq e98d expected=0fd4
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 1 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq 0fd5 expected=e98f
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 2 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq e991 expected=0fd7
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 1 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq 0fd8 expected=e993
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 1 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq e994 expected=0fda
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 1 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq 0fdb expected=e996
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 1 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq e997 expected=0fdd
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 1 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq 0fde expected=e999
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 1 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq e99a expected=0fe0
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 1 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq 0fe1 expected=e99c
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 1 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq e99d expected=0fe3
[h264 @ 0x9016220]non-existing PPS referenced
    Last message repeated 1 times
[h264 @ 0x9016220]RTP: PT=60: bad cseq 0fe4 expected=e99f
[h264 @ 0x9016220]non-existing PPS referenced
^C
kjohnson@kjohnson-laptop:~$ 
Using mplayer, the video shows on my monitor for a second and then crashes:

Code: Select all

kjohnson@kjohnson-laptop:~$ mplayer rtsp://192.168.0.104:554/axis-media/media.amp
MPlayer 1.0rc2-4.3.3 (C) 2000-2007 MPlayer Team
CPU: Intel(R) Core(TM)2 CPU         T5600  @ 1.83GHz (Family: 6, Model: 15, Stepping: 2)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing rtsp://192.168.0.104:554/axis-media/media.amp.
Resolving 192.168.0.104 for AF_INET6...
Couldn't resolve name for AF_INET6: 192.168.0.104
Connecting to server 192.168.0.104[192.168.0.104]: 554...
rtsp_session: unsupported RTSP server. Server type is 'unknown'.
STREAM_LIVE555, URL: rtsp://192.168.0.104:554/axis-media/media.amp
Stream not seekable!
 file format detected.
Initiated "video/H264" RTP subsession on port 44584
VIDEO:  [H264]  0x0  0bpp  -2147483648.000 fps    0.0 kbps ( 0.0 kbyte/s)
xscreensaver_disable: Could not find XScreenSaver window.
GNOME screensaver disabled
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffh264] vfm: ffmpeg (FFmpeg H.264)
==========================================================================
Audio: no sound
Starting playback...
VDec: vo config request - 1440 x 1080 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 1440x1080 => 1920x1080 Planar YV12 
[ASPECT] Warning: No suitable new res found!
[ASPECT] Warning: No suitable new res found!
[ASPECT] Warning: No suitable new res found!
V:   0.0   2/  2 ??% ??% ??,?% 0 0 
GNOME screensaver enabled

Exiting... (End of file)
kjohnson@kjohnson-laptop:~$
And again, using VLC, everything works.

Any ideas?
kylejohnson
Posts: 260
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD

Post by kylejohnson »

My stream is h264 and ffmpeg was not compiled for support for that codec.
Compiled x264 from git and then recompiled ffmpeg from svn with --enable-libx264 and now I can view my stream.

Am now having another issue - the capture daemon keeps crashing. In /var/log/messages I see:

Code: Select all

zmwatch[8187]: INF [Restarting capture daemon for Monitor-1, time since last capture 8 seconds (1245875596-1245875588)]
If I check the referenced zm_debug.log file, I see the following pretty early on:

Code: Select all

06/24/09 16:33:31.325475 zmc_m1[-1].DB5-zm_ffmpeg_camera.cpp/148 [Got packet from stream 0]
06/24/09 16:33:31.330814 zmc_m1[-1].DB3-zm_ffmpeg_camera.cpp/154 [Decoded video packet at frame 94]
06/24/09 16:33:31.398572 zmc_m1[-1].DB5-zm_ffmpeg_camera.cpp/148 [Got pac[h264 @ 0x6c251d0]no picture
[h264 @ 0x6c251d0]non-existing PPS referenced
[h264 @ 0x6c251d0]no picture
[h264 @ 0x6c251d0]non-existing PPS referenced
[h264 @ 0x6c251d0]no picture
[h264 @ 0x6c251d0]non-existing PPS referenced
[h264 @ 0x6c251d0]no picture
[h264 @ 0x6c251d0]non-existing PPS referenced
ket from stream 0]
06/24/09 16:33:31.405907 zmc_m1[-1].DB3-zm_ffmpeg_camera.cpp/154 [Decoded video packet at frame 94]
06/24/09 16:33:31.472778 zmc_m1[-1].DB5-zm_ffmpeg_camera.cpp/148 [Got packet from stream 0]
06/24/09 16:33:31.477749 zmc_m1[-1].DB3-zm_ffmpeg_camera.cpp/154 [Decoded video packet at fr
After another few thousand frames, the log cuts off, and no additional information is given:

Code: Select all

06/24/09 16:34:22.660689 zmc_m1[-1].DB3-zm_ffmpeg_camera.cpp/154 [Decoded video packet at frame 910]
06/24/09 16:34:22.660741 zmc_m1[-1].DB1-zm_ffmpeg_camera.cpp/158 [Got frame 910]
06/24/09 16:34:22.724512 zmc_m1[-1].DB5-zm_ffmpeg_camera.cpp/148 [Got packet from stream 0]
06/24/09 16:34:22.728215 zmc_m1[-1].DB3-zm_ffmpeg_camera.cpp/154 [Decoded video packet at frame 911]
06/24/09 16:34:22.728263 zmc_m1[-1].DB1-zm_ffmpeg_camera.cpp/158 [Got frame 911]
06/24/09 16:34:22.777139 zmc_m1[-1].DB5-zm_ffmpeg_camera.cpp/148 [Got packet from stream 0]
06/24/09 16:34:22.780699 zmc_m1[-1].DB3-zm_ffmpeg_camera.cpp/154 [Decoded video packet at frame 912]
06/24/09 16:34:22.780743 zmc_m1[-1].DB1-zm_ffmpeg_camera.cpp/158 [Got frame 912]
06/24/09 16:34:22.843465 zmc_m1[-1].DB5-zm_ffmpeg_camera.cpp/148 [Got packet from stream 0]
06/24/09 16:34:22.846664 zmc_m1[-1].DB3-zm_ffmpeg_camera.cpp/154 [Decoded video packet at frame 913
Any ideas? I am able to view feeds, etc - they just don't stay up!
How else can I debug this issue?
Last edited by kylejohnson on Tue Jul 07, 2009 10:35 am, edited 1 time in total.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Have you made any head way on this since or are you at about the same point?
I have a couple cams here I have to gear ffmpeg up for h264 so I might be able to assist later this week.
kylejohnson
Posts: 260
Joined: Tue Aug 21, 2007 1:42 pm
Location: Baltimore, MD

Post by kylejohnson »

cordel wrote:Have you made any head way on this since or are you at about the same point?
I have a couple cams here I have to gear ffmpeg up for h264 so I might be able to assist later this week.
Turns out that my build of ffmpeg did not have libx264 support compiled in, so after building x264, rebuilding ffmpeg, and then rebuilding zm, I was able to view the rtsp stream in h264.

Now that did not necessaryly fix all of my problems. ffmpeg still reports a lot of errors while decoding h264 over rtsp, and a lot of artefacts are created in the video, but I do not believe this to be zoneminder's fault.

I have tried everything from disabling compression of h264 on the camera, to changing the 'length' (which is supposed to determine how often the II and P slices are sent - which I have read is what causes this error) to both the minimum and maximum settings, all without any noticeable affect.
User avatar
cordel
Posts: 5210
Joined: Fri Mar 05, 2004 4:47 pm
Location: /USA/Washington/Seattle

Post by cordel »

Okay good to know. I'll be going down this route shortly. If I find anything I'll post to this thread ;)
Locked