This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Description
I used this code from wiki and found no keyframe information:
1. init
dstFile = av.open(dstFilePath, 'w')
out_stream = dstFile.add_stream('h264', rate = 25)
out_stream.width = w
out_stream.height = h
2. mux
encByteArray = bytearray(encFrame) # encFrame from EncodeSingleSurface
pkt = av.packet.Packet(encByteArray)
pkt.pts = pts_time
pkt.dts = pts_time
pkt.stream = out_stream # attach pkt to the stream
dstFile.mux(pkt)
If there is key frame information, the video saved by VPF can directly read the frame of interest。