Skip to content

Commit f459a2b

Browse files
Updated formatting
1 parent fa7ed4c commit f459a2b

1 file changed

Lines changed: 31 additions & 31 deletions

File tree

dissector/README.md

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Table of Contents
99
* [Audio Header](#audio-header)
1010
* [I-Frame Header](#i-frame-header)
1111
* [P-Frame Header](#p-frame-header)
12-
* [E-Frame Header](#e-frame-header)
12+
* [Information Frame Header](#information-frame-header)
1313

1414
# Test Device
1515

@@ -36,45 +36,45 @@ Header description of a single DVRIP/Sofia message is based on [Digital Video Re
3636

3737
![DVRIP header in Wireshark](images/DVRIP_header_wireshark.png)
3838

39-
1. BIT 0 - message header byte, fixed as 0xFF.
40-
2. BIT 1 - observed to be equal to 0 for requests and equal to 1 for responses from the IP camera.
41-
3. BIT 2 - reserved byte 1:
42-
* Equals `0` when H.264 video codec is used (BIT4 = 0x02 on I-Frame header).
43-
* Equals `1` when H.265 video codec is used (BIT4 = 0x12 on I-Frame header).
44-
4. BIT 3 - reserved byte 2:
39+
1. BIT 0: message header byte, fixed as 0xFF.
40+
2. BIT 1: observed to be equal to 0 for requests and equal to 1 for responses from the IP camera.
41+
3. BIT 2: reserved byte 1:
42+
* Equals `0` when H.264 video codec is used (BIT4 = `0x02` on I-Frame header).
43+
* Equals `1` when H.265 video codec is used (BIT4 = `0x12` on I-Frame header).
44+
4. BIT 3: reserved byte 2:
4545
* Equals `128` when DVRIP message contains audio frames.
4646
* Equals `0` otherwise.
47-
5. BIT 4-7 - session ID. Assigned by the camera after successful login. Needs to be present in every subsequent message.
48-
6. BIT 8-11 - sequence number. Increments from 0 after startup, and after reaching the (unknown) maximum, starts from 0 again.
49-
7. BIT 12 - total number of packets in a single message. Value of 0 or 1 indicate a single message per packet.
50-
8. BIT 13 - number of a current packet in message. Meaningful only when the value of total packets (BIT 12) is greater than 1.
51-
9. BIT 14-15 - command code (also called message id). The code defines what action to perform.
52-
10. BIT 16-19 - data (payload) length. Length of a JSON payload, which starts immediately after DVRIP/Sofia header.
47+
5. BIT 4-7: session ID. Assigned by the camera after successful login. Needs to be present in every subsequent message.
48+
6. BIT 8-11: sequence number. Increments from 0 after startup, and after reaching the (unknown) maximum, starts from 0 again.
49+
7. BIT 12: total number of packets in a single message. Value of 0 or 1 indicate a single message per packet.
50+
8. BIT 13: number of a current packet in message. Meaningful only when the value of total packets (BIT 12) is greater than 1.
51+
9. BIT 14-15: command code (also called message id). The code defines what action to perform.
52+
10. BIT 16-19: data (payload) length. Length of a JSON payload, which starts immediately after DVRIP/Sofia header.
5353

5454
# Audio Header
5555

5656
![DVRIP audio header](images/Audio_header.png)
5757

5858
![DVRIP audio header in Wireshark](images/Audio_header_wireshark.png)
5959

60-
1. BIT 0-3 - signature
61-
2. BIT 4 - audio codec (0x0e = G711A)
62-
3. BIT 5 - sampling rate (0x02 = 8kHz sampling)
63-
4. BIT 6-7 - length of audio payload
60+
1. BIT 0-3: signature
61+
2. BIT 4: audio codec (0x0e = G711A)
62+
3. BIT 5: sampling rate (0x02 = 8kHz sampling)
63+
4. BIT 6-7: length of audio payload
6464

6565
# I-Frame Header
6666

6767
![DVRIP I-Frame header](images/Iframe_header.png)
6868

6969
![DVRIP I-Frame in Wireshark](images/Iframe_header_wireshark.png)
7070

71-
1. BIT 0-3 - signature
72-
2. BIT 4 - video codec (0x01 = MPEG4, 0x02 = H.264, 0x12 = H.265)
73-
3. BIT 5 - encoded framerate (variable; 1-25 for PAL, 1-30 for NTSC)
74-
4. BIT 6 - low 8 bits of image width; the value is actual width divided by 8
75-
5. BIT 7 - low 8 bits of image height; the value is actual height divided by 8
76-
6. BIT 8-11 - datetime of the capture
77-
7. BIT 12-15 - length of I-Frame payload
71+
1. BIT 0-3: signature
72+
2. BIT 4: video codec (0x01 = MPEG4, 0x02 = H.264, 0x12 = H.265)
73+
3. BIT 5: encoded framerate (variable; 1-25 for PAL, 1-30 for NTSC)
74+
4. BIT 6: low 8 bits of image width; the value is actual width divided by 8
75+
5. BIT 7: low 8 bits of image height; the value is actual height divided by 8
76+
6. BIT 8-11: datetime of the capture
77+
7. BIT 12-15: length of I-Frame payload
7878

7979
First 4 bits of an I-Frame payload (BITS 16-19) are equal to `0x00000001`
8080

@@ -88,8 +88,8 @@ Same exact header fields are shared between I-Frames (FC) and snapshots (FE).
8888

8989
Extension of I-Frames.
9090

91-
1. BIT 0-3 - signature
92-
2. BIT 4-7 - length of P-Frame payload
91+
1. BIT 0-3: signature
92+
2. BIT 4-7: length of P-Frame payload
9393

9494
First 4 bits of a P-Frame payload (BITS 8-11) are equal to `0x00000001`
9595

@@ -99,12 +99,12 @@ First 4 bits of a P-Frame payload (BITS 8-11) are equal to `0x00000001`
9999

100100
![DVRIP information frame in Wireshark](images/Information_frame_header_wireshark.png)
101101

102+
1. BIT 0-3: signature
103+
2. BIT 4: general information (unconfirmed)
104+
3. BIT 5: unused value
105+
4. BIT 6-7: payload length
102106

103107
Used for information transmission. First byte after signature (byte 4):
104108

105109
1. 0x01 - general information.
106-
2. 0x06 - unknown value.
107-
108-
# To Do
109-
110-
1. Implement frame keys, so that separate audio/video streams could be saved for data from multiple IP cameras / data stream sessions on the same Wireshark capture file.
110+
2. 0x06 - unknown value.

0 commit comments

Comments
 (0)