Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The FFMPEG reader fetches frames with the wrong time #66

Closed
Zulko opened this issue Feb 11, 2015 · 1 comment
Closed

The FFMPEG reader fetches frames with the wrong time #66

Zulko opened this issue Feb 11, 2015 · 1 comment

Comments

@Zulko
Copy link
Contributor

Zulko commented Feb 11, 2015

If I want the 300th frame and I call myreader.get_data(300) I will not get the 300th frame, but the frame from one second before. This is because this line in ffmpeg.py reads

iargs = ['-ss', "%.03f" % (starttime-offset)]

Where the offset is 1. Actually, after reaching starttime-offset, it should advance of 'offset' seconds to be exactly on 'starttime', like this:

i_arg = ['-ss', "%.06f" % (starttime - offset),
      '-i', self.filename,
      '-ss', "%.06f" % offset]

See here for details and explanations.

@almarklein
Copy link
Member

Care for a PR?

almarklein added a commit that referenced this issue Feb 13, 2015
Properly seek a given time with FFMPEG (solves issue #66)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants