How to extract MP4 seekpoints information from PHP/FFmpeg/MP4Box/Anything? -



How to extract MP4 seekpoints information from PHP/FFmpeg/MP4Box/Anything? -

is possible extract seekpoints/keyframes mp4 file in next fashion:

keyframe - time range (in seconds) - offset (in bytes)

example: 0 - 0s - 77262

1 - 0.5s - 144183

2 - 1s - 222965

3 - 1.5s - 293303

4 - 2s - 362199

5 - 2.5s - 431178

thanks in advance.

you can utilize ffprobe. perhaps this:

ffprobe -show_frames -select_streams v:0 -show_entries frame=key_frame,coded_picture_number,pkt_pts_time,pkt_pos input.mp4 | grep -a 3 "key_frame=1"

results in:

key_frame=1 pkt_pts_time=0.000000 pkt_pos=48 coded_picture_number=0 -- key_frame=1 pkt_pts_time=10.000000 pkt_pos=47130 coded_picture_number=250 -- key_frame=1 pkt_pts_time=20.000000 pkt_pos=92713 coded_picture_number=500 -- key_frame=1 pkt_pts_time=30.000000 pkt_pos=138159 coded_picture_number=750

key_frame=1 indicates particular frame key frame.

you may have take section_entries if illustration not give want. see man ffprobe.

see -print_format alternative alter output printing format (default, compact, csv, flat, ini, json, xml). may have perform additional processing want.

php ffmpeg mp4

Comments

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -