This page explains how to recover some of the Recorded footage from Low cost standalone Chinese DVRs.
Like these ones.
would show up something like
major minor #blocks name
8 0
488386584
sda
8 16 78149687 sdb
8 17 61761861 sdb1
8 18 16386300 sdb2
8 32 488386584 sdc
8 33 487335425 sdc1
8 34 1048576 sdc2
This creates a 10 M slice.
When i tried playing this file from the 4n_NetViewer(eng).exe ( the dvr playback application that came with the DVR) it would not play.
Then I backed up a 5M file directly from another working DVR with footage in it to a USB flash disk and that file was playing.
When I compared the files I found that the DVR was storing the data in the Harddisk in a different Byte order from that in the USB disk.
I wrote a small C program that could convert the byte order.
#include <stdio.h>
#include <string.h>
int main(int argc, char* argv[])
{
char st[255],t,fname[256];
FILE *fp1,*fp2;
if (argc!=2)
{
printf("Usage: %s File\n",argv[0]);
return 0;
}
strcpy(fname,argv[1]);
strcat(fname,".vvs");
fp1=fopen(argv[1],"rb");
if (fp1==0)
{
printf("Unable to open %s File\n",argv[1]);
return 0;
}
fp2=fopen(fname,"wb");
if (fp2==0)
{
printf("Unable to create %s File\n",fname);
return 0;
}
printf("Starting...");
for(;;)
{
if (fread(st,4,1,fp1)<=0) break;
t=st[0];
st[0]=st[1];
st[1]=t;
t=st[2];
st[2]=st[3];
st[3]=t;
fwrite(&st,4,1,fp2);
}
printf("Done...");
fclose(fp1);
fclose(fp2);
return 0;
}
The above program can be saved to gcctv.c compiled using
$ gcc gcctv.c -o gcctv
This creates the test1.vvs with the right byte order that the Network application can play.
You can now use the above method to get any slice from the harddisk to play.
Ex:
$ dd if=image.img of=test1 bs=10M count=1 skip=100
Dear Sunray I found your blog today. I have a similar problem, I am trying to recover video from a CCTV DVR HDD with my ubuntu notebook, because the DVR stopped working.
I don’t see in your explanation the following major points:
1. when I read a “clip” from the DVR HDD using the DD command, and since my DVR is a 4 camera system, how does your code separate the streams (does not do that by my knowledge) ?
2. what program do you use to playback the generated final file?
3. I don’t see how your code chooses the data-stream from the header (date, time, etc).
Please help.
My dead system is Atronix 4 channel DVR
http://www.atronix.com.cn/english
Hi John
The DVR stores all the four streams together. I used the player software the DVR vendor provided. My DVR had a feature to store clips to a USB thumb drive. They gave an app to view these clips on a pc. The stream has the date time encoded in it. The player software was able to play it.
PSRK.