-
Notifications
You must be signed in to change notification settings - Fork 2k
Reddit Post Position Config & Download Progress Bar #693
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
Reddit Post Position Config & Download Progress Bar #693
Conversation
Hello, I'm not a developer, but I've been using this project for a week, and I try to help at least with ideas and tests, among other basic things. I was reading your PR and just this week I was thinking about this improvement. I thought maybe you could see the following: Find out what the official TikTok "safe zones" are, and it would be great to be able to move the screenshot also horizontally, since currently, as the TikTok interface is published, it covers part of the Screenshot, I leave you an example: On the official website of tiktok, there are the rules of the safezones so that your content is not covered by its tiktok interface: basically there is 120px on the right side that contains buttons from the tiktok interface, it would be great if the screenshots respect that 120px on the right side I hope I didn't bother you with this, but your PR seemed the perfect thing to solve this detail too |
@IslaFTW Bro Do you know how to make the text size a little bit larger ? |
I think it is not possible, but it would be great to be able to control the size of the font and also the type of Font, for example the "Ubuntu" font in size 12, it is very pleasant to read, and it is very beautiful |
I tried to resize the screenshot and did everything but there is no variable to control the Height Of the screenshot, Therefore I was only able to manage changing the width, But I think making the height of the screenshot more will stretch the font somehow. Now the font is very wide but in very small letters to read especially the comments. |
@IslaFTW One of the solution that I can think of is to check & resizing the image to ensure that the image respect the Tiktok interface (120px), like what @LamasterO did . I will try to see what I can do on this. Thank you for your suggestion 👍 . While moving the image entirely to the left to avoid the tiktok interface could be a solution, I have tried it and it seems weird (?), ex: I think this is a great idea to open up as an issue too, as I notice some of the bigger image clip being covered up the button on Youtube short. |
This is great and all but you are by far over complicating things, you don't need separate files and classes for every single background and you don't need a background swapper class Also @IslaFTW suggestion was great I will merge this into a separate branch and improve this there in 3 days |
0f82738
to
a81b0c3
Compare
Hi @JasonLovesDoggo , I have adjusted this PR with the recent code change and refactor |
I will look at it when I get home around |
Hey there, I tried to run the code in combination with the latest develop build, but it doesn't work. Specifically, when trying to download the background videos, in the line 19 of background.py, there is is the name 'Progress', which does't seem to appear anywhere else in the file? |
I will take a look at that |
This comment was marked as duplicate.
This comment was marked as duplicate.
I will help to look into it too. Maybe it related on the new progress bar that were included in this PR. Also need to adjust to new changes in develop branch haha 🤣 |
8e4d813
to
c21b5d8
Compare
Hi @CJthisis and @JasonLovesDoggo , I have updated my code to the newest develop branch (and tested it!). The problem from your screenshot should not happen anymore, and would you kindly enough to try it again? Thank youu 🙏 . |
This is great but I just have one last feature request from this Have it so that if the background choice option is empty It will pick a random background |
This would be great! |
I will do so tomorrow when I get home. Do you have updated your fork too? If so, I would use that version |
Will try to implement it, thanks for the suggestion |
Hi, I've implemented the default (if user not pick any background) background == random background (that the bot support). edit: |
Will test and review when I get home |
5c248bc
to
836dcf6
Compare
@CordlessCoder If this works for you. Merge it |
836dcf6
to
59d07f5
Compare
@CordlessCoder hi, due to new update in develop branch, I need to adjust a few line of codes. Please update your branch (or just delete and pull it again haha) when reviewing. Thankss 🙏 |
Hey there, in final_video.py, it keeps giving me this SyntaxError: '(' was never closed. I am not experienced enough to fix this by myself, where does the missing ')' go? @William9923 |
hi @CordlessCoder , a little bit confused tho, but the code in my fork should only have 122 lines (in final_video.py)? Mm, r u having merge conflict when pulling it (because i often rebase it to update to develop branch)? ps: If you having difficulity merging it, best option is to delete the branch & simply use whatever in the remote 🙏 . It will automaticly use the latest. Thx |
bump @JasonLovesDoggo , @CordlessCoder any update on this PR 😄 ? A little bit tired of updating it to the newest develop branch every day haha. |
The thing is we are about to change from the ENV file to a different system so it would be incompatible |
Once the new config system is in, I'll fix the merge conflicts and test |
I see, thx for the heads up. |
sure", thx btw. I'm always available incase any issue comes up when merging 🙏 . |
Description
Added:
Why? (Motivation)
Although the bot has produced a lot of good videos with minecraft background, I noticed that on some other background, the image of reddit post was blocking the background (check below image). So, it inspire me to make different configuration for each background. For now, it would be the reddit post image position on the background
Before
After
Also, when trying out different background, I noticed that we need to download all background video simultaneously. Because the time it takes to download all video is quite long, I propose that the bot only need to download for needed video & add the progress bar to track the download progress.
Downloading...
Done
How (?)
For changing the position of reddit post image for each background, I use the available
set_position
method inmoviepy
. After refactoring the code for the background video part, we can further make separate configuration (not only the position of reddit post image), such as the blur effect (opacity) etc.For the progress bar, I simply add tqdm progress bar and use
on_progress_callback
that was available from pytube API when downloading the video.Test Guide
To make testing the new feature easier, you could follow this step by step guides below (i don't include other functionality test, but it should be the same as other functionality):
center
, while other like GTA Stunt race move the screenshot slightly higher)BackgroundChoice
. It will use random video (from supported vids) as background