Skip to content

Rtsp updates#174

Merged
kylejohnson merged 3 commits intoZoneMinder:masterfrom
POKKAHOH:rtsp-updates
Oct 3, 2013
Merged

Rtsp updates#174
kylejohnson merged 3 commits intoZoneMinder:masterfrom
POKKAHOH:rtsp-updates

Conversation

@POKKAHOH
Copy link
Contributor

Hello, this is patch allow recive native rtsp H264 stream (test on hickvision).
Based on http://www.box.net/shared/cquevqnorf

@connortechnology
Copy link
Member

This appears to include absolutely everything, including my multi-server stuff. Do not merge this pull request.

@knight-of-ni
Copy link
Member

@POKKAHOH once you remove all the extra stuff from your pull request, you may want to collaborate with @chriswiggins before resubmitting it. He is working on h264 related changes in the feature-h264-storage branch. It may be more appropriate to push your changes to that branch. Issue #39 is where the current discussion is regarding this topic.

@chriswiggins
Copy link
Contributor

@POKKAHOH, this looks good. Are you able to go into a little more detail outlining exactly what you've done? As said you'll also need to fix up this pull request so that it doesn't have all the other history.

I've also noticed that in each of your commit messages you also have the patch pasted there? No need for that

@jaydio
Copy link
Contributor

jaydio commented Sep 26, 2013

This looks promising even though that I haven't checked the entire patch so far.

It might fix RTSP related issues I'm having at the moment as well.

Looking forward to see this request being merged after a quick clean-up.

Decode fragmented NAL
Understand sprop-parametr-sets
Don't check unsetted video format (zm_remote_camera_rtsp.cpp)
@POKKAHOH
Copy link
Contributor Author

once you remove all the extra stuff from your pull request,
you may want to collaborate with @chriswiggins ... in the feature-h264-storage branch.

ok, i do this ... (i hope)
@chriswiggins, you can see it?

@kylejohnson
Copy link
Member

Hi @POKKAHOH - the commit looks better this time, as it has only your one (not every commit lime before). However the software is failing to build with your commit.

The failures are these:

zm_sdp.cpp: In member function ‘AVFormatContext* SessionDescriptor::generateFormatContext() const’:

zm_sdp.cpp:342:33: error: ‘AVFormatContext’ has no member named ‘title’

zm_sdp.cpp:342:77: error: ‘AVFormatContext’ has no member named ‘title’

zm_sdp.cpp:344:33: error: ‘AVFormatContext’ has no member named ‘comment’

zm_sdp.cpp:344:79: error: ‘AVFormatContext’ has no member named ‘comment’

make[2]: *** [zm_sdp.o] Error 1

make[2]: Leaving directory `/home/travis/build/Zoninder/Zoninder/src'

make[1]: *** [all-recursive] Error 1

make[1]: Leaving directory `/home/travis/build/Zoninder/Zoninder'

make: *** [all] Error 2

The command "make" exited with 2.

Done. Your build exited with 1.

@knight-of-ni
Copy link
Member

I'm chatting with him on irc at the moment, if you'd like to join in.

Property 'title' and 'comment' not supported.
@POKKAHOH
Copy link
Contributor Author

https://travis-ci.org/ZoneMinder/ZoneMinder/builds/11864050
how to append new request to this thread?

@knight-of-ni
Copy link
Member

Your latest commit 25ff325 was automatically appended to this pull request.
Got a green check mark. Looks like we are good.

@POKKAHOH
Copy link
Contributor Author

git push origin rtsp-updates
Everything up-to-date

devil`s machine... in fact...

I think - third commit is closed request with fail...

@mastertheknife
Copy link
Contributor

Okay, this looks much better than before.
However, you are forcing ffmpeg as a required dependency for ZoneMinder in the file src/zm_ffmpeg.h
This breaks a nice feature of ZM - The ability to compile without ffmpeg at all!
I suggest you remove those #else errors and bring back the swscale error. Not everyone wants to deal with ffmpeg or needs it.

@mastertheknife
Copy link
Contributor

Okay the issues have been corrected. This looks good, but i'm personally unable to test it because i dont have any RTSP equipment.

@kylejohnson
Copy link
Member

I have an axis camera that can do an RTSP stream. Shall I merge and test?

@kylejohnson
Copy link
Member

I pulled down your branch and added the RTSP stream from my axis camera. The monitor was red and I couldn't see live streams or zones. I'll post more info shortly.

@kylejohnson
Copy link
Member

Here is what I am getting when adding my RTSP stream. If you need access to my stream for testing, let me know.

Oct  1 14:07:37 zoneminder zmc_m8[1987]: ERR [256: 00 00 01 00 00 01 b6 51 3b 02 17 20 ee c2 9c 10 9b 82 02 73 6e 77 24 ea ed dd 5f bb 4c 26 0e 29 a2 86 b0 70 d5 bc 1c 1f 89 ee 55 8e f4 26 db 23 20 61 27 b5 bf 6d 32 07 32 72 6f 37 06 05 98 05 41 ce 5d
bb 95 dd cd 38 9d da 7b 76 4e 1d b8 4a b8 16 2b bb 95 ce e5 76 9d 1b 5b f7 6d a4 aa 58 04 03 d1 c1 c4 6e 0e 05 60 c8 41 36 1c 18 77 7b b8 1e 05 1a c8 f7 57 26 e7 d8 48 e3 be e9 38 28 3b a7 bb b9 5c 57 24 e1 86 e1 ae 08 37 0b 6e 27 43 68 11 2b 81 7e e9
ee 8d ed a4 c8 5a 22 bc 07 70 ab 0f 21 24 50 bb 01 2d e5 d6 12 4e 01 01 c0 d1 86 c1 35 c1 c2 f7 4a e6 9d a7 4d f7 34 c2 bd c2 03 5e 9c db b4 e8 6e 93 af 60 72 4f 74 ab e6 02 57 69 ce e9 38 76 e3 4f dc ae 67 5b 07 1a 74 9b 6c 2f b6 d9 9d ed f7 0a 4e 1e
e6 6e 93 9b 72 bd 3c dc d3 9e e5 6b 1a 37 83 85 b4 2c 6c 0e 79]
Oct  1 14:07:37 zoneminder zmdc[1864]: INF ['zmc -m 2' stopping at 13/10/01 14:07:37]
Oct  1 14:07:38 zoneminder zmc_m8[1987]: ERR [Error while decoding frame 0]
Oct  1 14:07:38 zoneminder zmc_m8[1987]: ERR [256: 00 00 01 00 00 01 b6 59 9b 02 1b d3 ab 9b 70 e6 e1 89 df bb f7 6a 85 86 84 67 f6 f7 ec 66 7e de fd db dd de 9c 18 2d c6 2b 9f b8 65 70 48 9c ae 77 2d da 70 9b b4 c2 60 e0 b9 d3 72 27 49 ad a4 08 50 19
b1 83 81 1c 6b fd d3 72 fd b0 90 b7 dc f6 f7 bc 9b 08 03 e7 ae 5b 83 b7 05 93 b4 f5 71 5c 5b 58 7a 2e b9 b7 1b 70 fd ac 1c 29 5b 07 07 81 83 0d 95 ad 94 15 94 eb 85 8f ee d3 af 70 80 d7 33 bb 57 18 28 de 77 a1 e4 06 36 f3 ce bb 18 45 d8 0a 6f bd ee 25
db ef 00 4b 0d b0 90 3c 7b 79 17 b9 5c 8e b6 fd ad f7 32 77 da cd 35 82 ed ac 07 ad 84 82 6c 06 0a 36 31 7b 79 ed c4 ae 24 f6 eb dd 36 f0 72 c4 76 b0 70 d3 b6 db d0 9a 38 6d 82 3f d3 be b6 ff 72 dd fd 3c 22 2e 50 ad 8a 8a 9b 9d 5d d8 94 85 7d 35 0c 47
e0 85 00 cc 69 81 c0 ca a7 a7 0f 3b 6a 9e 9e e1 2b bb 93 ba 4e]
Oct  1 14:07:39 zoneminder zmc_m2[1887]: INF [Got signal 15 (Terminated), exiting]
Oct  1 14:07:39 zoneminder zmc_m8[1987]: ERR [Error while decoding frame 0]
Oct  1 14:07:40 zoneminder zmc_m8[1987]: ERR [256: 00 00 01 00 00 01 b6 5a a3 02 17 a7 dc 49 c3 8d c9 3e ea e3 bf 77 fe e9 39 9f f7 32 7e e9 7b aa c1 c4 75 b1 0c e5 d5 cc 4e 66 e7 7d ce e0 70 9c 2e e1 ae ae 57 0f 75 ee db b7 b7 bd d2 ec 26 91 ed a9 0d
b1 32 07 36 e9 b9 db e9 fa db 9d 2b db 87 27 69 e3 71 3d c3 bb 82 83 70 54 dc 0f 9b 81 73 70 8b 86 fb a6 e8 bd 8c 5d ec 67 77 23 74 f7 09 0f ef 27 8b fe e3 ba da cd 7f 74 9a c3 d2 4b a6 de 0e 30 e9 34 91 0f 75 73 ba 5b 79 ee e9 fb 58 38 99 ac 11 42 76
31 af 6f 0c 1b 51 cb fe e7 de ee 6e c6 0e 0a 5a 6c a8 04 ac 06 41 09 bd d2 b8 71 38 d6 e9 5d bb bb 9d df eb 67 d5 c1 7a 70 43 cc 23 4a d8 0e 58 e8 5b 77 aa a7 31 0a c2 b6 f9 08 dd 3f 73 b9 15 db b7 83 84 ea 24 54 54 36 0f 0f 56 8d b5 8d 76 b5 8d da 69
fb b5 fb 18 39 d5 b0 70 52 b7 41 8e 2d be b6 0b f5 f0 5c 83 89]
Oct  1 14:07:40 zoneminder zmc_m2[1887]: ERR [Select error: Interrupted system call]
Oct  1 14:07:40 zoneminder zmc_m8[1987]: ERR [Error while decoding frame 0]
Oct  1 14:07:40 zoneminder zmc_m2[1887]: ERR [Unable to read content]
Oct  1 14:07:40 zoneminder zmc_m8[1987]: ERR [256: 00 00 01 00 00 01 b6 5b 27 02 1b d5 c7 70 82 70 93 bb ee bd 8c b0 93 63 04 fb a5 fd c8 dd ab 99 b0 44 ff 71 1f 68 38 2d 5c e4 dc 2e e5 b8 1e 27 77 7b 85 27 57 5e e9 3a b5 83 8b 1c 85 83 82 80 89 85 3b
ec 34 67 fe e9 5c 28 ee 46 e9 3c f7 09 b9 dc 10 37 03 69 f7 0d b8 5e d6 2d ba 6e c9 ca ed 68 5b 00 e1 90 38 2d 5c 0c 02 cf 42 e7 09 0f dd bd 63 27 bb 5f ba 77 18 37 b7 9a ee f6 32 14 34 c1 c5 21 36 68 16 d0 71 16 ed b8 30 ae 7d cc ec 60 e2 7f bb 5d cf
bd 7f eb 65 85 a0 90 a6 0e 19 03 85 f6 b0 70 bd 8c 56 ed 56 ce ba 5b 97 77 b8 95 6c ad 90 17 6f 17 f5 ca f7 ba 6e 18 f7 6e d2 4f ba b9 6e 77 3b 9f b5 84 48 58 7a 02 81 2e eb 45 c2 50 88 16 17 2b b5 76 ee 7d d3 d4 d9 0f 01 13 86 03 d5 c8 be f7 dc cf 74
75 f0 a0 13 94 28 38 64 03 b5 b6 9b e9 f5 b5 89 58 c2 d5 b0 5f]
Oct  1 14:07:41 zoneminder zmc_m2[1887]: WAR [Attempt to extract -1 bytes of buffer, size is only 86143 bytes]
Oct  1 14:07:41 zoneminder zmc_m8[1987]: ERR [Error while decoding frame 0]
Oct  1 14:07:41 zoneminder zmc_m2[1887]: INF [Got signal 11 (Segmentation fault), crashing]
Oct  1 14:07:41 zoneminder zmdc[1864]: ERR ['zmc -m 2' exited abnormally, exit status 11]
Oct  1 14:07:44 zoneminder zmc_m8[1987]: ERR [256: 00 00 01 00 00 01 b6 5b ab 02 1b d5 dd cd ee bf b7 90 b7 8c 1b c3 1b b7 ad bd 8c e7 ff dc ee 96 e9 dc 2d b9 27 17 73 b8 31 38 ee 13 75 5b 7e e1 1b 59 db 0f c0 fc 07 b9 7b 79 dd c9 ba dd 7a 9b df 71 5c
ae 12 1a f2 dd dc 14 b8 22 b8 2d 70 62 70 ab 85 fd d5 ed ef 6b 40 0e 23 5b 07 0c 98 c2 bb 19 a6 b3 5d d3 7b 65 cf 53 9a db ee 12 1e de 75 ef ec 02 b1 8f 75 b1 95 68 cd 8c 86 e5 ba da ce 6e 7f ef dd a7 27 bb 6e ae 96 ed 58 c6 9b 58 70 72 c7 c3 da b8 38
66 09 82 8c 1c c0 a0 1c 16 3a 77 b7 25 77 73 dd 5e ee df 42 cf 1f f7 69 c3 97 ee 18 7b 95 df d9 c1 6a 58 09 2b e8 01 c9 46 21 83 78 61 ad 98 b9 dd 37 15 d7 dd 35 b7 d6 c1 c0 8c 69 0b 0d c6 a0 e2 4b 6e 73 f7 22 ec 60 e1 a6 b6 8c 1c 4a c6 09 2a 7d 0a ba
48 a7 d4 cf 0d 48 58 e8 cd 0f 7b d0 b0 f8 2a 14 31 85 7e e4 9d]
Oct  1 14:07:45 zoneminder zmdc[1864]: INF [Starting pending process, zmc -m 2]
Oct  1 14:07:45 zoneminder zmc_m8[1987]: ERR [Error while decoding frame 0]
Oct  1 14:07:47 zoneminder zmdc[1864]: INF ['zmc -m 2' starting at 13/10/01 14:07:47, pid = 2027]
Oct  1 14:07:47 zoneminder zmdc[2027]: INF ['zmc -m 2' started at 13/10/01 14:07:47]
Oct  1 14:07:48 zoneminder zmc_m8[1987]: ERR [256: 00 00 01 00 00 01 b6 5c 2f 02 1e ef b9 df ff 6f 19 7f ff ee 57 fb 88 1d db bb b8 1f 37 02 04 ea e2 b8 26 6e 36 e5 f6 8e fd 6c 34 3a ea ed fe e9 7e e1 63 76 9f 76 d8 32 7b 9d c2 81 0d ce fb bb 81 1d c3
dc 21 38 49 b9 7b a6 e8 6e 57 bd bc fb 1e 8d 7f 6c 2c 44 3e e1 01 9a 6c ef bb 0a ff d6 cd 31 8b 9e f7 0b dc be a3 7c 59 28 25 74 1c 2d b7 86 1f ff dd 7d ac 07 29 86 01 2f 53 09 81 2b 5b 1a b9 13 41 26 fb 97 74 bb 18 38 2a b7 90 fb 4e f7 0c 7f dc fb 86
b9 6b 60 b2 6b 21 67 19 ce ae 7d 7d 19 90 71 9e 89 b3 48 86 a2 fe ef 77 70 d7 5b d3 a5 51 b4 65 83 80 d8 f0 e5 a0 5c 6d 64 3f f7 31 2d 92 7a 9c ea c5 a7 a6 fd 62 d0 8d 4c 32 ce 9b 63 34 de f6 f1 63 19 27 dc ee 63 ee 45 dc 39 f6 30 8b f7 9f 6b 01 5b 78
c8 55 82 50 38 d6 ef 6f 2b 0d 49 97 c9 c6 6a 69 0b 41 24 91 4e]
Oct  1 14:07:48 zoneminder zmc_m8[1987]: ERR [Error while decoding frame 0]
Oct  1 14:07:48 zoneminder zmc_m8[1987]: ERR [256: 00 00 01 00 00 01 b6 5d 37 02 1d cf ba fb bf 63 07 0a 1a c1 c4 8d e8 ba 0b ef fe b6 77 f7 2d cb 79 5e 4e 3b 41 48 e3 83 9d de e0 84 dc 57 3f 74 dd bb 58 38 29 b1 82 30 70 29 b4 91 0e d6 45 b7 bf ee ae
8a ec 6e 18 ee ee 9b ab 9d f7 08 b8 ee 13 70 2d 70 5c dc 24 f6 b2 5b a4 e9 39 fb 78 58 c6 0e 14 b8 48 7f b8 72 b8 72 f7 4b 72 37 0e 0a 5e b6 f0 70 af fd ce b3 bf 75 f6 3e 96 a3 10 91 34 6d ef 6b 37 ee ff dc 24 33 af ec 61 27 6f 0c 7e e3 7f ff 63 68 c7
fb be e5 77 d6 cd 0a 74 34 64 56 97 5a 29 23 72 fc d3 c7 bd d5 e7 dd dc 3d ac 96 e9 d9 7b ab a1 81 7a 59 d7 56 c1 39 84 8c ff ee 75 b0 5d 75 b0 4f 53 80 b7 ea f8 41 10 79 f4 41 71 af ee 1a f2 ff ed 60 e1 93 0d 83 85 3f dd bb 91 ad 83 82 db 39 91 8f bb
c2 97 20 05 c0 38 5c 0e 14 85 55 31 58 38 9b fb 95 cc dc bf b5]
Oct  1 14:07:48 zoneminder zmc_m8[1987]: ERR [Error while decoding frame 0]
Oct  1 14:07:48 zoneminder zmc_m2[2027]: INF [Starting Capture]

@POKKAHOH
Copy link
Contributor Author

POKKAHOH commented Oct 2, 2013

@kylejohnson - 2 things
1 can i see you Log in DB?
2 let me access to this stream
You can see you mail for answer...

@kylejohnson kylejohnson mentioned this pull request Oct 2, 2013
@kylejohnson
Copy link
Member

Hi @POKKAHOH

You can access my stream here: rtsp://public:public@camera.gnulnx.net:554/axis-media/media.amp
This is an Axis Q6032-E PTZ camera with a 704x480 resolution.

Kyle

@kylejohnson
Copy link
Member

BTW I'm about to upgrade the firmware on my camera, so it might be down for the next hour.

@POKKAHOH
Copy link
Contributor Author

POKKAHOH commented Oct 3, 2013

I can`t understand... it work...
image
this is configuration
image

But zmwatch.pl terminate capture every 20-30 seconds with reasone

"Restarting capture daemon for Monitor-2, time since last capture 14 seconds (1380785373-1380785359)"

May be video delayed (in my end) ... VLC stats in 6 minutes show:

  • recived 7373 frames
  • lost 435 frames

kylejohnson added a commit that referenced this pull request Oct 3, 2013
More RTSP support, decoding fragmented NAL, understand sprop-parametr-sets

 * Can now view more RTSP streams (including newer Axis cameras)
 * Decode fragmented NAL
 * Understand sprop-parametr-sets
 * Don't check unsetted video format (zm_remote_camera_rtsp.cpp)
 * Remove #else errors for avutils/ffmpeg
@kylejohnson kylejohnson merged commit 02e1a5e into ZoneMinder:master Oct 3, 2013
@jan--m
Copy link

jan--m commented Oct 12, 2013

@POKKAHOH can you please post your zm config for the hikvision cameras? I have a DS-2CD2132-I and I'm having trouble getting a stable stream.

@POKKAHOH
Copy link
Contributor Author

 Hello... I'm sorry I did not answer immediately this link show all configuration Two points ... what version of ffmpeg you have installed? and what options are compiled when building ffmpeg? Pictures made ​​by reference toffmpeg version 0.10.2 Copyright (c) 2000-2012 the FFmpeg developers   built on Sep 25 2013 14:39:45 with gcc 4.6.3   configuration: - enable-gpl - enable-shared - enable-pthreads - enable-libfreetype - enable-swscale   libavutil 51. 35,100 / 51. 35.100   libavcodec 53. 61.100 / 53. 61.100   libavformat 53. 32,100 / 53. 32.100   libavdevice 53. 4,100 / 53. 4.100   libavfilter 2. 61.100 / 2. 61.100   libswscale 2. 1.100 / 2. 1.100   libswresample 0. 6.100 / 0. 6.100   libpostproc 52. 0.100 / 52. 0.100 12.10.2013, 18:58, "jan--m" notifications@github.com:@POKKAHOH can you please post your zm config for the hikvision cameras? I have a DS-2CD2132-I and I'm having trouble getting a stable stream.—Reply to this email directly or view it on GitHub.

@POKKAHOH
Copy link
Contributor Author

 More pictures1.26.3 - view of my test camhikvision - version DSP & firmware 12.10.2013, 18:58, "jan--m" notifications@github.com:@POKKAHOH can you please post your zm config for the hikvision cameras? I have a DS-2CD2132-I and I'm having trouble getting a stable stream.—Reply to this email directly or view it on GitHub.

@jan--m
Copy link

jan--m commented Oct 14, 2013

@POKKAHOH your config images didn't come through...can you please repost? I used puppet-zoneminder on ubuntu 12.04 so ffmpeg compiled with...

ffmpeg version N-57130-g1d4476d Copyright (c) 2000-2013 the FFmpeg developers
  built on Oct 14 2013 05:14:54 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --enable-shared --enable-swscale --enable-gpl --enable-libx264 --enable-libvpx --enable-libvorbis --enable-libtheora

For Method: RTP/RTSP with Host Path: /h264/ch1/sub/av_stream
I can get a still image in Monitor about once an hour, and the log is basically filled with...

10/14/13 07:53:14.428170 zmc_m1[8127].DB3-zm_rtp_source.cpp/357 [Getting frame]
10/14/13 07:53:14.468176 zmc_m1[8129].DB3-zm_rtp_source.cpp/117 [Packet in sequence, gap 1]
10/14/13 07:53:14.468218 zmc_m1[8129].DB3-zm_rtp_source.cpp/117 [Packet in sequence, gap 1]
10/14/13 07:53:14.468225 zmc_m1[8129].DB2-zm_rtp_source.cpp/310 [Got new frame 112, 67 bytes]
10/14/13 07:53:14.468257 zmc_m1[8127].DB3-zm_rtp_source.cpp/368 [Copied 67 bytes]
10/14/13 07:53:14.468264 zmc_m1[8127].DB3-zm_remote_camera_rtsp.cpp/257 [Read frame 67 bytes]
10/14/13 07:53:14.468321 zmc_m1[8127].ERR-zm_remote_camera_rtsp.cpp/273 [Error while decoding frame 3]
10/14/13 07:53:14.468447 zmc_m1[8127].ERR-zm_remote_camera_rtsp.cpp/274 [67: 00 00 01 09 30 8b 02 61 9a 11 11 6a 59 bf 01 d8 1c a9 65 76 cb b9 cf b3 b1 28 e2 8e fa 4c ae ea 26 2c f3 cb
cc bf b9 da 62 af 5f 1b 83 51 8a 69 7b 20 21 d0 92 40 8f a1 b1 b3 04 b1 40 3f 87 ec 3a c0 01]
10/14/13 07:53:14.468520 zmc_m1[8127].DB3-zm_rtp_source.cpp/357 [Getting frame]
10/14/13 07:53:14.509361 zmc_m1[8129].DB3-zm_rtp_source.cpp/117 [Packet in sequence, gap 1]
10/14/13 07:53:[h264 @ 0x7f218c00b000] no frame!
[h264 @ 0x7f218c00b000] no frame!
[h264 @ 0x7f218c00b000] no frame!
[h264 @ 0x7f218c00b000] no frame!
[h264 @ 0x7f218c00b000] no frame!
14.509404 zmc_m1[8129].DB3-zm_rtp_source.cpp/117 [Packet in sequence, gap 1]

For Type: Ffmpeg with Path: rtsp://admin:12345@192.168.5.240/h264/ch1/sub/av_stream
ffmpeg doesn't recognize the stream...

[rtsp @ 0x5c76880] Could not find codec parameters for stream 0 (Video: h264): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options

And ffprobe doesn't recognize it either, even if I raise the options...

# ffprobe -analyzeduration 100000000 -probesize 2000000000 rtsp://admin:12345@192.168.5.240/h264/ch1/sub/av_stream
ffprobe started on 2013-10-14 at 07:25:24
...
[rtsp @ 0x1a5ae80] UDP timeout, retrying with TCP
[rtsp @ 0x1a5ae80] method PAUSE failed: 551 Option not supported
[rtsp @ 0x1a5ae80] Could not find codec parameters for stream 0 (Video: h264): unspecified size
Consider increasing the value for the 'analyzeduration' and 'probesize' options
rtsp://admin:12345@192.168.5.240/h264/ch1/sub/av_stream: Operation not permitted

@POKKAHOH
Copy link
Contributor Author

Hello...
I'm sorry, I thought I would answer in the mail ... "this link"(#174 (comment)) - my answer @kylejohnson, pictures in bottom of this post...

According to your question, as I see FFmpeg also does not decode "H264".

I know that hikvision have its own implementation of the h264 protocol, which is different from the standard ...
They corrected this error in the firmware of 2012.
If your camera does not have the patch, you should set the camera to work with MJPEG. This will eliminate the problem, as when working with this format will decrease the load on the system.

