[FFmpeg-user] Unexpected result when discarding keyframes

jamesfowkes jamesfowkes at gmail.com
Thu Jan 2 11:09:29 EET 2020


Further to this, I have added -vf showinfo to my command to extract the
keyframes:

ffmpeg -discard nokey -i input.mp4 -*vf showinfo* -y keyframes.h264

and found that the filter is being passed non-keyframes:

[Parsed_showinfo_0 @ 0x55ec60de6fa0] n:   1 pts:   3600 pts_time:0.04   
pos:   127530 fmt:yuv420p sar:0/1 s:1280x720 i:P *iskey:0* type:P
checksum:EBA32398 plane_checksum:[882BBFFB 3231DC1F E60E8760] mean:[151 127
131] stdev:[74.8 18.2 32.6]
[Parsed_showinfo_0 @ 0x55ec60de6fa0] n:   2 pts:   9180 pts_time:0.102  
pos:   136911 fmt:yuv420p sar:0/1 s:1280x720 i:P *iskey:0* type:P
checksum:4657EC88 plane_checksum:[EB70D587 D91D93DD E0C58315] mean:[151 127
131] stdev:[74.8 18.0 32.6]
[Parsed_showinfo_0 @ 0x55ec60de6fa0] n:   3 pts:  12600 pts_time:0.14   
pos:   146063 fmt:yuv420p sar:0/1 s:1280x720 i:P *iskey:0*type:P
checksum:6A506244 plane_checksum:[BD5CD810 8B454B0C F2103F19] mean:[151 127
131] stdev:[74.8 17.9 32.8]
[Parsed_showinfo_0 @ 0x55ec60de6fa0] n:   4 pts:  16200 pts_time:0.18   
pos:   155157 fmt:yuv420p sar:0/1 s:1280x720 i:P *iskey:0* type:P
checksum:B5C77F8B plane_checksum:[421E2037 C6D61A27 2EEA452D] mean:[151 127
131] stdev:[74.8 18.0 32.7]
[Parsed_showinfo_0 @ 0x55ec60de6fa0] n:   5 pts:  18090 pts_time:0.201  
pos:   164134 fmt:yuv420p sar:0/1 s:1280x720 i:P *iskey:0* type:P
checksum:3DF0E4B6 plane_checksum:[8A7CB7AA E5BEC0C8 F5CE6C35] mean:[151 127
131] stdev:[74.8 17.7 32.6]

... continues to the 20th frame before getting first keyframe:

[Parsed_showinfo_0 @ 0x55ec60de6fa0] n:  21 pts:  90900 pts_time:1.01   
pos:   347318 fmt:yuv420p sar:0/1 s:1280x720 i:P *iskey:1* type:I
checksum:CDA770D7 plane_checksum:[61C66960 34A37132 B0409636] mean:[151 127
131] stdev:[74.8 17.9 32.6]

... and then gets only keyframes from this point onwards.







--
Sent from: http://www.ffmpeg-archive.org/


More information about the ffmpeg-user mailing list