RedditVideoMakerBot icon indicating copy to clipboard operation
RedditVideoMakerBot copied to clipboard

Creating_a_thumbnail

Open JvSdv opened this issue 3 years ago • 6 comments

Description

Create a thumbnail for the video using the PRAW library.

  • thumbnail : Need to put the thumbnail.png image in the assets/backgrounds folder.
  • font_family : The font family to use for the title.
  • font_size : The font size to use for the title.
  • font_color : The font color to use for the title.
  • width,height : The width of the thumbnail is based on the thumbnail image.
  1. Thumbnail created takes the image of the assets and writes the title post on top of this image.
  2. The thumbnail is then saved in the assets/{id}/temp folder.
  3. And finally the thumbnail is saved in the results/{subreddit}/thumbnails folder.

Issue Fixes

None

Checklist:

  • [x] I am pushing changes to the develop branch
  • [x] I am using the recommended development environment
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] I have formatted and linted my code using python-black and pylint
  • [x] I have cleaned up unnecessary files
  • [x] My changes generate no new warnings
  • [x] My changes follow the existing code-style
  • [x] My changes are relevant to the project

Any other information (e.g how to test the changes)

Thanks for the bot helps me bring good content to Brazil

JvSdv avatar Oct 12 '22 03:10 JvSdv

Awesome pull request! Can you send an example of a thumbnail that's generated?

OpenSourceSimon avatar Oct 12 '22 05:10 OpenSourceSimon

Put any image in assets/backgrounds folder (.png) thumbnail thumbnail_large

JvSdv avatar Oct 12 '22 13:10 JvSdv

I would just change this to drop an image in the folder and it will use that as the background

JasonLovesDoggo avatar Oct 14 '22 18:10 JasonLovesDoggo

I would just change this to drop an image in the folder and it will use that as the background

That's possible if you put a thumbnail.png in the assets/backgrounds/ folder. Or do you mean something else?

OpenSourceSimon avatar Oct 14 '22 18:10 OpenSourceSimon

That's right. maybe change the name to background.png or something else?

JvSdv avatar Oct 15 '22 14:10 JvSdv

That's right. maybe change the name to background.png or something else?

I think it shouldn't be in the assets folder since it's only for media generated by the bot. Maybe utils?

OpenSourceSimon avatar Oct 15 '22 15:10 OpenSourceSimon

That's right. maybe change the name to background.png or something else?

I think it shouldn't be in the assets folder since it's only for media generated by the bot. Maybe utils?

This is generated by the bot though??

JasonLovesDoggo avatar Dec 18 '22 07:12 JasonLovesDoggo

That's right. maybe change the name to background.png or something else?

I think it shouldn't be in the assets folder since it's only for media generated by the bot. Maybe utils?

This is generated by the bot though??

Sorry for not being clear. I was talking about the input background image. The assets folder is mostly for temp files and can be easily removed for bug fixing. The end thumbnail will go at the results folder if I remember correctly.

But now there are more PRs with customization and they're using the assets folder too so we'll keep it also in this PR.

OpenSourceSimon avatar Dec 18 '22 07:12 OpenSourceSimon

That's right. maybe change the name to background.png or something else?

I think it shouldn't be in the assets folder since it's only for media generated by the bot. Maybe utils?

This is generated by the bot though??

Sorry for not being clear. I was talking about the input background image. The assets folder is mostly for temp files and can be easily removed for bug fixing. The end thumbnail will go at the results folder if I remember correctly.

But now there are more PRs with customization and they're using the assets folder too so we'll keep it also in this PR.

From what I understand about this MR, the background image is generated by the bot and yeah it should definitely end up in results if it's going to be an output

JasonLovesDoggo avatar Dec 18 '22 07:12 JasonLovesDoggo