plotoptix icon indicating copy to clipboard operation
plotoptix copied to clipboard

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

Open leeyngdo opened this issue 1 year ago • 3 comments

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!

leeyngdo avatar May 23 '24 10:05 leeyngdo

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.

robertsulej avatar May 23 '24 10:05 robertsulej

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

leeyngdo avatar May 23 '24 10:05 leeyngdo

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

robertsulej avatar May 23 '24 19:05 robertsulej

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

leeyngdo avatar May 25 '24 15:05 leeyngdo

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 avatar May 25 '24 19:05 robertsulej

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).

robertsulej avatar May 26 '24 20:05 robertsulej

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?

leeyngdo avatar May 27 '24 05:05 leeyngdo

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.

robertsulej avatar May 27 '24 06:05 robertsulej

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:

leeyngdo avatar May 27 '24 07:05 leeyngdo

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

robertsulej avatar May 27 '24 07:05 robertsulej

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?

leeyngdo avatar May 27 '24 08:05 leeyngdo

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

robertsulej avatar May 27 '24 08:05 robertsulej

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

leeyngdo avatar May 27 '24 09:05 leeyngdo

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

robertsulej avatar May 27 '24 09:05 robertsulej