2

To seek to position and get the closest frame I was using

ffprobe -i /path/to.mp3 -show_frames -show_entries frame=pkt_pos -of default=noprint_wrappers=1:nokey=1 -hide_banner -loglevel panic -read_intervals $seconds%+#1

where I specify the start position as:

'-read_intervals', seconds + '%+#1', //Read only 1 packet after seeking to position 01:23

With latest ffprobeversion

$ ffprobe --version
ffprobe version 4.4 Copyright (c) 2007-2021 the FFmpeg developers

it does not work anymore, and I get

N/A

hence the "first", while if I remove the $seconds%+#1 I get all

ffprobe -i /path/to.mp3 -show_frames -show_entries frame=pkt_pos -of default=noprint_wrappers=1:nokey=1 -hide_banner -loglevel panic -read_intervals 20
N/A
1029888
1030306
1030724
1031142
1031560
1031978
1032396
1032814
1033232
1033650
1034068
1034486
1034904
...

How to retrieve the closest frame then not using the read_intervals $seconds%+#1 but read_intervals $seconds only?

loretoparisi
  • 15,724
  • 11
  • 102
  • 146

0 Answers0