0

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
0

1 Answer 1

0

I believe you are referring to ffprobe:

ffprobe -of compact -show_entries frame=key_frame,pkt_pts_time,pict_type INPUT_FILE > OUT

You can use -sections to get an overview of what information is available:

ffprobe -sections INPUT_FILE

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.