-
Notifications
You must be signed in to change notification settings - Fork 28
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
Extracting keyframe to increase speed #84
Comments
ffmpeg -skip_frame nokey -i file -frame_pts true -vf scale=320:-1 -qscale:v 10 -vsync 0 -r 1000 kf-%10d.jpg can produce files which have their timestamp in milliseconds. I suppose that could be used to find frames which are the closest to the prescribed interval. The question becomes how to deal with the gaps, as trickplay formats usually require there to not be holes in the series of images. |
I have tested keyframes before when using the BIF format and my problem was that I didn't get nearly as many frames output which led to much less useful trickplay images. Generally, my goal is that if you're hovering over some point on the timeline the image previewed is going to be what you see when you skip there, but with keyframes that's usually not the case (at least from the very limited testing I did). |
Is The only problem is that I'm not sure how precise mplayer is.:
where:
This command generates ~200 same ending frames. I only tried it on Windows and maybe I do the wrong calculation. |
I would be nice extracting the keyframes instead of any frames. This trick improves by 5x-7x the generation of the previews.
example:
-skip_frame nokey
to process only the keyframes-vf scale=320:-1
to scale the frames to be 320px width-qscale:v 10
quality?, not really necessary because the images are so smallI run a test with a 3h movie:
The keyframe methods is 7.7x faster!
The main drawback is that isn't not possible to specify exactly how many frames create or how many seconds from frame to frame.
references:
The text was updated successfully, but these errors were encountered: