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

Poster Seek Option #3

Closed
johncmckim opened this issue Dec 22, 2013 · 4 comments
Closed

Poster Seek Option #3

johncmckim opened this issue Dec 22, 2013 · 4 comments

Comments

@johncmckim
Copy link

It would be great if there was an option to take a poster image from a specific time i.e. adding the -ss flag to the command.

Perhaps, options like this

options: {
  sizes: [{
    name: 'small',
    width: 320,
    poster: { seek: '00:00:15' }
  }
  ...

This would be really useful as it would allow people to take a poster from the last frame of a video instead for the first.

@sjwilliams
Copy link
Owner

Hi @johncmckim. Yes, this is a pretty nice idea. A few questions:

  1. Can you show me an example of ffmpeg on the command line with the --ss flag the way you imagine it working? I've only used the vframe flag to grab posters.
  2. Why pass in an object to poster, rather than just the timecode? Are there other poster-related properties you think would help?

@johncmckim
Copy link
Author

  1. There are a few ways to use the -ss parameter. The placement on the parameter in the command controls the accuracy see https://trac.ffmpeg.org/wiki/Seeking%20with%20FFmpeg for an explanation. I have used it like this ffmpeg -ss '00:00:12' -i video.mp4 -vframes 1 poster.jpg

  2. An object would be good as it would also be useful to be able to choose different times for fast and accurate seeking or combine them to do a fast and accurate seek.

    If you wanted to make it very easy, you could allow just a timestamp value for poster. I would suggest making that use a fast seek as accurate seeking could have a big impact on build time.

options: {
  sizes: [{
    name: 'small',
    width: 320,
    poster: { 
        fastseek: '00:02:10',
        accurateseek: '00:00:20'
    }
    // Or
    // poster: '00:02:30'
  }
...

@sjwilliams
Copy link
Owner

@johncmckim It took a while to get to, but I think this feature is working 507f328. Deployed on 0.0.4 on NPM. Let me know if you use, and if it works for ya.

@johncmckim
Copy link
Author

Thanks @sjwilliams, this change is fantastic. I am using it for a project and it is working well.

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