user26173: 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?

user1871: 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.

26173: <p>I have an ffmpeg newbie question, I am extracting keyframes from streams using this command:
<code>ffmpeg -skip_frame nokey -i {0} -vsync 0 -r 30 -f image2 keyframe-%09d.jpeg</code></p>

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

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

<p>This will print the pts as milliseconds in the filename.</p>
