Skip to content

framepos.sh script #2

@allanhummer

Description

@allanhummer

Hi!

I would really like to use your framepos.sh script to search for a provided keyframe in a video.
Unfortunately I can't get it to work. Could you maybe help me out?

I'm on Ubuntu 18.04 and installed ffmpeg and findimagedupes via apt.

Then I provided a ~10 min long .mp4 video and a .png keyframe which I extracted from this video and ran the script via "framepos.sh test.mp4 keyframe.png" and the default settings.

I think the script detects the frame but I get an error. My output looks like this:

framepos.sh test.mp4 keyframe.png

fps = 60
dur = 615.570
near T1 = 0
near T2 = -1
exact T2 = 614.5667
extract frames to /tmp/mv-1605621455.frame-%04d.bmp
extract ... 33 81 86 89 92 94 97 99 103
compare 103 frames from /tmp/mv-1605621455.frame-0001.bmp
search for keyframe.png
extract ... 0 48 82 83 90 96 99 101
compare 101 frames from /tmp/mv-1605621455.frame-0104.bmp
search for keyframe.png
awk: cmd. line:1: (FILENAME=- FNR=1) fatal: division by zero attempted
match t =

Do you have an idea on how I can get it to work?

best,
Allan

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions