<p>I just discover FFmpeg, and I was using it to find keyframes.</p>

<p>I lost the command line due to the power outage.<br>
I'm searching for a command line that produce the following output.<br>
Can you help me with a command line that would generate this <code>test.txt</code> file?</p>

<blockquote>
<pre><code>frame|key_frame=1|pkt_pts_time=1.441711|pict_type=I
frame|key_frame=0|pkt_pts_time=1.483411|pict_type=B
frame|key_frame=0|pkt_pts_time=1.525122|pict_type=P
frame|key_frame=0|pkt_pts_time=1.566833|pict_type=B
frame|key_frame=0|pkt_pts_time=1.608544|pict_type=B
frame|key_frame=0|pkt_pts_time=1.650244|pict_type=P
frame|key_frame=0|pkt_pts_time=1.691956|pict_type=B
frame|key_frame=0|pkt_pts_time=1.733667|pict_type=B
frame|key_frame=0|pkt_pts_time=1.775378|pict_type=P
frame|key_frame=0|pkt_pts_time=1.817078|pict_type=B
frame|key_frame=0|pkt_pts_time=1.858789|pict_type=B
frame|key_frame=0|pkt_pts_time=1.900500|pict_type=P
frame|key_frame=0|pkt_pts_time=1.942211|pict_type=B
frame|key_frame=0|pkt_pts_time=1.983911|pict_type=B
frame|key_frame=0|pkt_pts_time=2.025622|pict_type=P
frame|key_frame=0|pkt_pts_time=2.067333|pict_type=B
frame|key_frame=0|pkt_pts_time=2.109044|pict_type=B
frame|key_frame=0|pkt_pts_time=2.150744|pict_type=P
frame|key_frame=0|pkt_pts_time=2.192456|pict_type=B
frame|key_frame=0|pkt_pts_time=2.234167|pict_type=B
</code></pre>
</blockquote>

<p>I have some of the command line, but it is not complete, so if anyone can help me to complete it, it would be much appreciated.</p>

<pre><code>ffmpeg -i input_file.m2ts frame=key_frame,pkt_pts_time,pict_type (missing option directive ?) &gt; file_output.txt
</code></pre>

<video>
Help with FFmpeg keyframe command
LHN
# Help with FFmpeg keyframe command

(Asked by: username_0 on 2020-02-10)

I just discover FFmpeg, and I was using it to find keyframes.
I lost the command line due to the power outage.
I'm searching for a command line that produce the following output.
Can you help me with a command line that would generate this test.txt file?

frame|key_frame=1|pkt_pts_time=1.441711|pict_type=I
frame|key_frame=0|pkt_pts_time=1.483411|pict_type=B
frame|key_frame=0|pkt_pts_time=1.525122|pict_type=P
frame|key_frame=0|pkt_pts_time=1.566833|pict_type=B
frame|key_frame=0|pkt_pts_time=1.608544|pict_type=B
frame|key_frame=0|pkt_pts_time=1.650244|pict_type=P
frame|key_frame=0|pkt_pts_time=1.691956|pict_type=B
frame|key_frame=0|pkt_pts_time=1.733667|pict_type=B
frame|key_frame=0|pkt_pts_time=1.775378|pict_type=P
frame|key_frame=0|pkt_pts_time=1.817078|pict_type=B
frame|key_frame=0|pkt_pts_time=1.858789|pict_type=B
frame|key_frame=0|pkt_pts_time=1.900500|pict_type=P
frame|key_frame=0|pkt_pts_time=1.942211|pict_type=B
frame|key_frame=0|pkt_pts_time=1.983911|pict_type=B
frame|key_frame=0|pkt_pts_time=2.025622|pict_type=P
frame|key_frame=0|pkt_pts_time=2.067333|pict_type=B
frame|key_frame=0|pkt_pts_time=2.109044|pict_type=B
frame|key_frame=0|pkt_pts_time=2.150744|pict_type=P
frame|key_frame=0|pkt_pts_time=2.192456|pict_type=B
frame|key_frame=0|pkt_pts_time=2.234167|pict_type=B


I have some of the command line, but it is not complete, so if anyone can help me to complete it, it would be much appreciated.
ffmpeg -i input_file.m2ts frame=key_frame,pkt_pts_time,pict_type (missing option directive ?) > file_output.txt

**Tags:** video


---

## 0 answers

