-
Notifications
You must be signed in to change notification settings - Fork 26
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
Export videos in .mpeg4 #67
Comments
Hi @Ipuch
mpeg4 won't be possible... In general, messing with codec is enough to want to kill yourself haha! We will stick with non proprietary format (ogv) and people can reformat if needed.
It is obviously already possible to run in command line (as a button is just a fancy way to call a command line :) )
bioviz is unfortunately agnostic of this "phase concept". This is solely |
|
Yep, but these as
Sleeping would do nothing. The frame rate is solely based on the amount of frame you record for a particular time period. For instance, if you hit "record" twice at each frame, you have a video which is twice slower. You however maybe can change the frame rate of the actual video (not sure about that). But it is going to be hard to decide what you should do or not. My advice, the video is currently 30fps (if I recall well), therefore resample using |
Turns out, it wasn't accessible (it was defined in private methods), and that I needed this as the same time ;) import bioviz
import numpy as np
# This should be real data
all_q = np.random.rand(n_dof, n_frames) # n_dof is the number of dof of the model
# Load a bioviz handler
b = bioviz.Viz("model_path.bioMod")
b.resize(1920, 1080) # Make it nice and big
b.start_recording("save_path")
for q in all_q:
b.set_q(q)
b.add_frame() # Add a frame to the video
b.stop_recording()
# Close the window
b.quit() |
is it possible to specify a view angle ? :) |
There is no direct API for this, but the vtk renderer is actually public. So you can get the camera like this: cam = b.vtk_window.ren.GetActiveCamera()
cam.SetPosition(x, y, z)
cam.SetRoll(angle)
b.refresh_window() # This is not necessary, but you won't visually see the changes Please refer to the VTK documentation for further help |
Hello,
It would be great features to:
The text was updated successfully, but these errors were encountered: