-
Notifications
You must be signed in to change notification settings - Fork 264
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
Making Video on Windows doesn't work #122
Comments
FYI - works on Ubuntu too. |
Hi, just adding this here: |
hi @FedeClaudi sorry for the late answer, i would first check if the screenshots are rendered correctly, if so the isuue must be ffmpeg as you say. |
Hi, yep the screenshots are rendered correctly on both mac and windows, the problem seems to be with the video creation. Sure, if you'd like to take the code I've made for using opencv and make it part of vtkplotter that'd work. Do you know how much do users create animations/videos in vtkplotter? I suspect that it's going to become increasingly important for brainrender so I'd be keen to support this functionality. |
it's cool that at least screenshots are doing fine :) if you have some lines of code already using opencv can you share them? |
sure, And this is the brainrender class that handles creating a video (mostly builds upon the vtkplotter video class): https://github.com/BrancoLab/BrainRender/blob/animation/brainrender/animation/video.py
|
In the latest release i include opencv support, interface is: video.action(zoom=1.1)
#Options are: elevation_range=(0,80),
# azimuth_range=(0,359),
# zoom=None,
# cam1=None, cam2=None # initial and final camera positions check out example here |
Cool, nice stuff! |
Hi Marco,
I've encountered a problem with the
Video
class: https://github.com/marcomusy/vtkplotter/blob/471ae90046f00579d6e4ad894f78a9018564224b/vtkplotter/vtkio.py#L1403If I make a video with code similar to the one provided in the example, I get different behaviours depending on the OS:
On Mac it works fine, it creates the video and it's all good.
On Windows it creates a video where the frames are either black or messed up.
I've become convinced that the problem is with the
ffmpeg
command inVideo.close()
, but was unable to find a fix. It should be something about the codec and pixel format used, but I'm unsure about what the solution is.I should also add that I've tried updating ffmpeg to the latest build but that doesn't change anything.
I don't know if the
Video
class changed recently, but I think I was able to create videos on windows in the past, and I haven't changed anything on my machine. The only change is that I'm using a more recent version ofvtkplotter
.The text was updated successfully, but these errors were encountered: