ffmpeg: keyframe extraction with pts I have an ffmpeg newbie question, I am extracting keyframes from streams using this command:
ffmpeg -skip_frame nokey -i {0} -vsync 0 -r 30 -f image2 keyframe-%09d.jpeg

However, instead of an auto-incrementing counter, I would like to save by frame pts. for example keyframe-0003456.jpg as the pts. How can I mod the command?
Use

ffmpeg -copyts -skip_frame nokey -i {0} -vsync 0 -r 1000 -f image2 -frame_pts 1 keyframe-%09d.jpeg


This will print the pts as milliseconds in the filename.