Open arakis92 opened 2 years ago
Is the source video valid?
Yes, source is valid but the issue is inside preprocessing stage, 2d_res folder is empty.
The folder of preprocessing (res_2d_images) is full empty which is the cause of blank output. Can you please help ?
Can u check whether video_to_images
works well? This function just save image frames. I guess it may be a problem of ffmpeg.
I didn't write anything to res_2d_images. Could it be that the package pyvista is not working on your computer? Could you try pyvista's example (https://docs.pyvista.org/examples/02-plot/gif.html?highlight=off_screen) and see whether it works?
grid = pv.StructuredGrid(x, y, z)
AttributeError: module 'pyvista' has no attribute 'StructuredGrid'
The error which I am getting while running the example
make sure you are using pyvista==0.31.3. Also try to install these:
pip install -e 'git+https://github.com/mmatl/pyopengl.git#egg=pyopengl'
if this doesn't work, could you also try:
# mesa
sudo apt update
sudo wget https://github.com/mmatl/travis_debs/raw/master/xenial/mesa_18.3.3-0.deb
sudo dpkg -i ./mesa_18.3.3-0.deb || true
sudo apt install -f
To check whether pyvista work, you could try this test script:
import pyvista
from pyvista import examples
import numpy as np
# needed for headless rendering
pyvista.start_xvfb()
mesh = examples.download_dragon()
mesh.rotate_x(90)
mesh.rotate_z(120)
###############################################################################
# Using two lights, plot the Stanford Dragon with shadows.
#
# .. Note::
# VTK has known issues when rendering shadows on certain window
# sizes. Be prepared to experiment with the ``window_size``
# parameter. An initial window size of ``(1000, 1000)`` seems to
# work well, which can be manually resized without issue.
light1 = pyvista.Light(position=(0, 0.2, 1.0),
focal_point=(0, 0, 0),
color=[1, 1.0, 0.9843, 1], # Color temp. 5400 K
intensity=0.3)
light2 = pyvista.Light(position=(0, 1.0, 1.0),
focal_point=(0, 0, 0),
color=[1, 0.83921, 0.6666, 1], # Color temp. 2850 K
intensity=1)
# Add a thin box below the mesh
bounds = mesh.bounds
rnge = (bounds[1] - bounds[0],
bounds[3] - bounds[2],
bounds[5] - bounds[4])
expand = 1.0
height = rnge[2] * 0.05
center = np.array(mesh.center)
center -= [0, 0, mesh.center[2] - bounds[4] + height/2]
width = rnge[0]*(1 + expand)
length = rnge[1]*(1 + expand)
base_mesh = pyvista.Cube(center,
width,
length,
height)
# rotate base and mesh to get a better view
base_mesh.rotate_z(30)
mesh.rotate_z(30)
# create the plotter with custom lighting
pl = pyvista.Plotter(lighting=None, window_size=(3200, 3200), off_screen=True)
pl.add_light(light1)
pl.add_light(light2)
pl.add_mesh(mesh, ambient=0.2, diffuse=0.5, specular=0.5, specular_power=90,
smooth_shading=True, color='orange')
pl.add_mesh(base_mesh)
pl.enable_shadows()
pl.camera.zoom(1.5)
pl.show(screenshot='shadow.png')
check whether you can get correct shadow.png
.
I cannot re-produce this problem even on my PC.
I just install pyvista via pip install pyvista==0.31.3
, everything works fine.
import pyvista
print(pyvista. StructuredGrid)
@haofanwang I installed 0.31.3, the above test script author provided even can not rung:
pyvista/_vtk.py", line 318, in <module>
from vtkmodules.vtkFiltersExtraction import (vtkExtractEdges,
ImportError: cannot import name 'vtkExtractEdges' from 'vtkmodules.vtkFiltersExtraction
Is this version work at all? However, 0.36.1 works fine.
@jinfagang What's your Python version? I have tested with Python3.7.13 and Python3.9.12, could you try install it in conda environment?
See #41 for dependency list .. it will solve all your problem
moov atom not found out/glamr_dynamic/running/grecon_videos/running_seed1_sbs_all_tmp1.mp4: Invalid data found when processing input