And more ... I've never worked with asub-streams, and always used the main.

And more more ... :) if use live555 - you can decode this sub-stream?

1 26 3
hikvision

@POKKAHOH POKKAHOH deleted the rtsp-updates branch October 15, 2013 06:55
@jan--m
Copy link

jan--m commented Oct 15, 2013

Hi,

Thanks for the info!

ffmpeg was compiled with libx264 (tried both package and source) so it must have H264 support.
I got the above results with both main and sub streams.
VLC plays everything without a problem.

RTSP with the / path looks promising with about 0.5 FPS...and the following errors...

zms : ERR : Terminating, last frame sent time 10.294792 secs more than maximum of 10.000000 : zm_monitor.cpp

My firmware was released half a year ago (V5.0.0 130412) but unfortunately no MJPEG support...

video

I can feed a still image to ZM using this HTTP path: /Streaming/channels/1/picture
That gives me about 1 FPS...and the following errors...

zmc_m1 : ERR : No content boundary found in header ' image/jpeg; charset="UTF-8"' : zm_remote_camera_http.cpp

I will probably end up using a combination of ZM (for still images) and hikvision's record-to-nfs (for videos)...at least until #39 is implemented and hopefully RTSP will have better FPS by then.

@POKKAHOH
Copy link
Contributor Author

