-
Notifications
You must be signed in to change notification settings - Fork 438
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
FEAT Video Converter: Adding Images to Videos #702
base: main
Are you sure you want to change the base?
Conversation
pyproject.toml
Outdated
@@ -58,6 +58,7 @@ dependencies = [ | |||
"ipykernel>=6.29.4", | |||
"numpy>=1.26.4", | |||
"openai>=1.58.1", | |||
"opencv-python>=4.11.0.86", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you figure out what this pulls in? Might be a rather heavyweight package. If you're not sure how please lmk and we can do it together 🙂
…dagdorj/video_converter
…dagdorj/video_converter
…dagdorj/video_converter
…dagdorj/video_converter
…dagdorj/video_converter
self._img_resize_size = img_resize_size | ||
self._video_path = video_path | ||
|
||
async def _add_image_to_video(self, image_path: str, output_path: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest async def _add_image_to_video(self, image_path: str, output_path: str) -> str:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to fix up pre-commit hook failures, otherwise lgtm 🚀 ✨
initialize_pyrit(memory_db_type=IN_MEMORY) | ||
|
||
input_video = str(pathlib.Path(".") / ".." / ".." / ".." / "assets" / "sample_video.mp4") | ||
output_video = str(pathlib.Path(".") / ".." / ".." / ".." / "assets" / "sample_output_video.mp4") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this output_video
path isn't being used right now, make sure to include it in the converter init on L26
|
||
async def convert_async(self, *, prompt: str, input_type: PromptDataType = "image_path") -> ConverterResult: | ||
""" | ||
Converter that adds an image to a video |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT:
Converter that adds an image to a video | |
Adds input image to video |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work! This'll be really cool to try out :)
Description
Adding new video converter to add image to video
Tests and Documentation
Made new notebook and ran