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

Thumbnail size #17

Closed
arc95 opened this issue Apr 8, 2019 · 2 comments
Closed

Thumbnail size #17

arc95 opened this issue Apr 8, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@arc95
Copy link

arc95 commented Apr 8, 2019

Hi @yagotome. Great library! Is it possible to set the thumbnail size when you call this?

var options = new ConversionOptions { Seek = TimeSpan.FromSeconds(15) };
await ffmpeg.GetThumbnailAsync(inputFile, outputFile, options);

Thanks.

@cmxl cmxl added the question Further information is requested label Apr 26, 2019
@cmxl cmxl self-assigned this Apr 26, 2019
@cmxl cmxl added enhancement New feature or request good first issue Good for newcomers and removed question Further information is requested labels Apr 26, 2019
@cmxl
Copy link
Owner

cmxl commented Apr 26, 2019

Hi @arc95!
There are already conversion parameters for your task, but (!) they are not considered in the GetThumbNailAsync function. :(

var thumbNail = await ffmpeg.GetThumbnailAsync(output, thumbNailFile, new ConversionOptions {
    CustomHeight = 100,
    CustomWidth = 100,
    VideoSize = Enums.VideoSize.Custom,
    Seek = TimeSpan.FromSeconds(3)
});

If you know all the ffmpeg parameters you can adjust FFmpegArgumentBuilder.GetThumbnail(MediaFile inputFile, MediaFile outputFile, ConversionOptions conversionOptions) and create a pull request.
I'd love to merge that one!

@cmxl cmxl removed their assignment Apr 26, 2019
cmxl added a commit that referenced this issue Apr 26, 2019
@cmxl cmxl self-assigned this Apr 26, 2019
@cmxl cmxl added this to the v3.3.0 milestone Apr 26, 2019
@cmxl
Copy link
Owner

cmxl commented Apr 26, 2019

Just implemented it myself.
Have fun with version 3.3.0 and thumbnail sizes/cropping/aspect ratios! :)

@cmxl cmxl closed this as completed Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants