Static
A static snapshot
Hints
This example shows a static snapshot. It should work with any browser. To see a simple example click here.
Source snippet
© The MJPG-streamer team | Design by Andreas Viklund
/* determine what to deliver */
if ( strstr(buffer, "GET /?action=snapshot") != NULL ) {
req.type = A_SNAPSHOT;
}
消息报头(请求报头)在接收和解释请求消息后,服务器返回一个HTTP响应消息。
HTTP响应也是由三个部分组成,分别是:状态行、消息报头、响应正文(即实体报头+实体正文)
1.状态行格式如下:
HTTP-Version Status-Code Reason-Phrase CRLF
#define STD_HEADER "Connection: close\r\n" \
"Server: MJPG-Streamer/0.2\r\n" \
"Cache-Control: no-store, no-cache, must-revalidate, pre-check=0, post-check=0, max-age=0\r\n" \
"Pragma: no-cache\r\n" \
"Expires: Mon, 3 Jan 2000 12:34:56 GMT\r\n"
/******************************************************************************
Description.: Send a complete HTTP response and a single JPG-frame.
Input Value.: fildescriptor fd to send the answer to
Return Value: -
******************************************************************************/
void send_snapshot(int fd) {
unsigned char *frame=NULL;
int frame_size=0;
char buffer[BUFFER_SIZE] = {0};
/* wait for a fresh frame */
pthread_cond_wait(&pglobal->db_update, &pglobal->db);
/* read buffer */
frame_size = pglobal->size;
/* allocate a buffer for this single frame */
if ( (frame = malloc(frame_size+1)) == NULL ) {
free(frame);
pthread_mutex_unlock( &pglobal->db );
send_error(fd, 500, "not enough memory");
return;
}
memcpy(frame, pglobal->buf, frame_size);
DBG("got frame (size: %d kB)\n", frame_size/1024);
pthread_mutex_unlock( &pglobal->db );
/* write the response */
sprintf(buffer, "HTTP/1.0 200 OK\r\n" \
//状态行
STD_HEADER \
//响应报头
"Content-type: image/jpeg\r\n" \
//实体报头,图像
"\r\n");
/* send header and image now */
if( write(fd, buffer, strlen(buffer)) < 0 || \
write(fd, frame, frame_size) < 0) {
//实体正文
free(frame);
return;
}
free(frame);
}
2.case A_STREAM:
/******************************************************************************
Description.: Send a complete HTTP response and a stream of JPG-frames.
Input Value.: fildescriptor fd to send the answer to
Return Value: -
******************************************************************************/
void send_stream(int fd) {
unsigned char *frame=NULL, *tmp=NULL;
int frame_size=0, max_frame_size=0;
char buffer[BUFFER_SIZE] = {0};
DBG("preparing header\n");
sprintf(buffer, "HTTP/1.0 200 OK\r\n" \
//状态行
STD_HEADER \
//响应报头
"Content-Type: multipart/x-mixed-replace;boundary=" BOUNDARY "\r\n" \
//实体报头,后续还有
"\r\n" \
"--" BOUNDARY "\r\n");
if ( write(fd, buffer, strlen(buffer)) < 0 ) {
free(frame);
return;
}
DBG("Headers send, sending stream now\n");
while ( !pglobal->stop ) {
/* wait for fresh frames */
pthread_cond_wait(&pglobal->db_update, &pglobal->db);
/* read buffer */
frame_size = pglobal->size;
/* check if framebuffer is large enough, increase it if necessary */
if ( frame_size > max_frame_size ) {
DBG("increasing buffer size to %d\n", frame_size);
max_frame_size = frame_size+TEN_K;
if ( (tmp = realloc(frame, max_frame_size)) == NULL ) {
free(frame);
pthread_mutex_unlock( &pglobal->db );
send_error(fd, 500, "not enough memory");
return;
}
frame = tmp;
}
memcpy(frame, pglobal->buf, frame_size);
DBG("got frame (size: %d kB)\n", frame_size/1024);
pthread_mutex_unlock( &pglobal->db );
/*
* print the individual mimetype and the length
* sending the content-length fixes random stream disruption observed
* with firefox
*/
sprintf(buffer, "Content-Type: image/jpeg\r\n" \
"Content-Length: %d\r\n" \
"\r\n", frame_size);
//实体报头
DBG("sending intemdiate header\n");
if ( write(fd, buffer, strlen(buffer)) < 0 ) break;
DBG("sending frame\n");
if( write(fd, frame, frame_size) < 0 ) break;
//实体正文
DBG("sending boundary\n");
sprintf(buffer, "\r\n--" BOUNDARY "\r\n");
if ( write(fd, buffer, strlen(buffer)) < 0 ) break;
}
free(frame);
}
3.case A_FILE:
/******************************************************************************
Description.: Send HTTP header and copy the content of a file. To keep things
simple, just a single folder gets searched for the file. Just
files with known extension and supported mimetype get served.
If no parameter was given, the file "index.html" will be copied.
Input Value.: * fd.......: filedescriptor to send data to
* parameter: string that consists of the filename
* id.......: specifies which server-context is the right one
Return Value: -
******************************************************************************/
void send_file(int id, int fd, char *parameter) {
char buffer[BUFFER_SIZE] = {0};
char *extension, *mimetype=NULL;
int i, lfd;
config conf = servers[id].conf;
/* in case no parameter was given */
if ( parameter == NULL || strlen(parameter) == 0 )
parameter = "index.html";
/* find file-extension */
if ( (extension = strstr(parameter, ".")) == NULL ) {
send_error(fd, 400, "No file extension found");
return;
}
/* determine mime-type */
for ( i=0; i < LENGTH_OF(mimetypes); i++ ) {
if ( strcmp(mimetypes[i].dot_extension, extension) == 0 ) {
/*
mimetypes定义在httpd.h,过滤文件的后扩展名
static const struct {
const char *dot_extension;
const char *mimetype;
} mimetypes[] = {
{ ".html", "text/html" },
{ ".htm", "text/html" },
{ ".css", "text/css" },
{ ".js", "text/javascript" },
{ ".txt", "text/plain" },
{ ".jpg", "image/jpeg" },
{ ".jpeg", "image/jpeg" },
{ ".png", "image/png"},
{ ".gif", "image/gif" },
{ ".ico", "image/x-icon" },
{ ".swf", "application/x-shockwave-flash" },
{ ".cab", "application/x-shockwave-flash" },
{ ".jar", "application/java-archive" }
};
所以按照这个mimetypes,客户浏览器访问
http://192.168.1.230:8080/test.cgi
时,服务器就会返回下面的404错误
如果加上下面一行,使支持cgi
{ ".cgi", "magnus-internal/cgi" },但实验中,浏览器直接弹出一个保存对话框。。。原因待查。。。
如果是
{ ".cgi", "text/html" },输出是乱码
使支持浏览器在线打开pdf
{ ".pdf", "application/pdf" },可以。
各个mimetype(content-type)
http://blog.csdn.net/fanweiwei/article/details/1787747
*/
mimetype = (char *)mimetypes[i].mimetype;
break;
}
}
/* in case of unknown mimetype or extension leave */
if ( mimetype == NULL ) {
send_error(fd, 404, "MIME-TYPE not known");
return;
}
/* now filename, mimetype and extension are known */
DBG("trying to serve file \"%s\", extension: \"%s\" mime: \"%s\"\n", parameter, extension, mimetype);
/* build the absolute path to the file */
strncat(buffer, conf.www_folder, sizeof(buffer)-1);
strncat(buffer, parameter, sizeof(buffer)-strlen(buffer)-1);
/* try to open that file */
if ( (lfd = open(buffer, O_RDONLY)) < 0 ) {
DBG("file %s not accessible\n", buffer);
send_error(fd, 404, "Could not open file");
return;
}
DBG("opened file: %s\n", buffer);
/* prepare HTTP header */
sprintf(buffer, "HTTP/1.0 200 OK\r\n" \
//状态行
"Content-type: %s\r\n" \
STD_HEADER \
//响应报头
"\r\n", mimetype);
//实体报头。可将"Content-type: %s\r\n" 放在STD_HEADER后面。
i = strlen(buffer);
/* first transmit HTTP-header, afterwards transmit content of file */
do {
if ( write(fd, buffer, i) < 0 ) {
//实体正文
close(lfd);
return;
}
} while ( (i=read(lfd, buffer, sizeof(buffer))) > 0 );
/* close file, job done */
close(lfd);
}
0000 00 22 fa 7b 9b 76 08 90 90 90 90 90 08 00 45 00 .".{.v.. ......E.
0010 05 dc 9d c2 40 00 40 06 12 be c0 a8 01 e6 c0 a8 ....@.@. ........
0020 01 65 1f 90 05 d7 4b f6 31 0b 3a a2 68 46 50 10 .e....K. 1.:.hFP.
0030 19 20 17 85 00 00 ff d8 ff db 00 84 00 10 0b 0c . ...... ........
0040 0e 0c 0a 10 0e 0d 0e 12 11 10 13 18 28 1a 18 16 ........ ....(...
0050 16 18 31 23 25 1d 28 3a 33 3d 3c 39 33 38 37 40 ..1#%.(: 3=<9387@
0060 48 5c 4e 40 44 57 45 37 38 50 6d 51 57 5f 62 67 H\N@DWE7 8PmQW_bg
0070 68 67 3e 4d 71 79 70 64 78 5c 65 67 63 01 11 12 hg>Mqypd x\egc...
0080 12 18 15 18 2f 1a 1a 2f 63 42 38 42 63 63 63 63 ..../../ cB8Bcccc
0090 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 cccccccc cccccccc
00a0 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 cccccccc cccccccc
00b0 63 63 63 63 63 63 63 63 63 63 63 63 63 63 ff c4 cccccccc cccccc..
00c0 01 a2 00 00 01 05 01 01 01 01 01 01 00 00 00 00 ........ ........
00d0 00 00 00 00 01 02 03 04 05 06 07 08 09 0a 0b 01 ........ ........
00e0 00 03 01 01 01 01 01 01 01 01 01 00 00 00 00 00 ........ ........
00f0 00 01 02 03 04 05 06 07 08 09 0a 0b 10 00 02 01 ........ ........
0100 03 03 02 04 03 05 05 04 04 00 00 01 7d 01 02 03 ........ ....}...
0110 00 04 11 05 12 21 31 41 06 13 51 61 07 22 71 14 .....!1A ..Qa."q.
0120 32 81 91 a1 08 23 42 b1 c1 15 52 d1 f0 24 33 62 2....#B. ..R..$3b
0130 72 82 09 0a 16 17 18 19 1a 25 26 27 28 29 2a 34 r....... .%&'()*4
0140 35 36 37 38 39 3a 43 44 45 46 47 48 49 4a 53 54 56789:CD EFGHIJST
0150 55 56 57 58 59 5a 63 64 65 66 67 68 69 6a 73 74 UVWXYZcd efghijst
0160 75 76 77 78 79 7a 83 84 85 86 87 88 89 8a 92 93 uvwxyz.. ........
0170 94 95 96 97 98 99 9a a2 a3 a4 a5 a6 a7 a8 a9 aa ........ ........
0180 b2 b3 b4 b5 b6 b7 b8 b9 ba c2 c3 c4 c5 c6 c7 c8 ........ ........
0190 c9 ca d2 d3 d4 d5 d6 d7 d8 d9 da e1 e2 e3 e4 e5 ........ ........
01a0 e6 e7 e8 e9 ea f1 f2 f3 f4 f5 f6 f7 f8 f9 fa 11 ........ ........
01b0 00 02 01 02 04 04 03 04 07 05 04 04 00 01 02 77 ........ .......w
01c0 00 01 02 03 11 04 05 21 31 06 12 41 51 07 61 71 .......! 1..AQ.aq
01d0 13 22 32 81 08 14 42 91 a1 b1 c1 09 23 33 52 f0 ."2...B. ....#3R.
01e0 15 62 72 d1 0a 16 24 34 e1 25 f1 17 18 19 1a 26 .br...$4 .%.....&
01f0 27 28 29 2a 35 36 37 38 39 3a 43 44 45 46 47 48 '()*5678 9:CDEFGH
0200 49 4a 53 54 55 56 57 58 59 5a 63 64 65 66 67 68 IJSTUVWX YZcdefgh
0210 69 6a 73 74 75 76 77 78 79 7a 82 83 84 85 86 87 ijstuvwx yz......
0220 88 89 8a 92 93 94 95 96 97 98 99 9a a2 a3 a4 a5 ........ ........
0230 a6 a7 a8 a9 aa b2 b3 b4 b5 b6 b7 b8 b9 ba c2 c3 ........ ........
0240 c4 c5 c6 c7 c8 c9 ca d2 d3 d4 d5 d6 d7 d8 d9 da ........ ........
0250 e2 e3 e4 e5 e6 e7 e8 e9 ea f2 f3 f4 f5 f6 f7 f8 ........ ........
0260 f9 fa ff c0 00 11 08 01 e0 02 80 03 01 21 00 02 ........ .....!..
0270 11 01 03 11 01 ff da 00 0c 03 01 00 02 11 03 11 ........ ........
0280 00 3f 00 ea 68 c5 59 21 40 a0 02 96 80 0c 50 05 .?..h.Y! @.....P.
0290 20 16 8c 50 02 62 8c 50 30 c5 18 a0 05 02 8c 52 ..P.b.P 0......R
02a0 10 b8 a4 c5 00 18 a7 0a 60 38 52 8a 43 16 8c 50 ........ `8R.C..P
02b0 03 94 52 95 a0 06 11 8a 50 73 54 88 68 8a 58 f2 ..R..... PsT.h.X.
02c0 2a b0 8b 0f 44 b4 08 32 f4 23 0a 2a 4c 54 22 c5 *...D..2 .#.*LT".
02d0 03 8a 4c 53 18 1a 41 40 87 01 52 0a 06 2e 28 a4 ..LS..A@ ..R...(.
02e0 01 45 30 0a 28 01 28 a4 02 1a 43 40 0d e9 48 68 .E0.(.(. [email protected]
02f0 01 a6 b3 dc 6d ba 7f f6 b9 a0 68 92 90 d2 00 c5 ....m... ..h.....
0300 34 50 02 9a 70 1c 53 10 50 45 00 03 8a 0f 5a 04 4P..p.S. PE....Z.
0310 14 62 80 00 29 d8 a6 21 08 a6 1a 43 0a 5a 60 25 .b..)..! ...C.Z`%
0320 25 00 14 b8 a4 31 0d 36 80 15 69 d8 a0 03 14 86 %....1.6 ..i.....
0330 81 12 d1 56 21 3a d2 d0 08 4a 29 00 e0 29 68 01 ...V!:.. .J)..)h.
0340 28 a0 62 d0 28 10 62 8a 06 18 a5 a4 01 8a 31 40 (.b.(.b. ......1@
0350 06 29 45 00 38 0a 5a 00 5a 28 01 ea 29 d4 00 15 .)E.8.Z. Z(..)...
0360 cd 44 57 14 5c 2c 2e 32 39 a6 f9 5c d3 93 ba 12 .DW.\,.2 9..\....
0370 56 64 c8 b8 a7 62 a5 6c 50 a0 52 1a 60 34 8a 40 Vd...b.l P.R.`4.@
0380 28 01 c2 9c 0e 28 01 c2 8a 00 29 69 00 94 53 00 (....(.. ..)i..S.
0390 a4 34 00 94 94 80 6b 52 01 40 08 45 50 bc 1b 66 .4....kR [email protected]
03a0 8d bd 4e 28 1a 1c 39 14 94 80 0d 20 a0 02 9c 3a ..N(..9. ... ...:
03b0 53 10 52 f6 a0 42 51 40 05 2d 30 0a 70 a0 04 35 S.R..BQ@ .-0.p..5
03c0 19 34 02 01 4b 40 08 68 a0 00 52 d2 01 29 b4 0c [email protected] ..R..)..
03d0 05 3c 50 02 d3 4d 02 1e 29 6a c4 2e 29 29 00 50 .
NO 10
0000 00 22 fa 7b 9b 76 08 90 90 90 90 90 08 00 45 00 .".{.v.. ......E.
0010 05 dc 9d c3 40 00 40 06 12 bd c0 a8 01 e6 c0 a8 ....@.@. ........
0020 01 65 1f 90 05 d7 4b f6 36 bf 3a a2 68 46 50 10 .e....K. 6.:.hFP.
0030 19 20 7e cc 00 00 94 00 1a 61 a0 04 a6 b0 c8 e6 . ~..... .a......
0040 90 cc f3 c5 cb 8e c7 91 52 52 01 0d 2d 31 00 a2 ........ RR..-1..
0050 80 10 d2 8e 69 80 b4 62 80 13 1c d3 a8 42 12 81 ....i..b .....B..
0060 40 05 21 a0 06 d1 40 c2 8a 62 01 4b 48 02 8a 06 @.!...@. .b.KH...
0070 25 14 08 5a 43 d2 80 1d 4a 2a c4 2e 28 a4 00 29 %..ZC... J*..(..)
0080 68 18 b4 b4 08 5a 28 18 52 d2 00 14 e1 40 21 68 h....Z(. R....@!h
0090 a0 05 a6 96 c5 08 18 6f a7 83 9a 01 01 14 ab d2 .......o ........
00a0 81 8e 14 e1 40 0b 4b 40 05 14 00 a2 8a 40 14 50 [email protected]@ [email protected]
00b0 00 29 68 01 29 68 00 a4 a0 05 a4 a0 05 a2 80 13 .)h.)h.. ........
00c0 34 50 01 45 00 34 b6 29 68 01 a6 98 68 00 a6 13 4P.E.4.) h...h...
00d0 48 65 19 c6 db a5 3e a2 9f d4 52 e8 02 76 a0 1a He....>. ..R..v..
00e0 60 03 ad 19 a1 00 a6 81 c5 02 16 81 4c 00 d2 66 `....... ....L..f
00f0 80 0a 5a 04 2d 25 30 1b 45 00 04 52 50 02 0a 75 ..Z.-%0. E..RP..u
0100 20 0a 28 00 a2 80 0a 0d 00 3a 8a a1 0a 28 c5 00 .(..... .:...(..
0110 14 a2 81 8e a0 52 10 52 d0 30 a5 14 00 b4 a2 80 .....R.R .0......
0120 14 52 d0 30 c5 31 93 34 08 55 5a 78 14 90 c5 ed .R.0.1.4 .UZx....
0130 48 bc 53 01 c2 9c 29 00 a2 8a 60 3a 81 40 05 28 H.S...). ..`:.@.(
0140 a4 01 45 00 14 b4 00 94 b4 00 52 01 40 06 29 45 ..E..... ..R.@.)E
0150 00 14 50 02 62 90 f4 e2 80 11 72 07 27 34 a6 98 ..P.b... ..r.'4..
0160 09 91 45 20 03 4c 26 80 12 98 69 01 4e f0 60 a3 ..E .L&. ..i.N.`.
0170 7a 1c 52 0e 94 ba 14 2f 6a 05 31 05 14 00 b4 50 z.R..../ j.1....P
0180 21 45 28 a6 02 1a 6e 28 01 45 14 00 ea 29 92 34 !E(...n( .E...).4
0190 d2 50 30 a4 34 02 10 53 85 21 b1 69 28 b0 84 a5 .P0.4..S .!.i(...
01a0 14 00 b4 1a 00 5a 2a 84 14 a2 80 0a 5a 43 16 96 .....Z*. ....ZC..
01b0 80 0a 28 01 69 45 00 2d 2d 20 14 52 d3 18 b4 50 ..(.iE.- - .R...P
01c0 21 68 a0 62 8a 46 14 00 a2 9e 29 00 a0 52 e2 98 !h.b.F.. ..)..R..
01d0 06 28 a0 05 a3 a5 20 16 8a 00 28 a0 02 8a 00 28 .(.... . ..(....(
01e0 a0 02 92 98 0b 45 00 25 18 a0 04 c5 06 90 09 40 .....E.% .......@
01f0 a0 00 f4 a6 91 40 c6 9a 6e 29 01 5e f5 37 40 71 .....@.. n).^.7@q
0200 db 9a 89 7a 52 0e 81 4a 29 80 98 a2 80 17 a0 a4 ...zR..J ).......
0210 cd 31 0e 06 96 81 01 a6 50 31 69 45 02 14 51 4c .1...... P1iE..QL
0220 18 da 29 00 86 9b 40 00 a7 0a 01 8b 49 40 09 4a ..)...@. [email protected]
0230 28 01 d4 86 98 0a 0d 14 c4 14 0a 06 38 51 40 05 (....... ....8Q@.
0240 3a 90 05 14 00 b4 ec 50 01 4a 28 18 b4 a2 81 0b :......P .J(.....
0250 4b 40 05 14 0c 5a 0f 4a 10 81 4f 6a 78 a0 62 d2 [email protected] ..Ojx.b.
0260 8a 00 28 a0 05 14 52 00 a2 80 0a 05 00 2d 14 00 ..(...R. .....-..
0270 51 40 05 14 00 51 40 05 21 a0 02 90 d0 02 66 8a [email protected]@. !.....f.
0280 06 25 34 d2 01 29 0d 00 47 30 0d 0b 0a a7 11 f9 .%4..).. G0......
0290 07 d2 90 0e cd 14 c0 5a 4a 04 2f 6a 6d 00 28 a7 .......Z J./jm.(.
02a0 8a 60 06 9a 68 01 45 14 08 5a 28 01 28 a6 02 1a .`..h.E. .Z(.(...
02b0 69 14 00 01 4a 29 00 b4 86 80 12 94 50 03 a9 0d i...J).. ....P...
02c0 00 02 96 a8 41 4b 40 c3 34 a2 80 0c 52 8a 40 2d ....AK@. 4...R.@-
02d0 14 00 a2 9c 28 01 69 68 18 b4 50 21 45 14 0c 5a ....(.ih ..P!E..Z
02e0 51 40 0b 46 28 01 ac 31 cd 28 34 00 f1 4a 29 00 [email protected](..1 .(4..J).
02f0 b4 b9 a6 01 4b 40 09 45 20 0a 05 30 16 8a 40 14 [email protected] ..0..@.
0300 94 00 52 d0 02 51 40 05 25 00 14 1a 06 25 21 3e ..R..Q@. %....%!>
0310 94 08 4a 31 40 c6 e6 9a 79 a4 02 11 f2 e2 a8 20 ..J1@... y......
0320 c1 61 e8 4d 01 d0 93 b5 20 a1 00 b4 94 08 51 49 .a.M.... .....QI
0330 40 00 e9 4e 5a 62 1c 7a 54 7d e8 18 e1 4b 40 85 @..NZb.z T}...K@.
0340 14 94 c1 09 45 02 12 92 90 c1 69 68 00 a6 9a 01 ....E... ..ih....
0350 09 4e 14 0c 5a 43 40 85 a2 a8 48 5a 5a 06 14 b4 .N..ZC@. ..HZZ...
0360 00 b4 52 01 45 27 7a 00 78 a5 14 00 b4 a2 80 16 ..R.E'z. x.......
0370 81 40 c5 a5 14 08 5a 28 18 b4 b4 00 84 71 48 94 [email protected]( .....qH.
0380 00 f0 69 d4 00 98 a5 c5 00 28 a2 80 0a 31 48 02 ..i..... .(...1H.
0390 81 40 0b 45 00 25 19 f4 a0 00 0a 28 00 a0 50 00 [email protected].%.. ...(..P.
03a0 69 bd e8 00 a3 34 0c 29 09 a0 43 72 29 09 34 00 i....4.) ..Cr).4.
03b0 d0 32 69 c1 69 0c 43 54 24 c2 ce e3 b9 39 a0 05 .2i.i.CT $....9..
03c0 1d 28 a0 03 b5 14 00 0a 0d 02 01 d2 95 4d 30 63 .(...... .....M0c
03d0 fa 8a 66 28 b8 85 51 4a 68 00 14 50 02 51 40 08 ..f(..QJ h..P.Q@.
03e0 45 14 00 0a 5a 00 43 4d 34 00 82 9c 29 a0 16 9a E...Z.CM 4...)...
03f0 4d 20 16 8a a0 01 4e a0 05 14 b4 80 29 45 00 2d M ....N. ....)E.-
0400 2d 00 28 a5 a0 05 14 b4 00 a2 96 81 80 a7 62 80 -.(..... ......b.
0410 0c 52 d0 02 62 9c 29 00 53 0f 06 98 0f a5 14 00 .R..b.). S.......
0420 ea 28 00 a0 8a 00 00 a7 52 00 a4 a0 02 8a 00 42 .(...... R......B
0430 28 14 c0 75 26 69 00 51 40 09 48 45 00 14 0a 06 (..u&i.Q @.HE....
0440 21 a6 31 39 a0 43 73 49 9a 00 95 17 8c 9a 18 d0 !.19.CsI ........
0450 04 64 d5 0b 90 56 e5 5b fb c2 91 48 51 4b 9a 04 .d...V.[ ...HQK..
0460 25 28 a0 18 b4 1e 28 10 0a 4a 00 92 9a 69 80 2f %(....(. .J...i./
0470 4a 28 00 5a 5a 04 36 8a 00 51 45 30 12 96 80 12 J(.ZZ.6. .QE0....
0480 9a 69 00 52 8a 60 2d 31 a9 00 ea 3b 55 00 52 83 .i.R.`-1 ...;U.R.
0490 40 0e 14 a2 90 05 28 a0 07 51 40 0a 29 68 01 45 @.....(. .Q@.)h.E
04a0 2d 00 2d 28 a0 61 4e cd 02 0c d2 d0 31 45 14 00 -.-(.aN. ....1E..
04b0 53 58 71 40 0a 87 23 14 ea 40 28 e6 96 80 16 8a SXq@..#. .@(.....
04c0 60 26 69 41 a0 02 81 48 02 98 cd 8a 60 22 b6 4d `&iA...H ....`".M
04d0 48 3a 50 02 d1 48 06 96 e7 14 a2 80 0a 69 34 00 H:P..H.. .....i4.
04e0 94 66 80 03 4c a0 60 17 34 f5 40 39 34 20 06 3c .f..L.`. 4.@94 .<
04f0 71 4c 3d 28 01 b5 4e fb 84 56 ee 0d 20 43 07 4a qL=(..N. .V.. C.J
0500 51 cd 03 61 40 34 08 50 69 cd c8 a0 48 68 34 b4 [email protected] i...Hh4.
0510 00 fc f1 4c 26 80 14 74 a2 98 85 02 8a 00 31 49 ...L&..t ......1I
0520 8a 2c 01 45 30 0a 4a 40 14 d3 40 09 4a 28 18 66 .,.E0.J@ [email protected](.f
0530 90 d0 02 d0 2a 84 14 a3 8a 40 38 1a 5a 00 05 38 ....*... [email protected]
0540 50 03 b3 45 00 28 a5 a0 05 a5 14 00 b4 b4 0c 29 P..E.(.. .......)
0550 45 02 16 96 81 85 2e 68 00 cd 14 00 c1 f2 bf b1 E......h ........
0560 a9 48 a0 05 5e 94 b4 00 52 13 40 00 1c d2 d2 00 .H..^... R.@.....
0570 a4 a0 05 a6 95 cd 03 14 20 1d 29 45 00 14 99 a0 ........ .)E....
0580 41 8c d0 28 01 6a 2c ee 27 1d a8 01 68 a0 02 9a A..(.j,. '...h...
0590 68 01 47 02 9e 4f 14 00 da 42 28 18 d2 2a b5 da h.G..O.. .B(..*..
05a0 e6 16 1d e9 31 ad ca d1 9d c8 0f b5 38 71 40 0e ....1... ....8q@.
05b0 14 94 08 3a 1a 77 6a 04 20 14 a6 86 31 45 21 14 ...:.wj. ...1E!.
05c0 08 55 e9 4b 4c 40 3a d1 40 01 a0 50 02 52 50 00 .U.KL@:. @..P.RP.
05d0 29 68 01 0d 21 a0 06 d1 40 c2 83 40 85 a2 a8 05 )h..!... @..@....
05e0 a6 39 c5 08 01 1e a6 07 8a 91 .9...... ..
MJPG-streamer
Static
A static snapshot
Hints
This example shows a static snapshot. It should work with any browser. To see a simple example click here.
Source snippet
![](/?action=snapshot)
© The MJPG-streamer team | Design by Andreas Viklund
根据源码和抓取的包中若干GET方法可以推断整个过程: