Convert pcap file to video file

280 Views Asked by At

I have pcap file that has TCP packets and AVTP packets. I did filter the pcap and created new pcap file that has only AVTP packets encoded with H264 protocol. I am trying to convert this pcap to a video file. Tried using Pyav library but getting exception. There are start, middle , end frames that form a image but i am not sure how to input this to Pyav to convert it to image and combine all the frames to make a video.

If anyone has idea about how to input H264 encoded packets to Pyav to make it a video, sample code would help

I did try couple of Pyav decoding codes online but I always get error. I did input packet to decode_one() but return error.

can someone help with pyav code or gstremaer pipeline to conver pcap file consisting of avtp packets to video file

gstreamer command used - it does not create video file

gst-launch-1.0 filesrc location=filtered.pcap ! pcapparse ! queue ! rtph264depay ! queue ! h264parse ! queue ! avimux ! filesink location=test_video.avi

0

There are 0 best solutions below