Frames at a particular (interval) distance
Hi, I'm trying to extract key frames from a video using the following option: eq(pict_type\,I). However, there are lot of keyframes, and I wouldn't want to get all of them. Thus, I've been thinking to get the timestamps only for keyframes at a difference between 50 and 60 seconds. Is there a way to do that? For example, if the timestamps are the following: t:18.320000 t:24.160000 t:35.880000 t:37.800000 t:47.040000 t:52.840000 t:55.840000 t:64.200000 t:66.080000 t:77.720000 t:80.320000 I would like to have only t:52.840000. Thank you! -- View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Frames-at-a-particular-interval-dis... Sent from the FFmpeg-users mailing list archive at Nabble.com.
On Tue, Mar 18, 2014 at 2:57 PM, oana1404 <oana.inel@gmail.com> wrote:
Hi,
I'm trying to extract key frames from a video using the following option: eq(pict_type\,I). However, there are lot of keyframes, and I wouldn't want to get all of them. Thus, I've been thinking to get the timestamps only for keyframes at a difference between 50 and 60 seconds. Is there a way to do that?
Yes, as listed in the docs for the select filter: Select only I frames contained in the 10-20 time interval: select=between(t\,10\,20)*eq(pict_type\,I) http://ffmpeg.org/ffmpeg-filters.html#select_002c-aselect Cheers Tom
Can you test if using this work for you? select=mod(n\, 10)*eq(pict_type\,I) where 10 you change until you got * works like AND
I managed to select the frames that I need. Now, I want to cut the video based on the frame numbers that I extracted earlier. For this, I'm using the following command: ffmpeg -i input -f segment -segment_frames 1283,2544,3793 -c copy -map 0 segment_%03d.mp4 However, instead of having 4 fragments, I get 5. The last part of the video splits into two. Also, for some videos this behavior doesn't happen. Do you have any idea about this? -- View this message in context: http://ffmpeg-users.933282.n4.nabble.com/Frames-at-a-particular-interval-dis... Sent from the FFmpeg-users mailing list archive at Nabble.com.
participants (3)
-
oana1404 -
Renato Santos -
Tom Evans