Abstract:In the process of studying the video encoding and compression of Huawei HiSilicon Hi3516A, in view of the limitation of its compressed code stream that only supports local storage and network streaming media applications, a real-time transmission of H.264 code stream based on FPGA and Ethernet interface is proposed. Hi3516A uses RAW_SOCKET original socket protocol to construct UDP frame, and transmits H.264 compressed code stream to FPGA platform through network port; FPGA uses a piece of 2Gbit DDR3 as data buffer medium to ensure the matching of network port rate and the integrity of the H.264 Nalu package during one-time transmission; use the USB2.0 interface to return the code stream to the PC for functional testing. The system function is tested from two aspects of simulated transmission of local files and actual transmission of video. In the test of simulated transmission of local files, the PC-side network port sends 55,844,864 bytes of local files to the system, and the size of the returned data received by the USB host computer is the same as that of the sent data, which proves that the data transmission is complete; in the actual video transmission test, the MilkPlayer software plays the stream file saved by the USB host computer has a smooth picture, no freezes and obvious frame loss. The FFmpeg software is used to decode the stream file. The test shows that the average data compression ratio is 143:1. Compared with the system setting value, there is an error of about 4%, the USB host computer save and receive the stream test during 12h and 24h, the data volume reached 22.3GB and 43.5GB respectively, the streaming files play well. Therefore, this system can realize the real-time transmission of H.264 code stream, meet the design requirements, and has very good practical value.