-
Notifications
You must be signed in to change notification settings - Fork 57
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
Get mediainfo library version #130
Comments
Hi, pymediainfo/pymediainfo/__init__.py Line 298 in 5ccb770
Maybe I could make this method public or create a |
By the way, this library hasn't |
{
"DLL": "libmediainfo.so.0",
"version": [23, 10],
"version_string": "23.10",
"type": "wheel" # "wheel" / "system"
}
|
I don't think I can return info about whether a wheel or system library was used, only the path would tell you that and even then I'm not 100% sure. I don't have a system where I can test the wheels right now, what does |
In [24]: MediaInfo._get_library()
Out[24]:
(<CDLL 'libmediainfo.so.0', handle 7fffc8ad8f40 at 0x7fef593a51e0>,
140736560434112,
'23.10',
(23, 10)) It returns this on WSL |
There isn't a Linux wheel yet so that would probably be the system library. Can you try on a normal Windows system? |
MediaInfo._get_library()
(<WinDLL 'C:\Users\roland\AppData\Local\Programs\Python\Python311\Lib\site-packages\pymediainfo\MediaInfo.dll', handle 7ff8cc570000 at 0x27810266410>, 2714694968896, '23.10', (23, 10)) Would it be possible to test if the dll is next to the main file itself?
And what happens if a distro has mediainfo in the system PATH variable, but it's not installed through a package manager, but a static build? Would it still work? |
The DLL can be passed manually via the Here's the autodetection code that runs when not library file is forced: pymediainfo/pymediainfo/__init__.py Lines 280 to 295 in 5ccb770
This package is a wrapper around the library, not the binary. If you only have a static binary, you can generate the XML output manually ( pymediainfo/pymediainfo/__init__.py Lines 137 to 144 in 5ccb770
|
I guess making the method public is enough then, if detecting of wheel usage is not possible. |
I couldn't find anything related in the docs. I would like to print out information whether a wheel is used or a system binary with subprocess (on Linux) and the version of the mediainfo wheel/binary.
The text was updated successfully, but these errors were encountered: