How can the following command be implemented in pyav? Can you provide a demo code?
ffmpeg -i "demo.mp4" -vf "select=eq(pict_type\,I)" -vsync vfr -qscale:v 2 -f image2 ./i-frame/%08d.jpg