Article directory
I. Introduction
Wireshark captures network RTP packets, extracts h264 naked stream data to generate naked stream files.
Second, add the Lua script to the wireshark installation directory
Re-open wireshark, click "Tools" -> Video -> Export H264 / Export H265 in the upper menu bar.
Three, UDP packets are parsed into RTP packets
Locate the data packet to be analyzed according to the destination IP and source IP. The original data is generally transmitted through UDP packets, which need to be parsed into RTP packets first.
Select, right-click the mouse:
Choose to parse as RTP
After clicking OK, you can see that wireshark parses the UDP packet into an RTP packet. Displays that the payload type of the RTP packet is 96.
Fourth, set the load type value of H264
According to the RTP payload type value obtained in the previous step, set the payload type value of H264 to 96.
Click Edit -> Preferences in the upper menu bar
Select to expand Protocols, find the H264 protocol, and fill in 96.
Click OK, and you can see that wireshark recognizes the RTP packet as an H264 packet.
Five, use the script to extract H264 bare stream data
Click Export H264 in the second step.
Click Export All to see xxx.h264 generated OK!
Finally, a wireshark_temp temporary directory will be generated in the user directory, and a xxx.h264 file will be generated. The file can be played with ffplay.