1 The Problem
Live video when there is video data but PC client black screen
2 Cause of the Problem
The video format is incorrect and cannot be decoded normally.
(web client, please use the 7.23 200807 version of the server, support preview 265 video)
3, investigation and analysis
3.1 the configuration device log

Fill in the equipment number
Select to save the media data and the log level should be multi or general
3.2 preview video on the client
Preview the video for about 10 seconds
3.3 download media logs and analyze them
Search gpsmediasvr- libmdvrnet the latest logs and analyze them


nPackType = 1 means I frame video frame
nPackType = 2 means P- frame video frame
nPackType = 3 for audio frames
Both I and P frames should be data beginning with 00 00 00 01. If the device does not meet the beginning of 00 00 00 01, please modify it at the device end.
264 video data analysis refer to the next section
3.4 download media files and analyze
Search for the latest video file, download it, use UltraEdit, open it in hexadecimal, and analyze it according to the following document

Original link: https://blog.csdn.net/machh/java/article/details/72190321
H265 frame type judgment: and 264 & 0x1f different. The 265 is: int type = (code & 0x7E)>>1; code is the data after 00 00 00 01, such as 40, 42, 44, 4E, 26, 02
Looking for the 00 00 00 01NALU header in the file, it is found that there are 6 kinds of beginning respectively:
According to the NALU type definition analysis of H265
The value of the nuh_unit_type of 00 00 00 01 40 01 is 32, and the semantics are video parameter set VPS
The value of the nuh_unit_type of 00 00 00 01 42 01 is 33, and the semantics are sequence parameter set SPS.
The value of the nuh_unit_type of 00 00 01 44 01 is 34, and the semantic is the image parameter set PPS.
The value of the nuh_unit_type of 00 00 00 01 4E 01 is 39, and the semantics are SEI of supplementary enhancement information.
The value of the nuh_unit_type of 00 00 00 01 26 01 is 19, and the semantics are SS encoded data IDR of IDR images that may have RADL images.
The value of the nuh_unit_type of 00 00 00 01 02 01 is 1, the semantics are the referenced rear image, and the SS coded data of non- TSA and non- STSA
The I- frame data reported to ttx contains VPS,SPS,PPS,SEI,IDR, example:

The P frame data reported to ttx is the nuh_unit_type data with a value of 1
