0

The videos Duration: 00:00:06.93 and 25 fps If we do the math it's 173.25 (173 rounded) frames. However this command ffmpeg -i video.mp4 -qscale:v 1 filename_%06d.jpg extracts 172 frames. Am I calculating or doing something wrong? I want to use this of some automation in my Python project.

Edit:

I do have video frame in 6.840000

[FRAME]
media_type=video
stream_index=1
key_frame=0
pkt_pts=171000
pkt_pts_time=6.840000
pkt_dts=N/A
pkt_dts_time=N/A
best_effort_timestamp=171000
best_effort_timestamp_time=6.840000
pkt_duration=1000
pkt_duration_time=0.040000
pkt_pos=22689592
pkt_size=213060
width=1920
height=1080
pix_fmt=yuv420p
sample_aspect_ratio=N/A
pict_type=P
coded_picture_number=169
display_picture_number=0
interlaced_frame=0
top_field_first=0
repeat_pict=0
color_range=tv
color_space=bt709
color_primaries=bt709
color_transfer=bt709
chroma_location=left
[/FRAME]

My full frame dump here

Edit 2:

My intention is to get the frames exactly, as when watching the video. I don't care about some frame being longer / shorter, audio longer etc. I tried to force the fps ffmpeg -i LUCKY_BRUNETTE.mp4 -vf fps=25 -qscale:v 1 filename_%06d.jpg but still got 172 frames.

trshmanx
  • 600
  • 7
  • 16

0 Answers0