rnd-team-dev / plotoptix

Data visualisation and ray tracing in Python based on OptiX 7.7 framework.
https://rnd.team/plotoptix
Other
499 stars 26 forks source link

Video encoding library initialization failed, encoding features are not available. #59

Closed leeyngdo closed 5 months ago

leeyngdo commented 6 months ago

Hello, thank you for the great work! I'm trying to import "from plotoptix import TkOptiX" on the remote server, but I encountered the following error:



Video encoding library initialization failed, encoding features are not available.



    [0]: NVIDIA GeForce RTX 2080 Ti

I'm working with an RTX 2080 Ti, Driver Version: 535.161.08 and CUDA Version: 12.2. Also FFmpeg == 7.0 and I downloaded tkinter and PyQt but still not works.. What can I try to resolve this error? Thank you!

robertsulej commented 6 months ago

Your ffmpeg libs are apparently not visible to plotoptix. Let me check how the ffmpeg installation is now proceeding in linux, I'll let you know later today.

leeyngdo commented 6 months ago

Thank you for your fast response! I'm also considering downgrading FFmpeg, but I'm not sure if that will work..

robertsulej commented 6 months ago

I need to update the code to use ffmpeg API available with the 7.0 release. Tomorrow should be ready.

leeyngdo commented 6 months ago

Hello, could you let me know when it will be updated?

robertsulej commented 6 months ago

Sure, I'll let you know. There is some more to do since the new ffmpg dll is too large to include it in the package and the Windows binaries need changes.

robertsulej commented 6 months ago

Updated code is in this branch. It should work with ffmpeg 7 installed as in the README, with shared libs (both, windows and linux, are updated).

leeyngdo commented 5 months ago

Hi, thank you for the update! However, my error is still not resolved and I think something else is the problem. So I also tried v0.18.1 with a downgraded version of FFmpeg (5.1.4), but same error occurs.. Is there anything that I can try to resolve this error?

robertsulej commented 5 months ago

OK, maybe something else is blocking you. Please, try plotoptix v0.18.1 and ffmpeg 4.1.11. That ffmpeg was used to prepare several plotoptix release and is well tested.

leeyngdo commented 5 months ago

I'm using Ubuntu 20.04 and downloaded ffmpeg 4.1.11 in this page. Now I could import TkOptiX, but it outputs the following error when I run the example code

import numpy as np
from plotoptix import TkOptiX

n = 1000000                                  # 1M points, better not try this with matplotlib
xyz = 3 * (np.random.random((n, 3)) - 0.5)   # random 3D positions
r = 0.02 * np.random.random(n) + 0.002       # random radii

plot = TkOptiX()
plot.set_data("my plot", xyz, r=r)
plot.show()

[0]: NVIDIA GeForce RTX 2080 Ti Selected devices: [0] Primary device: 0 Exception in thread Thread-1: Traceback (most recent call last): File "/root/anaconda3/envs/optix/lib/python3.10/threading.py", line 1016, in _bootstrap_inner self.run() File "/root/anaconda3/envs/optix/lib/python3.10/site-packages/plotoptix/npoptix.py", line 495, in run self._run_event_loop() File "/root/anaconda3/envs/optix/lib/python3.10/site-packages/plotoptix/tkoptix.py", line 166, in _run_event_loop self._root = tk.Tk() File "/root/anaconda3/envs/optix/lib/python3.10/tkinter/init.py", line 2299, in init self.tk = _tkinter.create(screenName, baseName, className, interactive, wantobjects, useTk, sync, use) _tkinter.TclError: no display name and no $DISPLAY environment variable minor Version (60) newer than tool (should be 59) minor NvvmIRVersion (63) newer than tool (should be 58) [ 2][ COMPILER]: COMPILE ERROR:

robertsulej commented 5 months ago

OK, now the issue is to configure the remote display. Please, try usual instructions, eg like this one.

leeyngdo commented 5 months ago

Thanks! The following is remaining error message I got:

minor Version (60) newer than tool (should be 59) minor NvvmIRVersion (63) newer than tool (should be 58) [ 2][ COMPILER]: COMPILE ERROR:

OPTIX_ERROR_INVALID_INPUT: Optix call 'optixModuleCreate( m_context, &m_module_compile_options, &m_pipeline_compile_options, ptx.data(), ptx.size(), log, &sizeof_log, &mnew )' failed: Modules.cpp:49) Log: COMPILE ERROR:

and nothing is rendered in the screen:

Screenshot 2024-05-27 at 5 00 07 PM

I think this error might be related to this version mismatch, right?

robertsulej commented 5 months ago

Yes, the driver update should help. Shaders were compiled with CUDA 12.3 and it may require the driver release >= 545.23.

leeyngdo commented 5 months ago

Finally it works after I upgrade CUDA & NVIDIA driver. Thank you for your kind answer!

robertsulej commented 5 months ago

Great! I'll check what could be a problem with ffmpeg 7.0 in the new code and let you know.