JasonLovesDoggo / RedditVideoMakerBot

Create Reddit Videos with just✨ one command ✨
GNU General Public License v3.0
23 stars 13 forks source link

Possible for widescreen option for youtube videos? #86

Closed floridabricks closed 2 years ago

floridabricks commented 2 years ago

Is it possible to have 2 formats? 1 vertical for tiktok and the other option widescreen for youtube?

OpenSourceSimon commented 2 years ago

You can change the resolution in the final_video.py

floridabricks commented 2 years ago

You can change the resolution in the final_video.py

Thanks! Will this also resize the reddit screenshots to fit on widescreen?

OpenSourceSimon commented 2 years ago

I think so

JasonLovesDoggo commented 2 years ago

You might have to change that in screenshot downloader.py

OpenSourceSimon commented 2 years ago

Is this issue solved?

floridabricks commented 2 years ago

Is this issue solved?

I'm assuming I have not tested it yet. But do you know how to fix errors when trying to use specific post id?

floridabricks commented 2 years ago

"playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. =========================== logs =========================== waiting for selector "[data-test-id="post-content"]""

When using specific post id

OpenSourceSimon commented 2 years ago

Do you have the correct post id?

floridabricks commented 2 years ago

Do you have the correct post id?

Yes, you can test it if you want. v98o6f post id CryptoCurrency subreddit

floridabricks commented 2 years ago

Every post id I use it keeps giving me this. But if I enter no id it works fine

Launching Headless Browser... Traceback (most recent call last): File "C:\Users\Downloads\RedditVideoMakerBot-master (2)\RedditVideoMakerBot-master\main.py", line 62, in main() File "C:\Users\Downloads\RedditVideoMakerBot-master (2)\RedditVideoMakerBot-master\main.py", line 41, in main download_screenshots_of_reddit_posts(reddit_object, number_of_comments) File "C:\Users\Downloads\RedditVideoMakerBot-master (2)\RedditVideoMakerBot-master\video_creation\screenshot_downloader.py", line 48, in download_screenshots_of_reddit_posts page.locator('[data-test-id="post-content"]').screenshot( File "C:\Python310\lib\site-packages\playwright\sync_api_generated.py", line 13249, in screenshot self._sync( File "C:\Python310\lib\site-packages\playwright_impl_sync_base.py", line 88, in _sync return task.result() File "C:\Python310\lib\site-packages\playwright_impl_locator.py", line 394, in screenshot return await self._with_element( File "C:\Python310\lib\site-packages\playwright_impl_locator.py", line 99, in _with_element handle = await self.element_handle(timeout=timeout) File "C:\Python310\lib\site-packages\playwright_impl_locator.py", line 219, in element_handle handle = await self._frame.wait_for_selector( File "C:\Python310\lib\site-packages\playwright_impl_frame.py", line 293, in wait_for_selector await self._channel.send("waitForSelector", locals_to_params(locals())) File "C:\Python310\lib\site-packages\playwright_impl_connection.py", line 39, in send return await self.inner_send(method, params, False) File "C:\Python310\lib\site-packages\playwright_impl_connection.py", line 63, in inner_send result = next(iter(done)).result() playwright._impl._api_types.TimeoutError: Timeout 30000ms exceeded. =========================== logs =========================== waiting for selector "[data-test-id="post-content"]"

OpenSourceSimon commented 2 years ago

The error means that it can't find the title in html. If you visit the website in your normal browser, does it load and view the page?

floridabricks commented 2 years ago

The error means that it can't find the title in html. If you visit the website in your normal browser, does it load and view the page?

Yes the title and page is loading in the browser. But no ID is working for downloading the posts and comments and I'm not sure why. If I leave the ID blank it works perfectly fine.

mrawesomey commented 2 years ago

I did all of the the stps to make it wide but now it comes out like this

https://user-images.githubusercontent.com/106691142/173186844-5c68e318-d36e-4b1d-8d7e-7693cfa68004.mp4

:

JasonLovesDoggo commented 2 years ago

I did all of the the stps to make it wide but now it comes out like this

https://user-images.githubusercontent.com/106691142/173186844-5c68e318-d36e-4b1d-8d7e-7693cfa68004.mp4

:

Change the resolution that the screenshots are taken at

OpenSourceSimon commented 2 years ago

Go to video_creation/screenshot_downloader.py:40 . I don't know what the correct value is for 16:9 resolution but you can try different values.

justexistingnow commented 2 years ago

I did this and it worked, Go to video creation, final_video.py Change line 21 to W, H = 1920, 1080 Change line 33 to .crop(x1=0, y1=0, x2=2246.6, y2=0) I am using an older version so the lines might be in a different number but find them and change them to this and itll work

JasonLovesDoggo commented 2 years ago

I did this and it worked, Go to video creation, final_video.py Change line 21 to W, H = 1920, 1080 Change line 33 to .crop(x1=0, y1=0, x2=2246.6, y2=0) I am using an older version so the lines might be in a different number but find them and change them to this and itll work

Thanks for that I will add it when I can

mrawesomey commented 2 years ago

.crop(x1=0, y1=0, x2=2246.6, y2=0)

Please make the Title and comments smaller in the wide screen video Thank you

justexistingnow commented 2 years ago

I did this and it worked, Go to video creation, final_video.py Change line 21 to W, H = 1920, 1080 Change line 33 to .crop(x1=0, y1=0, x2=2246.6, y2=0) I am using an older version so the lines might be in a different number but find them and change them to this and itll work

Thanks for that I will add it when I can

No problem!