You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to make several videos that share some logics.
I realize I have to completely finish 1 video before starting making another one since CURRENT_VIDEO contains only 1 video object.
This makes my code less neat since I want to create several similar objects that belong to different video in a loop.
My solution
If objects can be created by naming the video object where they should be explicitly, it will enable making several videos at the same time. For example:
videos = [Video(500, 500) for i in1:10]
......
obs = []
for (i, video) inenumerate(videos)
ob =Object(video, frames, create_fun, Point(0,0))
push!(obs, ob)
end......for (i, video) inenumerate(videos)
render(video; "output/$i.mp4")
end
New Object api should work with existing api well because of multiple dispatch.
A new method of Object and other related functions like Background can be added.
For example:
functionObject(video::Video, frames, func::Function, start_pos::Union{Object,Point}; kwargs...)
# Do not check if CURRENT_VIDEO is empty or not.......end
Construction of Video should also be altered to meet the new requirement. I haven't come up with a good idea about how.
The text was updated successfully, but these errors were encountered:
I'm sorry that I missed this issue for so long. Yes I think that is a reasonable approach. I think there are a few more changes that need to be made like it would be good to store the video struct in every Object then and let it default to the current video.
Your approach would also make it easier to run Javis in Pluto as Pluto needs to figure out which cells depend on each other.
Are you yourself interested in working on a PR for this?
vid.mp4 will have line1 and line2 , but vid2.mp4 will have line2 and line3
you can also import all the objects using video1.objects[2:end] if you ensure that the first Object you create in video1 is Background
Problem
I am trying to make several videos that share some logics.
I realize I have to completely finish 1 video before starting making another one since
CURRENT_VIDEO
contains only 1 video object.This makes my code less neat since I want to create several similar objects that belong to different video in a loop.
My solution
If objects can be created by naming the video object where they should be explicitly, it will enable making several videos at the same time. For example:
New
Object
api should work with existing api well because of multiple dispatch.A new method of
Object
and other related functions likeBackground
can be added.For example:
Construction of
Video
should also be altered to meet the new requirement. I haven't come up with a good idea about how.The text was updated successfully, but these errors were encountered: