Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-21

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
dookie
Posts: 6
Joined: Thu Oct 10, 2013 3:24 pm

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-

Post by dookie »

so I have not made much additional headway. After painfully trying to go through the IPCAM viewer app, I sort of understand what it is doing with the data stream.. Basically, it is searching for some identifiers in the packets. If it finds those, it looks for another identifier, which is then used to determine a how many bytes to skip in the message. basically, I think it's removing the header info put onto the H264 packets.

I have tried to implement this, but the video is still only updating every 15 seconds or so in zoneminder.

Now, the interesting part is that I decided to use avconv instead of ffmpeg to generate a file from the pipe, and the image is significantly better. (avconv -i /tmp/zmodo3 out.mp4 generates an mp4 file that is actually watchable, although far far far from perfect. I'm starting to wonder if the ffmpeg usage in zoneminder is outdated or whatnot. I'm sure that the data dumped into the pipe is still somehow wrong.
wolfinoxhide
Posts: 1
Joined: Mon Dec 30, 2013 2:07 am

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-

Post by wolfinoxhide »

Greetings, and first of all thanks to the author of this zmodopipe software.

I am not sure this falls under the proper scope of zmodopipe usage, but it seems this thread is about the only place to ask for help.
I am attempting to use zmodopipe for a slightly different purpose than with zoneminder, which I believe should work, and am having problems.

I do not have zoneminder installed on my laptop because I do not want a webserver running on it. (When another computer is available, I do plan on using zmodopipe and zoneminder on it)
For now, the zmodo device is sufficient for my needs of recording security camera footage. However, it is in another physical building and not easily accessible, especially via linux.
So I would like to be able to intermittently pull up live camera footage on my laptop for casual observation, i.e., not having to leave my desk and look out the door every time the dog barks to see if I have visitors.

I have successfully made zmodopipe connect to my DVR and when I use the -v command line option, I see a steady and reliable series of dots to indicate progress.
(zmodopipe works! thank you very much!)

I then attempt to view the fifo pipe with VLC, and initially I get footage. However, after a few seconds this footage stops and I see an interruption reported in the terminal where zmodopipe is running.
VLC closes and the zmodopipe dot progress resumes.

Code: Select all

Ch 2: Received signal: 13
Ch 3: Pipe closed: Broken pipe
Ch 2: Ch 3: Connect result: 0
Ch 2: Ch 3: Send result: 68
If I use -t 10 in the zmodopipe command line, it seems to circumvent this failure for a short time, but VLC eventually still bails after a minute or couple minutes.
In my observation, when I have tried to use ffmpeg between the two (and I really don't know how to properly), the progress dots in the zmodopipe terminal stop, or stop and restart, and I haven't been able to get anything else to work. Everything I try "stops the dots" and yields no playback, and/or yields ffmpeg errors, except for one combination of VLC and zmodopipe.
Even when I just try to use ffmpeg to make a playable video file, it suffers from the "stop the dots" failure.
First suspicion is that two programs are somehow fighting over the /tmp/zmodo2 file, but I don't know if that's really what is happening.

Here is the command line that I use when starting zmodopipe

Code: Select all

./zmodopipe -s 192.168.1.100 -p 18600 -c 2 -c 3 -n zmodo -u mobile -a 123456 -m 1 -t 10 -v
with it's output, which is consistently a repettiion as follows:

Code: Select all

Ch 2: Ch 3: Connect result: 0
Ch 2: Ch 3: Send result: 68
..............................................................Main: Child 8119 returned: 14
Ch 3: Failed to create pipe: File exists
Ch 2: Ch 3: Connect result: 0
Ch 2: Ch 3: Send result: 68
and here is the command line that I use to view it via VLC

Code: Select all

vlc --demux h264 /tmp/zmodo2
with it's output, which is always similar to:

Code: Select all

VLC media player 2.0.3 Twoflower (revision 2.0.2-93-g77aa89e)
[0x21ba108] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
[0x326c9e8] h264 demux error: this doesn't look like a H264 ES stream, continuing anyway
[0x3295a18] main input error: Invalid PCR value in ES_OUT_SET_(GROUP_)PCR !
[h264 @ 0x3f79220] slice type too large (2) at 0 0
[h264 @ 0x3f79220] decode_slice_header error
[h264 @ 0x3f79220] no frame!
[0x3295a18] main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 705 ms)
[0x3295a18] main input error: ES_OUT_RESET_PCR called
[0x3295a18] main input error: ES_OUT_SET_(GROUP_)PCR  is called too late (pts_delay increased to 754 ms)
[0x3295a18] main input error: ES_OUT_RESET_PCR called
[h264 @ 0x3f78d80] slice type too large (2) at 0 0
[h264 @ 0x3f78d80] decode_slice_header error
[h264 @ 0x3f78d80] no frame!
How can I correct this, or is there a more reliable way to use zmodopipe to play a stream into a simple video player?
I do not require playback via VLC in particular, it could be any player that works on Debian 7 as far as I am concerned.
I would like the option of leaving it streaming for long periods of time, for example as I watch TV or read a book, instead of just a minute or two before it crashes.

Again, thanks to the author, and to anyone who can instruct me.
toprunner2786
Posts: 1
Joined: Wed Feb 19, 2014 4:53 pm

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-

Post by toprunner2786 »

I know that this is an old thread, but does anyone have any confirmation or guess if the Zmodo PKD-DK8002 8-Channel system will work with this tool?

I'm a total noob, and want to set up a system....they are on sale at woot today, and thought this might be an easy way for me to get my feet wet?

If anyone could weigh in today before they sell out, that would be AMAZING!!!! thanks in advance!
thefuzz4
Posts: 28
Joined: Sat Mar 01, 2014 5:43 am

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-

Post by thefuzz4 »

toprunner2786 wrote:I know that this is an old thread, but does anyone have any confirmation or guess if the Zmodo PKD-DK8002 8-Channel system will work with this tool?

I'm a total noob, and want to set up a system....they are on sale at woot today, and thought this might be an easy way for me to get my feet wet?

If anyone could weigh in today before they sell out, that would be AMAZING!!!! thanks in advance!

So I purchased that system from Woot. Overall I'm not entirely thrilled with it but its working. I did use the zmodpipe and it works great. Its wonderful to be able to see my feeds on my linux box. I had to put in a cron job to have zoneminder bounce every hour. If I leave it up for a long period of time then the feed will go red so by bouncing the service every hour then it works just fine. Thanks.
Morshu9001
Posts: 2
Joined: Fri Apr 25, 2014 4:20 am

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-

Post by Morshu9001 »

If we wish to view the stream with VLC, are we supposed to simply open the file with it? Or do we have to specify additional parameters in VLC? It's not working for me.
Morshu9001
Posts: 2
Joined: Fri Apr 25, 2014 4:20 am

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-

Post by Morshu9001 »

thefuzz4 wrote:
toprunner2786 wrote:I know that this is an old thread, but does anyone have any confirmation or guess if the Zmodo PKD-DK8002 8-Channel system will work with this tool?

I'm a total noob, and want to set up a system....they are on sale at woot today, and thought this might be an easy way for me to get my feet wet?

If anyone could weigh in today before they sell out, that would be AMAZING!!!! thanks in advance!

So I purchased that system from Woot. Overall I'm not entirely thrilled with it but its working. I did use the zmodpipe and it works great. Its wonderful to be able to see my feeds on my linux box. I had to put in a cron job to have zoneminder bounce every hour. If I leave it up for a long period of time then the feed will go red so by bouncing the service every hour then it works just fine. Thanks.
Which mode did you specify to get it working with that system? I have the same system, but I am having trouble connecting.
EnergySmithe
Posts: 2
Joined: Thu May 15, 2014 7:32 pm

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-

Post by EnergySmithe »

I know this post is getting long in the tooth, but wondering if anyone ever got this to work for the ZModo H9108V DVR?
For me with the most recent zmodopipe it seems to be close to working with -m 5 and -p 9000 but I am seeing this in verbose mode:

$ ./zmodopipe -s 192.168.1.133 -p 9000 -c 3 -v -m 5 -u Admin -a password
Ch 3: Connect result: 0
00000070010000002800040003000700480*************2020200000000000000000004d4f4249**450000000000000000000000000000*************d696e0000000000000000000000000000000000000000000000000000*******************000000000000000100000000020000
Ch 3: Send result: 116
Ch 3: Socket closed. Receive result: 0
Ch 3: Connect result: 0
Ch 3: Send result: 116

It seems to create a /tmp/zmodo2 pipe, but it is zero length always and nothing is showing up in zoneminder. Any advice would be greatly appreciated!
EnergySmithe
Posts: 2
Joined: Thu May 15, 2014 7:32 pm

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-

Post by EnergySmithe »

Just wanted to comment on confusion about the ZModo H9108V versions and ports. I was looking through this forum and elsewhere at users and kept seeing people with this same model referencing different ports. *** Don't want to take this off on a tangent, but suffice it to say there are several different versions of this same unit that have very different UI, different ports and possibly different auth handshake/stream characteristics. I have a couple BRN-DD-SBN8 / H9108V that use port 9000 and and 15961 - I am am able to get a packet capture created if there is someone who understands what to look for / how to examine them to see what the differences are for these units. Thanks!
shelbymustang
Posts: 2
Joined: Wed Apr 02, 2014 11:13 am

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-

Post by shelbymustang »

When the initial zmodopipe (v41) is compiled and/or configured and you have a need to edit or reconfigure it for the sake of
experimentation will the compile process rewrite it or is there a need to go in and delete files? Or is there a specific edit function to do so?

I am running zoneminder on a 14.04 server and yes I am a linux noob.
thefuzz4
Posts: 28
Joined: Sat Mar 01, 2014 5:43 am

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-

Post by thefuzz4 »

So this has been working great for me with my setup. The only thing is the process will occasionally crap out. So today I finally got my nagios system at home to watch for the 9 processes created by zmodopipe. If for any reason it sees anything less than that, nagios goes in, kills the remaining processes with a pkill zmodopipe then it restarts the zmodopipe processes and restarts zoneminder. I've found that restarting zoneminder seems to help it pick up the new feeds. Before when I wasn't restarting zoneminder it would be hit and miss as to whether or not it picked up the new feeds. We'll see how well this works as the wife wasn't totally thrilled when zoneminder wasn't working right. Now the next step in my journey is to get this to work with MythTV. They have a plugin and I've messed with it some but I couldn't get it to see the streams. The Zmodo DVR is still working great but those cams that came with it are fairly crappy so I think I'm going to be updating a few of them here soon to some 600TVL's in order to get a more clear picture.
thefuzz4
Posts: 28
Joined: Sat Mar 01, 2014 5:43 am

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-

Post by thefuzz4 »

Morshu9001 wrote:
thefuzz4 wrote:
toprunner2786 wrote:I know that this is an old thread, but does anyone have any confirmation or guess if the Zmodo PKD-DK8002 8-Channel system will work with this tool?

I'm a total noob, and want to set up a system....they are on sale at woot today, and thought this might be an easy way for me to get my feet wet?

If anyone could weigh in today before they sell out, that would be AMAZING!!!! thanks in advance!

So I purchased that system from Woot. Overall I'm not entirely thrilled with it but its working. I did use the zmodpipe and it works great. Its wonderful to be able to see my feeds on my linux box. I had to put in a cron job to have zoneminder bounce every hour. If I leave it up for a long period of time then the feed will go red so by bouncing the service every hour then it works just fine. Thanks.
Which mode did you specify to get it working with that system? I have the same system, but I am having trouble connecting.

I'm sorry for the delayed response on this but I'm using -m2
Kaal
Posts: 2
Joined: Sun Aug 30, 2015 5:10 pm

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-

Post by Kaal »

Is this project dead? I really need this to my Konig SAS-DVR1004 what wont support streaming to another platforms. Also I can provide wireshark log if some1 willing to help out.

-EDIT-
Got it working in Konig DVR-04D1(Hardware DM-170A)

Code: Select all

./zmodopipeMonoPriceMod -s 192.***.***.*** -p 18004 -v -c 1 -c 2 -u user -a password -m 7
but it gives me this error

Code: Select all

Ch 1: Reader isn't reading fast enough, discarding data. Not enough processing power?
.Ch 0: 
Ch 1: Reader isn't reading fast enough, discarding data. Not enough processing power?
.Ch 1: 
Ch 2: Reader isn't reading fast enough, discarding data. Not enough processing power?
.Ch 1: 
Ch 2: Reader isn't reading fast enough, discarding data. Not enough processing power?
.Ch 1: 
Ch 2: Reader isn't reading fast enough, discarding data. Not enough processing power?
.Ch 1: 
any way to fix this?
itguy1234
Posts: 1
Joined: Tue Dec 08, 2015 4:19 am

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-21

Post by itguy1234 »

So I have tried all of the options on this thread for my ZMD-DD-SAN8 with no luck. I have however accessed the root OS of the DVR and I would love to have some insight on how to hack it and/or load ffmpeg on it to create a rtsp stream. I would be happy to work with someone if they feel like messing with the code on the box. Thoughts?
driv3r
Posts: 3
Joined: Sat Jan 02, 2016 7:47 pm

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-21

Post by driv3r »

Hello,

i running Zoneminder v1.26.5 on Ubuntu 14.04.1 LTS an the zmodopipe doesn´t work for me.
I have compiled misc versions but all only show me the usage notice after execution:

root@linux:/share# ./zmodopipe -s 192.168.178.100 -p 8888 -c 1 -v -u admin -p password
Usage: ./zmodopipe [options]

Where [options] is one of:

-s <string> IP to connect to
-t <int> Send a timer interrupt every x seconds.
-p <int> Port number to connect to
-c <int> Channels to stream (can be specified multiple times)
-n <string> Base filename of pipe (ch# will be appended)
-v Verbose output
-u <string> Username
-a <string> Password
-m <int> Mode to use (ie. mobile/media)
1 - Use mobile port (safest, default)
2 - Use media port (Works for some models, ie. Zmodo 9104)
3 - Use media port w/header (Other models, please test)
4 - Use QT5 family (ie. QT504, QT528)
5 - Zmodo DVR-8104UV compatible (also DVR-8114HV)
6 - CnM Classic 4 Cam DVR
7 - Visionari 4/8 Channel DVR
8 - Swann DM-70D and compatible

Does somebody has any idea?
thefuzz4
Posts: 28
Joined: Sat Mar 01, 2014 5:43 am

Re: Working QSee/Swann/Zmodo DVR support! - Updated 2013-04-21

Post by thefuzz4 »

driv3r wrote:Hello,

i running Zoneminder v1.26.5 on Ubuntu 14.04.1 LTS an the zmodopipe doesn´t work for me.
I have compiled misc versions but all only show me the usage notice after execution:

root@linux:/share# ./zmodopipe -s 192.168.178.100 -p 8888 -c 1 -v -u admin -p password
Usage: ./zmodopipe [options]

Where [options] is one of:

-s <string> IP to connect to
-t <int> Send a timer interrupt every x seconds.
-p <int> Port number to connect to
-c <int> Channels to stream (can be specified multiple times)
-n <string> Base filename of pipe (ch# will be appended)
-v Verbose output
-u <string> Username
-a <string> Password
-m <int> Mode to use (ie. mobile/media)
1 - Use mobile port (safest, default)
2 - Use media port (Works for some models, ie. Zmodo 9104)
3 - Use media port w/header (Other models, please test)
4 - Use QT5 family (ie. QT504, QT528)
5 - Zmodo DVR-8104UV compatible (also DVR-8114HV)
6 - CnM Classic 4 Cam DVR
7 - Visionari 4/8 Channel DVR
8 - Swann DM-70D and compatible

Does somebody has any idea?
Change your password switch to be -a

Thanks :) and happy new year
Post Reply