Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-21
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2012-01-
Has anybody gotten this to work on a dvr-h9124h? This is the unit that was sold through Woot! for a cool bill.
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2012-01-
This is Good Stuff!! I hope it'll be moderately easy to get mine going with this!
I've just received a Zmodo DVR-H9108v. It works quite well, with Net Eye (I purchased the pro), utilizing the Mobile Port setup (port 18000, defaulted to 18004).
I've not yet attempted to get ZM to see it, as I'd assume the errors I get on ./zmodopipe -v would likely not provide ZM anything useful, so I figured I'd post 'em here:
This happens whether or not I reverse the username and password, and of course, there's the same 3 errors in a row for each of the 3 channels I was using to test...
Anyhow, glad that this is in the worx... Please, let me know if there's anything I can do to help break / test!!
edit 1: I've now attempted with /tmp/zmodo rather than /dev/zmodo, as the /dev/zmodoX devices were not being created. I now get /tmp/zmodoX, but I still get the same series of errors, and do not get ANY imagery on ZM. I'd rather go with the H264 output anyhow, so I'm attempting to get a wireshark capture of the web-interface, but the only Windows (XP) machine we have in the house locks up real easy, and I've so far been unsuccessful. I'll keep trying...
I've just received a Zmodo DVR-H9108v. It works quite well, with Net Eye (I purchased the pro), utilizing the Mobile Port setup (port 18000, defaulted to 18004).
I've not yet attempted to get ZM to see it, as I'd assume the errors I get on ./zmodopipe -v would likely not provide ZM anything useful, so I figured I'd post 'em here:
Code: Select all
root@host:~/Downloads# ./zmodopipe -s 192.168.x.x -p 18000 -c 1 -c 2 -c 3 /dev/zmodo -u admin -a xxxxxx -v
Ch 1: Socket closed. Receive result: -1
Ch 1: Connect result: 0
Ch 1: Send result: 507
Anyhow, glad that this is in the worx... Please, let me know if there's anything I can do to help break / test!!
edit 1: I've now attempted with /tmp/zmodo rather than /dev/zmodo, as the /dev/zmodoX devices were not being created. I now get /tmp/zmodoX, but I still get the same series of errors, and do not get ANY imagery on ZM. I'd rather go with the H264 output anyhow, so I'm attempting to get a wireshark capture of the web-interface, but the only Windows (XP) machine we have in the house locks up real easy, and I've so far been unsuccessful. I'll keep trying...
-
- Posts: 1
- Joined: Wed May 09, 2012 10:02 pm
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2012-01-
I have a Night Owl Lion-4500 that I am trying to get to work with Zoneminder. I also have a Swann that I need to get on that I haven't tried yet, need to find the model number of it.
Anyway, here is the output from trying your work on the Night Owl.
9001 is the mobile port and is properly forwarded in the router. I also tried the web port of 82 with no luck but 82 works with tinycam monitor android app, but it does not work with the mobile port either. I tried the ip cam viewer software you got your code from but couldn't find my model in order to set it up. Any help getting it running would be appreciated. Thank you
Anyway, here is the output from trying your work on the Night Owl.
Code: Select all
sgrvp@sgrvp:~/zm$ ./zmodopipe -v -s 192.168.1.106 -p 9001 -c 1 -c 2 -u admin -a 113084 &
[1] 3862
sgrvp@sgrvp:~/zm$ Ch 1: Failed to create pipe: File exists
Ch 2: Failed to create pipe: File exists
Ch 1: Connect result: 0
000000000000000000000100000003600000000000000000000068000000010000001000000001000000010000000161646d696e0000000000000000000000000000000000000000000000000000000000313133303834000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Ch 1: Send result: 507
Ch 2: Connect result: 0
000000000000000000000100000003610000000000000000000068000000010000001000000002000000010000000161646d696e0000000000000000000000000000000000000000000000000000000000313133303834000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
Ch 2: Send result: 507
Ch 2: Socket closed. Receive result: -1
Ch 1: Socket closed. Receive result: -1
Ch 2: Connect result: -1
Ch 2: Failed to connect: Connection refused
Waiting 10 seconds.
Ch 1: Connect result: -1
Ch 1: Failed to connect: Connection refused
Waiting 10 seconds.
sgrvp@sgrvp:~/zm$ Ch 2: Connect result: -1
Ch 2: Failed to connect: Connection refused
Waiting 10 seconds.
sgrvp@sgrvp:~/zm$ Ch 1: Connect result: -1
Ch 1: Failed to connect: Connection refused
Waiting 10 seconds.
-
- Posts: 1
- Joined: Wed Aug 15, 2012 4:26 pm
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2012-01-
Thanks for all the Hard work you put into this.
I got it working like a Charm on a Night Owl Poseidon-85 system.
Note for others that have the Night Owl Poseidon. - Use the Mobile setting
./zmodopipe -s 192.168.1.250 -p 18004 -c 1 -c 2 -c 3 -u admin -a admin -m 1 &
I got it working like a Charm on a Night Owl Poseidon-85 system.
Note for others that have the Night Owl Poseidon. - Use the Mobile setting
./zmodopipe -s 192.168.1.250 -p 18004 -c 1 -c 2 -c 3 -u admin -a admin -m 1 &
-
- Posts: 2
- Joined: Thu Sep 06, 2012 3:49 am
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2012-01-
My 'Visionari' DVR is detected by IP Cam viewer as a '3rd Eye NC6200 w/ P2P Port'. The stream defaults to port 1115. Between a packet capture (pcap attached) and what I've been able to glean from taking apart the IPCamViewer apk, I have a nearly complete (I believe) patch. I keep chasing my tail on where the camera/channel number is specified. Any guidance on where/how this final gem of information is passed would be appreciated.
- Attachments
-
- dvr_capture_50.tgz
- (17.86 KiB) Downloaded 646 times
-
- Posts: 2
- Joined: Thu Sep 06, 2012 3:49 am
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2012-01-
Patch for Visionari DVR attached (against zmodopipe.c v0.3). It was very similar to the DVR8104 code but required a few minor tweaks. IWFM.
- Attachments
-
- visionari-patch.tgz
- (1.41 KiB) Downloaded 873 times
-
- Posts: 1
- Joined: Sun Oct 14, 2012 2:58 am
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2012-01-
Have we had any success on the "media" port with higher quality video? I really don't think the 320x240 "Mobile" port H.264 is that great. In the olden days we could use the "Media" port for much higher quality video but not on these ZModo DVRs for some reason.
Thanks in advance!
Thanks in advance!
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2012-01-
Excellent plugin for an already application ....
i have just purchased a Swann DVR4-1200 (4 channel) now i have installed this plugin and if i set it up with as mobile and port 18004 it works !!! but the picture is pretty poor. but when i change it to media and 640x480 (720x480) i get no picture. i have tried both media 2 and 3 and heres my output .
i have just purchased a Swann DVR4-1200 (4 channel) now i have installed this plugin and if i set it up with as mobile and port 18004 it works !!! but the picture is pretty poor. but when i change it to media and 640x480 (720x480) i get no picture. i have tried both media 2 and 3 and heres my output .
-
- Posts: 8
- Joined: Sun Oct 21, 2012 11:46 pm
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2012-01-
Has anyone tried getting this to work with a Zmodo IPCAM? Specifically, model #AJ-C2WA-C118.
-
- Posts: 1
- Joined: Thu Nov 01, 2012 7:35 pm
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2012-01-
Any help on troubleshooting? I have a Zmodo PKD-DK40107 that works well using the supplied windows software, but I'd like to use ZoneMinder. I've compiled the executable, and it runs fine but I'm not seeing anything in ZoneMinder. Here's the start of the output:
Edit: In the log files I'm seeing a lot of this:
It goes on. I'm sure it's not a permissions issue, the fifos are world readable.
Code: Select all
video@dvr:~/src/zmodo$ ./zmodopipe -s 192.168.1.14 -u admin -a admin -c 1 -c 2 -c 3 -c 4 -v -p 15961 -m 5
Ch 1: Connect result: 0
0000007001000000280004000300070048002400202020212020200000000000000000004d4f42494c4500000000000000000000000000002900380061646d696e00000000000000000000000000000000000000000000000000006e61646d696e00000000000000000000000100000000000000
Ch 1: Send result: 116
Ch 2: Connect result: 0
0000007001000000280004000300070048002400202020212020200000000000000000004d4f42494c4500000000000000000000000000002900380061646d696e00000000000000000000000000000000000000000000000000006e61646d696e00000000000000000000000100000000010000
Ch 3: Connect result: 0
Ch 2: Send result: 116
0000007001000000280004000300070048002400202020212020200000000000000000004d4f42494c4500000000000000000000000000002900380061646d696e00000000000000000000000000000000000000000000000000006e61646d696e00000000000000000000000100000000020000
Ch 4: Connect result: 0
Ch 3: Send result: 116
0000007001000000280004000300070048002400202020212020200000000000000000004d4f42494c4500000000000000000000000000002900380061646d696e00000000000000000000000000000000000000000000000000006e61646d696e00000000000000000000000100000000030000
Ch 4: Send result: 116
...................................Ch 4: Socket closed. Receive result: 0
Ch 4: Connect result: 0
Ch 4: Send result: 116
..............................................................................................................................................................
Code: Select all
2012-11-01 22:46:01.220719 zmc_m4 3683 FAT Unable to open input /tmp/zmodo1 due to: Success zm_ffmpeg_camera.cpp 95
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2012-01-
I am so glad you posted this. I have been looking for a way to integrate Zoneminder with these qsee's I have zoneminder running at home since 2008.
I have a few very basic questions, that might be insultingly obvious.
1.) Do I need to have zmodopipe.c downloaded to a specific directory?
2.) After compiling it, does the compiled code zmodopipe need to reside in a specific location.
3.) After creating a pipe do I need to restart zoneminder ?
My issues are that after running
./zmodopipe -s 10.10.10.168 -p 18600 -c 4 -u ADMIN -a 12314 &
( I have tried ports 9000 and 18600, as a command nmap -P0 -v IPADRESS yield that port 80, port 1025, port 9000, and port 23 are open)
It appears as though I connect on port 18600, as the line in the ZM Console shows the Source in green lettering.
But when I try to view a camera I get no video. Also note that the Events do not increase as I know I have movement in front of the camera.
In the forum I see other qsee users use the -m command to specify the mobile feed. I have tried both adding -m 1 and -m 4
I have a few very basic questions, that might be insultingly obvious.
1.) Do I need to have zmodopipe.c downloaded to a specific directory?
2.) After compiling it, does the compiled code zmodopipe need to reside in a specific location.
3.) After creating a pipe do I need to restart zoneminder ?
My issues are that after running
./zmodopipe -s 10.10.10.168 -p 18600 -c 4 -u ADMIN -a 12314 &
( I have tried ports 9000 and 18600, as a command nmap -P0 -v IPADRESS yield that port 80, port 1025, port 9000, and port 23 are open)
It appears as though I connect on port 18600, as the line in the ZM Console shows the Source in green lettering.
But when I try to view a camera I get no video. Also note that the Events do not increase as I know I have movement in front of the camera.
In the forum I see other qsee users use the -m command to specify the mobile feed. I have tried both adding -m 1 and -m 4
thanks for a great program
WireSharkDumpQSee QSDR16RTCB
00000000 00 00 00 01 00 00 00 19 01 00 00 00 00 00 00 00 ........ ........
00000010 00 00 00 54 61 64 6d 69 6e 00 00 00 00 00 00 00 ...Tadmi n.......
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000030 00 00 00 00 30 31 31 39 XX XX 00 00 00 00 00 00 ....0123 XX......
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001F0 00 00 00 00 ....
00000000 08 00 00 00 02 00 00 00 ........
00000010 00 00 00 54 61 64 6d 69 6e 00 00 00 00 00 00 00 ...Tadmi n.......
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000030 00 00 00 00 30 31 31 39 XX XX 00 00 00 00 00 00 ....0123 XX......
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000000F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000100 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000110 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000120 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000130 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000140 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000150 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000160 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000170 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000180 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
00000190 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ........ ........
000001F0 00 00 00 00 ....
00000000 08 00 00 00 02 00 00 00 ........
thanks for a great program
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2012-01-
The .c file or the compiled binary can be anywhere you want. I have my in my home directory.wertthey wrote:I am so glad you posted this. I have been looking for a way to integrate Zoneminder with these qsee's I have zoneminder running at home since 2008.
I have a few very basic questions, that might be insultingly obvious.
1.) Do I need to have zmodopipe.c downloaded to a specific directory?
2.) After compiling it, does the compiled code zmodopipe need to reside in a specific location.
3.) After creating a pipe do I need to restart zoneminder ?
My issues are that after running
./zmodopipe -s 10.10.10.168 -p 18600 -c 4 -u ADMIN -a 12314 &
( I have tried ports 9000 and 18600, as a command nmap -P0 -v IPADRESS yield that port 80, port 1025, port 9000, and port 23 are open)
It appears as though I connect on port 18600, as the line in the ZM Console shows the Source in green lettering.
But when I try to view a camera I get no video. Also note that the Events do not increase as I know I have movement in front of the camera.
In the forum I see other qsee users use the -m command to specify the mobile feed. I have tried both adding -m 1 and -m 4
When starting it, you shouldn't need to restart zoneminder, but you may have to disable and reenable the particular monitor(s) affected. If you are having problems, it won't hurt to restart ZM.
However before using Zoneminder, you should be able to verify it's working correctly by following the steps listed earlier, using ffmpeg.
If you are still having issues, attach the actual Wireshark pcap file from using the web interface (don't post its contents). It's easier to look at that way. You might have to ZIP it.
PS. Sorry I haven't been around. I tried to post as much as I can to allow others to work off what I've provided, in the event I stopped focusing on it. If anyone is still having issues, send me an email and I'll see what I can do.
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-
Hello all,
I've been working with zmodopipe to try and get my zmodo DVR h9118v working with zoneminder. I used it as a starting point to create a working pipe program. I'm not sure if the other DVR's work the same as mine, but I looked through some network captures and got my pipe working. I connect to the control port and it seems to report back the media port. I connect to the media port and reconnect to the control port and send what seems to be the start stream command. I can successfully capture this stream to a pipe. The pipe seems to output raw h264 but I'm not sure. I can successfully capture the pipe to a file then do the command 'ffmpeg -f h264 -i movie.mp4 movie2.mp4'. The format it finds is:
Input #0, h264, from 'movie.mp4':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 704x480, 25 fps, 25 tbr, 1200k tbn, 50 tbc
There are a bunch of errors during encoding like the following:
[h264 @ 0x7fe852025400] illegal log2_max_frame_num 2178
Despite the errors, everything converts fine and I can watch the resulting movie2.mp4 in any video program. My problem comes in when trying to wire all this up to zoneminder. I feel like I'm very close to getting this working. I set up the monitor to point to the pipe and use ffmpeg. Am I correct in thinking that if I can decode the file (stream) with the command line ffmpeg, I should be able to use this with zoneminder? I set up the monitor as source path /tmp/zm/zmodo0, source colours 24 bit, width 704, height 480, unchecked preserve aspect ratio, orientation normal. The errors I get are:
Terminating, last frame sent time 1368250029.766423 secs more than maximum of 10.000000
I assumed I could put in -f h264 as my FFMPEG_INPUT_OPTIONS and it would work just like the command line. Any pointers you can give me would be appreciated. I'm attaching my final code for zmodopipe (I did a lot of rewriting just so I could follow the code).
I've been working with zmodopipe to try and get my zmodo DVR h9118v working with zoneminder. I used it as a starting point to create a working pipe program. I'm not sure if the other DVR's work the same as mine, but I looked through some network captures and got my pipe working. I connect to the control port and it seems to report back the media port. I connect to the media port and reconnect to the control port and send what seems to be the start stream command. I can successfully capture this stream to a pipe. The pipe seems to output raw h264 but I'm not sure. I can successfully capture the pipe to a file then do the command 'ffmpeg -f h264 -i movie.mp4 movie2.mp4'. The format it finds is:
Input #0, h264, from 'movie.mp4':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 704x480, 25 fps, 25 tbr, 1200k tbn, 50 tbc
There are a bunch of errors during encoding like the following:
[h264 @ 0x7fe852025400] illegal log2_max_frame_num 2178
Despite the errors, everything converts fine and I can watch the resulting movie2.mp4 in any video program. My problem comes in when trying to wire all this up to zoneminder. I feel like I'm very close to getting this working. I set up the monitor to point to the pipe and use ffmpeg. Am I correct in thinking that if I can decode the file (stream) with the command line ffmpeg, I should be able to use this with zoneminder? I set up the monitor as source path /tmp/zm/zmodo0, source colours 24 bit, width 704, height 480, unchecked preserve aspect ratio, orientation normal. The errors I get are:
Terminating, last frame sent time 1368250029.766423 secs more than maximum of 10.000000
I assumed I could put in -f h264 as my FFMPEG_INPUT_OPTIONS and it would work just like the command line. Any pointers you can give me would be appreciated. I'm attaching my final code for zmodopipe (I did a lot of rewriting just so I could follow the code).
- Attachments
-
- zmodopipe.tgz
- Zmodo pipe rewrite for my model DVR
- (4.98 KiB) Downloaded 629 times
Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-
If you can see your cameras in ffmpeg, you should be able to see them in Zoneminder. However I noticed an weird behavior with ZM that I had to adjust for in the program.spellicer wrote:Hello all,
I've been working with zmodopipe to try and get my zmodo DVR h9118v working with zoneminder. I used it as a starting point to create a working pipe program. I'm not sure if the other DVR's work the same as mine, but I looked through some network captures and got my pipe working. I connect to the control port and it seems to report back the media port. I connect to the media port and reconnect to the control port and send what seems to be the start stream command. I can successfully capture this stream to a pipe. The pipe seems to output raw h264 but I'm not sure. I can successfully capture the pipe to a file then do the command 'ffmpeg -f h264 -i movie.mp4 movie2.mp4'. The format it finds is:
Input #0, h264, from 'movie.mp4':
Duration: N/A, bitrate: N/A
Stream #0:0: Video: h264 (Constrained Baseline), yuv420p, 704x480, 25 fps, 25 tbr, 1200k tbn, 50 tbc
There are a bunch of errors during encoding like the following:
[h264 @ 0x7fe852025400] illegal log2_max_frame_num 2178
Despite the errors, everything converts fine and I can watch the resulting movie2.mp4 in any video program. My problem comes in when trying to wire all this up to zoneminder. I feel like I'm very close to getting this working. I set up the monitor to point to the pipe and use ffmpeg. Am I correct in thinking that if I can decode the file (stream) with the command line ffmpeg, I should be able to use this with zoneminder? I set up the monitor as source path /tmp/zm/zmodo0, source colours 24 bit, width 704, height 480, unchecked preserve aspect ratio, orientation normal. The errors I get are:
Terminating, last frame sent time 1368250029.766423 secs more than maximum of 10.000000
I assumed I could put in -f h264 as my FFMPEG_INPUT_OPTIONS and it would work just like the command line. Any pointers you can give me would be appreciated. I'm attaching my final code for zmodopipe (I did a lot of rewriting just so I could follow the code).
ZM will disconnect and reconnect frequently when it starts to stream. Sometimes this confuses my program and it exits.
I adjusted for this by making sure all children are automatically restarted if they exit for some reason (unless the parent is terminated).
However this change is only in the latest version I just posted, 0.4.
If possible, see if you can add your changes into that version. You've already done the hard work by figuring out the login steps.
If you want to confirm this behavior before proceeding, you can do the following:
After starting the program, execute 'pgrep zmodopipe' or 'ps -A | grep zmodopope' to get the PIDs. You should see # channels + 1 processes (so if you only stream one channel, you'll see two processes).
Now, restart zoneminder and wait about 30 seconds, then execute the above pgrep/ps command again.
If one or more processes disappeared, or the PIDs changed, then that might be your problem.
I tried experimenting with the command-line options in the ZM settings, but I didn't notice any difference.