What can I say ... we need to do the normal support RTSP / RTP, my "patch" is just an adaptation of a patch of warmcat, a reference to which kindly provided @knnniggett (#39 (comment))

@knight-of-ni
Copy link
Member

@kylejohnson
Did the "Error while Decoding Frame" issue you experienced several days ago ever get resolved? I found a recent forum thread that looks very similar to that same error: http://www.zoneminder.com/forums/viewtopic.php?f=30&t=21516

Thoughts anyone?

@jan--m
Copy link

jan--m commented Oct 18, 2013

That thread looks promising...unfortunately 1.26.3 (compiled using puppet's env variables) fails for me...

FAT-zm_remote_camera_rtsp.cpp/209 [swscale does not support the codec format: ....]

Even though ffmpeg recognizes the stream...

# ffprobe rtsp://admin:12345@192.168.5.33/
ffprobe version N-55540-g93f4277 Copyright (c) 2007-2013 the FFmpeg developers
  built on Oct 18 2013 16:53:59 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
  configuration: --enable-shared --enable-swscale --enable-gpl --enable-libx264 --enable-libvpx --enable-libvorbis --enable-libtheora
  libavutil      52. 42.100 / 52. 47.100
  libavcodec     55. 28.100 / 55. 37.100
  libavformat    55. 13.102 / 55. 19.102
  libavdevice    55.  3.100 / 55.  4.100
  libavfilter     3. 82.100 /  3. 88.101
  libswscale      2.  4.100 /  2.  5.101
  libswresample   0. 17.103 /  0. 17.104
  libpostproc    52.  3.100 / 52.  3.100
Input #0, rtsp, from 'rtsp://admin:12345@192.168.5.33/':
  Metadata:
    title           : Media Presentation
  Duration: N/A, start: 0.239800, bitrate: N/A
    Stream #0:0: Video: h264 (Main), yuv420p(tv, bt709), 1280x720, 25 fps, 25 tbr, 90k tbn, 50 tbc

@POKKAHOH
Copy link
Contributor Author

@jan--m - Check your version of zoneminder, in the current master branch line 209 is commented out

@POKKAHOH
Copy link
Contributor Author

@knnniggett, I tested the patch with FFmpeg 10.2/10.4 ... The error occurs after the call after avcodec_decode_video2, may be in the current version of FFmpeg something has changed ... I can not verify this for the next week: (you'll have to wait

@mastertheknife
Copy link
Contributor

@POKKAHOH Please see bug #221

@usernomore
Copy link

I have the same isue with hickvision cameras i have 10 of them, It works perfect with live555, how about to use live555 rtsp client inbstead of ffmpeg?

@POKKAHOH
Copy link
Contributor Author

@ALL - see http://www.zoneminder.com/forums/viewtopic.php?p=81755#p81755. Now I returned from a business trip... from monday look at modern version of ffmpeg. In future planned make full support rtsp stream and some patches to NLS.

@POKKAHOH
Copy link
Contributor Author

codabiz from zm forum wrote:
"I am interested in your error problem. I wonder whether it is related to my forum topic about 'make' fails. I wrote about: avcodec_decode_video2 being only in libavcodec 54 and above.

For example, the latest Ubuntu Server 12.04.03 version has libavcodec version 53

However, avcodec.decode_video is deprecated since libavcodec54. Yet your latest ffmpeg is compiled with avcodec_decode_video2 ( in libavcodec55).

So is there an ffmpeg mismatch, or a conflict of versions going on? Just a novice thought!"

I think the reason is that ... just need to add the directive conditional compilation ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants